Threads
The OS is a huge multi-threaded program.
Multi-threading is useful for applications as well.
User-Level threads can be 100x faster than similar kernel thread operations.
But user-leve threads suffer from a problem of poor integration; because they’re invisible to the OS, the OS can make poor scheduling decisions, e.g.:
- running a process that has no work (is running an idle thread)
- blocking a process whose u-l thread has requested I/O, even though other threads can run in that process
- removing a process whose u-l thread is holding a lock
Solving this requires communication between the kernel and the u-l thread manager.