# What is the purpose of M:N (Hybrid) threading?

In other words, what advantages does Hybrid threading have over 1:1 (kernel only) and N:1 (user only) threading?

This is a follow-up to What is the difference between user-level threads and kernel-level threads?

– Raphael
Apr 6, 2012 at 11:03
• Um, that you get the benefits of both? (@Raphael Done.) Apr 6, 2012 at 11:31
• Also, the Wikipedia article seems to list some (dis)advantage. What specificly are you looking for?
– Raphael
Apr 6, 2012 at 11:42

In thread pool, you are using $N$ kernel threads to execute $M$ “tasks”, where $M$ can be much higher than $N$. The advantage over using one thread for each task (kernel only threading) is that you consume less resources, like memory (both virtual and physical) and kernel objects (at least in the specific case of Windows threads, but I imagine other OSes are similar in this regard). You also get less context switches, which increases performance (in the ideal case, where you have as many running threads as you have processors, you may have almost no context switches).