IT lexicon › Infra & Ops › LWKT

LWKT

Infra & Ops På svenska → Updated: 2026-11-08

DragonFly BSD's lightweight kernel threads: each CPU schedules its own threads and talks to the others by message instead of fighting over locks.

Light Weight Kernel Threads were the heart of Matthew Dillon's 2003 split from FreeBSD. A thread belongs to one CPU and is never quietly migrated; if one processor needs work done on another, it sends a message via an inter-processor interrupt (IPI). Whoever owns the data does the work, and a great deal of locking simply never becomes necessary.

For what still has to be shared, DragonFly introduced serializing tokens. They resemble locks but are released automatically when a thread blocks and reacquired when it resumes, which rules out the classic deadlocks. The catch is that protection only holds while the thread is actually running. The big kernel lock was finally gone around 2011 — eight years after the fork, which says something about the length of the road.

← Back to the lexicon