Many-to-Many threads (was Re: Interesting analysis of linux kernel threading by IBM)
Dan Creswell
dan.creswell en familiar.co.uk
Mar Ene 25 03:39:33 CST 2000
Okay, I've tried to keep abreast of the whole discussion - now I have a
question based on some of the observations made concerning mapping
user-level threads onto kernel threads.
>From the LinuxThreads FAQ:
The "many-to-many" model combines both kernel-level and user-level
scheduling: several kernel-level threads run concurrently, each
executing a user-level scheduler that selects between user
threads. Most commercial Unix systems (Solaris, Digital Unix, IRIX)
implement POSIX threads this way. This model combines the advantages of
both the "many-to-one" and the "one-to-one" model,
and is attractive because it avoids the worst-case behaviors of both
models -- especially on kernels where context switches are expensive,
such as Digital Unix. Unfortunately, it is pretty complex to
implement, and requires kernel support which Linux does not provide.
Linus Torvalds and other Linux kernel developers have always been
pushing the "one-to-one" model in the name of overall simplicity,
and are doing a pretty good job of making kernel-level context switches
between threads efficient. LinuxThreads is just following the general
direction they set.
---------------------------------------
Let's skip the (possibly) contentious bit about who's pushing what model
= what about these inadequacies in the kernel? Does anyone have any
idea what these might be?
With respect to having a decent Java implementation, it would appear
desirable that the kernel provide some support for many-to-many mapping
of threads. What do you think? Is it worth doing? If not, why not?
Basically, I'd like to pull the discussion away from the benchmarking
thing and talk architecture.
Hope I'm not wasting bandwidth,
Dan.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Más información sobre la lista de distribución Ayuda