Re: [ANNOUNCE] Native POSIX Thread Library 0.1

Peter Chubb
2002-09-24T02:47:09Z

>>>>> "Mark" == Mark Mielke <mark@mark.mielke.cc> writes:

Mark> On Mon, Sep 23, 2002 at 11:08:53PM +0200, Peter Wächtler wrote:
Mark> Think of it this way... two threads are blocked on different
Mark> resources... The currently executing thread reaches a point
Mark> where it blocks.

Mark> OS threads: 1) thread#1 invokes a system call 2) OS switches
Mark> tasks to thread#2 and returns from blocking

Mark> user-space threads: 1) thread#1 invokes a system call 2)
Mark> thread#1 returns from system call, EWOULDBLOCK 3) thread#1
Mark> invokes poll(), select(), ioctl() to determine state 4) thread#1
Mark> returns from system call 5) thread#1 switches stack pointer to
Mark> be thread#2 upon determination that the resource thread#2 was
Mark> waiting on is ready.

No way! THe Solaris M:N model notices when all threads belonging to a
process have blocked, and wakes up the master thread, which can then
create a new kernel thread if there are any user-mode threads that can
do work.

PeterC