Re: Threads question

David S. Miller (davem@jenolan.rutgers.edu)
Fri, 25 Apr 1997 17:35:51 -0400


From: hpa@transmeta.com (H. Peter Anvin)
Date: 25 Apr 1997 21:02:29 GMT

In newsgroup: linux.dev.kernel
> does linuxThreads mix kernel and user-mode threads like solaris
> threads? if not, how does one do this?

Simple: use a library wrapper like a standard user-mode threading
package, and use a pool of kernel threads to schedule between.

And this is completely broken, even though this is what all the
various unix vendors do.

There should be one kernel clone thread per user thread, with no
exceptions. Why? The answer is signals... trying to keep signal
semantics straight in a user thread scheduler where # user threads !=
# kernel threads is so complex as to be undesirable (ie. bad design
decision to do it this way in the first place)

Linux can schedule, create, and destroy clone threads nearly as fast
as any user level scheme could, therefore there is really no gain in
this scheme, only added complexity. I am not alone in this, Linus and
others like McVoy agree heavily on this one as well.

---------------------------------------------////
Yow! 11.26 MB/s remote host TCP bandwidth & ////
199 usec remote TCP latency over 100Mb/s ////
ethernet. Beat that! ////
-----------------------------------------////__________ o
David S. Miller, davem@caip.rutgers.edu /_____________/ / // /_/ ><