Light Weight Kernel Threads |
Light Weight Kernel Threads or LWKT is a term from computer science in general and in DragonFlyBSD in particular. LWKTs differ from normal kernel threading in that they can preempt normal light-weight process. According to Matt Dillon (computer scientist), DragonFlyBSD creator:
The LWKT scheduler is responsible for actually running a thread. It uses a fixed priority scheme but you have to keep in mind that the fixed priorities are differentiating major subsystems, not user processes. For example, hardware interrupt threads have the highest priority, followed by software interrupts, kernel-only threads, then finally user threads. A user thread either runs at user-kernel priority (when it is actually running in the kernel, e.g. running a syscall on behalf of userland), or a user thread runs at user priority.
DragonFly does preempt... it just does it very carefully and only under particular circumstances. An LWKT interrupt thread can preempt most other threads, for example. This mimics what FreeBSD-4.x already did with its spl/run-interrupt-in-context-of-current-process mechanism. What DragonFly does *NOT* do is allow a non-interrupt kernel thread to preempt another non-interrupt kernel thread. [http://www.shiningsilence.com/mailarchive/kernel/2003-November/1719.html]
See also: light-weight process
= References =
*[http://leaf.dragonflybsd.org/mailarchive/kernel/2003-11/msg00321.html Matt Dillon s post about the LWKT scheduler]|
|