Kernel Threads

Traditional Unix systems delegate some critical tasks to intermittently running processes, including flushing disk caches, swapping out unused page frames, servicing network connections, and so on. Indeed, it is not efficient to perform these tasks in strict linear fashion; both their functions and the end user processes get better responses if they are scheduled in the background. Since some of the system processes run only in Kernel Mode, modern operating systems delegate their functions to kernel threads, which are not encumbered with the unnecessary User Mode context. In Linux, kernel threads differ from regular processes in the following ways:

• Each kernel thread executes a single specific kernel C function, while regular processes execute kernel functions only through system calls.

• Kernel threads run only in Kernel Mode, while regular processes run alternatively in Kernel Mode and in User Mode.

• Since kernel threads run only in Kernel Mode, they use only linear addresses greater than page_offset. Regular processes, on the other hand, use all four gigabytes of linear addresses, in either User Mode or Kernel Mode.

Was this article helpful?

0 0

Post a comment