Multithreading Models
- One-To-One (1:1) Model: For every user thread, the OS
creates a separate kernel thread to handle it.
- Also known as kernel-level threading since the kernel implements these threads as processes.
- An API library creates new threads via the clone() system call, similar to fork() which creates processes.
- Since many kernel threads could be created (depending on the number of user threads,) the OS will spend more time switching between them, thus making the OS work slower.
- What’s good about this model is that, when one of the user threads blocks [= waits for I/O or some other activity], the other can continue to operate (since the underlying other kernel threads aren’t blocking.)