I have been following a course on Operating Systems over the past few months. However, I'd like some clarification on one point that I read. From my understanding, there are three types of multithreading models to map user level threads to kernel level threads -
- Many to one model
- Many to many model
- One to one model
I can see why the many to one model is not very efficient when it comes to parallel processing - because a blocking system call would mean halting of any processing.
However, in the book I'm referring, Operating System Concepts (By Abraham Silberschatz, Greg Gagne and Peter Galvin), it says that both Linux and the Windows family use the one to one model, even though there is the extra overhead of creating a kernel thread for every user thread that's created.
Wouldn't a many to many model be better? Because you have a number of kernel threads, sufficient to have a high degree of parallelism, and you can always opt for a two level model to bind a user level thread to a kernel level thread.
TLDR: Why is the one to one multithreading model preferred over many to many model despite the overhead in Windows and Linux systems?