Basic Question about Kernel Processes in FreeBSD.

Dheeraj Kandula dkandula at gmail.com
Mon Jun 16 10:45:49 UTC 2014


Hey All,
        When I was reading through the FreeBSD kernel code came across the
function kproc_create. This function creates a kernel process. Isn't it?

But at some places in the code, there is mention that the address space is
shared with proc0.

My Question:
         Do all the kernel processes share the same address space. i.e.
even though they are multiple processes, they share the same kernel address
space. If so then why do we have kernel threads as threads are created in
the first place to share the address space of a process so that they are
light weight.

Can someone shed some light on this. I am a bit confused about this. I
though that processes doesn't exist in kernel context and only user
processes existed.

Dheeraj


More information about the freebsd-arch mailing list