Michael Thome <[EMAIL PROTECTED]> writes:
> Yes - one would expect a general purpose hybrid/two-tier threading
> library to be at least at complex as the green threads implementation:
> presumably somewhat hairier.
I would go even further. If you are going to spend a huge amount of
effort to optimize your user-level thread implementation (i.e. the
top tier of the 2-tier system), why not push that implementation down
into the kernel and make it the only tier? In other words -- making
threads fast doesn't depend on whether those threads are implemented
in kernel space or user space. (The only difference is the cost of
crossing the user-kernel boundary, which is not high.)
Both implementations require access to low-level events (interrupts,
page faults, etc.) to be of use. The kernel scheduler already has access
to all of those events; all you are doing in a 2-tier implementation is
somehow exposing those events to the user in a very coarse-grained and
expensive way (e.g., using signals). In the end your user-level scheduler
does all of the same work and knows about the same things as the kernel
scheduler; why not just optimize kernel threads and be done with it?
Matt Welsh
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]