4.2 Multithreading Models
Last updated
Was this helpful?
Last updated
Was this helpful?
Many-to-One Model It is efficient; but the entire process will block if a thread makes a blocking system call. Also, because only one thread can access the kernel at a time, multiple threads are unable to run in parallel on multiprocessors.
One-to-One Model
Many-to-Many Model Whereas the many-to-one model allows the developer to create as many user threads as she wishes, true concurrency is not gained because the kernel can schedule only one thread at a time.
(1) The one-to-one model allows for greater concurrency, but the developer has to be careful not to create too many threads within an application (and in some instances may be limited in the number of threads she can create). (2) The many-to-many model suffers from neither of these shortcomings: developers can create as many user threads as necessary, and the corresponding kernel threads can run in parallel on a multiprocessor. (3) Also, when a thread performs a blocking system call, the kernel can schedule another thread for execution.