In user-space we can create a process by executing program or calling fork inside a program, Kernel will create process descriptor(task_struct) for each user-space process.
In kernel space is there any any concept called process, if so how they will be created?
As per my understanding kernel threads will be created in kernel space using kernel_thread() etc, kernel_thread() is internally calling do_fork(), so kernel threads also represented using task_struct?
If both user-space process and kernel space threads are represented using task_struct, then how scheduler will schedule the user-space process and kernel space thread?