Difference between a kthread and an ordinary process.

Kamal R. Prasad kamalp at acm.org
Tue Jan 24 02:23:45 PST 2006


On 1/24/06, Pranav Peshwe <pranavpeshwe at gmail.com> wrote:
[snip]



> What is the difference between a kernel thread and a normal process
> created using fork ? except the address space sharing with swapper and


more than one kernel thread can be associated with a process and they all
share the same address space.

kernel mode execution of the kthread. Is a kthread effectively just a
> process always running in kernel mode ?


you mean - effectively just a kernel process? A kernel thread can be
associated with one or more userland threads, but a kernel process doesn't
have anything associated with it in userspace. Further, more than one kernel
thread can share a single U area/user address space. When they were first
introduced -Sun microsystems referred to kernel threads as light-weight
processes, which is what you seem to have concluded.

regards
-kamal


TIA.
>
> Regards,
> Pranav.
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
>


More information about the freebsd-hackers mailing list