Michael Thome <[EMAIL PROTECTED]> writes:
> I think the best answer is to do the second tier threading in userspace
> (best would be in glibc).  

While on the surface this looks like the simple solution, in practice it
is very difficult to do. It requires that any operation that might block
the underlying kernel thread (such as a disk or socket I/O) be actually
made non-blocking and the appropriate call to the thread scheduler made
at the point where the block would occur. This adds a great deal of 
complexity, as evidenced by the implementation of green threads itself.

Also, if you really want this to work, you need to inform the user-level
thread scheduler whenever a kernel thread might block - such as during a
page fault. While something like scheduler activations addresses this, it's
not easy to build.

Matt Welsh, UC Berkeley


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to