1:N threading

Peter Wemm peter at wemm.org
Thu Apr 3 12:55:13 PST 2003


"Geoffrey C. Speicher" wrote:
> OK, so we've got 1:N threading (libc_r), 1:1 threading (thr), and M:N
> threading (KSE).  Each model has its own merit depending on the
> application.
> 
> However, it would still be nice if the 1:N model didn't block the whole
> process when a thread blocks.  Is there any reason to hold onto a pure
> userland implementation of 1:N?  Can libc_r be implemented in terms of
> KSE?

It probably could be extended to recover context when it blocks, but by the
time you go that far you may as well just remove the select() wrappers and
use the context recovery in the default case.  And then you're most of the
way to libkse anyway, the main remaining difference would be to allow more
than one execution point at a time.

FWIW, libkse has got large chunks of libc_r in it.  So has libthr.

Cheers,
-Peter
--
Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5



More information about the freebsd-threads mailing list