Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. Light Weight
Kernel Threads or LWKT is a term from computer science in general and in
DragonFlyBSD in particular. LWKTs differ from normal kernel threads in
that they can preempt normal kernel threads. According to Matt Dillon,
DragonFlyBSD creator: "The LWKT scheduler is responsible for actually
running a thread. It uses a fixed priority scheme but ... 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 vimAL. "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. "