Skip to content

11. Kernel Level vs User Level Threads

User Level Threads (ULT): managed entirely by a user-space library (old Java green threads, early Go). The kernel sees only one process; the library switches threads without any syscall.

Kernel Level Threads (KLT): managed directly by the OS kernel, which schedules each individually.

Aspect User Level Kernel Level
Who managesThread libraryOS kernel
Kernel awarenessInvisibleFully visible
Context switchNo syscall — fastSyscall — slower
ParallelismNo (single core)Yes
I/O blockingBlocks all threadsBlocks only that thread
Crash impactOne crash kills allIsolated
ExampleOld green threadsLinux pthreads

Threading models: Many-to-One (pure ULT, fast switching, no parallelism), One-to-One (pure KLT, true parallelism, expensive switches — Linux pthreads), Many-to-Many (hybrid — M user threads over N kernel threads). Go's goroutines are the classic Many-to-Many example: thousands of goroutines multiplexed over a handful of OS threads.