lkwt in DragonFly

Miguel Mendez flynn at energyhq.es.eu.org
Tue Feb 10 02:00:14 PST 2004


Jeroen Ruigrok/asmodai wrote:

I prefer to go with a hybrid method.  1:1 doesn't work.
Could you elaborate on that? I agree that the prefered implementation is
something KSE/SA alike, but Solaris is moving to 1:1 after years of 
trying to make N:M work properly. The main problem I see with 1:1 
threading is kernel memory usage on heavily threaded applications, but 
other than that? Implementation is a lot simpler than in the N:M case. 
The SA idea looks very good on paper until you start implementing and 
see it's actually pretty hard work to get it functioning properly.

I've got some papers I've been reading on threads lately which I'll
put in a follow-up tonight.
I assume you've read the Scheduler Activations, which is the basis for 
NetBSD's threading implementation.

Basically it shows that pure userland threads have pros and cons,
pure kernel threads have pros and cons and a hybrid mapping is the
best of both worlds on a number of areas.
Pure userland is fast, but if a thread blocks on i/o your entire process 
does. That seems to be the main rationale behind N:M designs. Having a 
threading system that doesn't have the contention of user->kernel 
switches for thread scheduling and, on the other side, be able to keep 
going when a thread blocks in a syscall.

Cheers,
--
	Miguel Mendez <flynn at xxxxxxxxxxxxxxxxxx>
	http://www.energyhq.es.eu.org
	PGP Key: 0xDC8514F1





More information about the Kernel mailing list