There are three thread models that are used in thread scheduling implementations usually done by OS Kernels. One of them is the hybrid (M:N
) model in which some N
application threads are mapped to M
kernel threads so that they can use up to M
processors. There are pros and cons to this model. One of the advantages is that the languages that are based on this model will introduce a language level scheduler implementation that is responsible for management and scheduling the application-level threads.
First of all read this: http://www.kegel.com/c10k.html#1:1
Linux uses 1:1 threading model starting from kernel 2.6 (NPTL Native Posix threading library) and today almost all OSes move to this model:
Once Linux had M:N model (this was in 2.4 NGPT) but 1:1 is generally superior.
The biggest problem with M:N model is:
One of them is the hybrid (M:N) model in which some N threads of an application are mapped to some M available processors.
Small correction - N application threads mapped to M kernel threads so they can use up to M processors.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With