内核线程是什么东东 What is Kernel threads

有一些Unix内核,比如Solaris和SVR4.2/MP,被组织成一些内核线程。一个内核线程是一个执行上下文且可以被调度;这样的内核线程可能与一个用户程序相关联,也有可以只执行一些内核函数。上下文切换的时候,切换内核线程上下文的开销远比切换用户进程上下文的开销要小。因为内核线程通常共用一个地址空间。而Linux的内核线程则有不同。Linux的内核线程仅仅周期性的执行一个内核函数。而且,Linux内核进线程并不表示一个基本的可执行上下文。 zausiu's blog. http://blog.ykyi.net

Some Unix Kernels, such as Solaris and SVR4.2/MP, are organized as a set of kernel threads. A kernel thread is an execution context that can be independently scheduled; it may be aasociated with a user program, or it may run only some kernel functions. Context switches between kernel threads are usually much less expensive than context switches between ordinary processes, because the former usually operate on a common address space. Linux uses kernel threads in a very limited way to execute a few kernel functions periodically; however, they do not represent the basic execution context abstractions.