Processes or Threads (or daemons) ?

Nathan Meyers nmeyers at javalinux.net
Sat Mar 1 11:33:32 EST 2003


dsr at tao.merseine.nu wrote:

>On Sat, Mar 01, 2003 at 09:39:51AM -0500, Paul Courchene wrote:
>
>>2. During this discussion reference was made to:
>> Kernel Processes or daemons such as:
>> ' kupdated ' or '  kidled '
>>Also, someone said:
>>
>>>>I've heard of "kernel processes", but so far > everything I've read about
>>>>
>>them is mystical poetry.
>>
>>>>They apparently > don't work through the usual process hooks.
>>>>They're technically threads which look like processes.
>>>>They don't have to obey any normal rules.
>>>>
>>Are this routines or daemons designed and coded as threads
>>and use a threads library, or are they perceived as threads
>>because of their behavior or
>>since we are talking about generic Kernel functions, we take the practical
>>context of ' kernel threads ' ...
>>
>>could someone elaborate a little, for me,
>>so that I better understand the notion of kernel threads ...
>>I have never seen any 'code' for a daemon such as
>> ' kupdated ' or '  kidled ', so I am interested in this idea ...
>>
>
>Kernel threads are special.
>
Of course, this is not to be confused with the "kernel-managed threads" 
used by user-space processes that we were discussing recently (ugh!). 
The latter refers to threads of execution in a user-space process whose 
context and context-switching is managed by the kernel.

Nathan Meyers
nmeyers at javalinux.net

>
>
>They are created with kernel_thread() which invokes clone(2) in kernel
>mode. There is no user address space associated with them. They get to
>address kernel space directly. They run at highest privileges, and even
>the scheduler cannot pre-empt them.
>
>In short, consider them part of the kernel that show up as separate
>processes, but aren't. 
>
>-dsr-
>






More information about the Discuss mailing list