Subject: Re: So I'll bite. M:N w/o SA - how?
To: None <tech-kern@netbsd.org>
From: Bucky Katz <bucky@picovex.com>
List: tech-kern
Date: 02/22/2007 10:42:51
Joerg Sonnenberger <joerg@britannica.bec.de> writes:

> On Wed, Feb 21, 2007 at 11:40:24AM -0800, Bucky Katz wrote:
>> Bill Studenmund <wrstuden@netbsd.org> writes:
>> > When a thread blocks in the kernel, you'd like to run something
>> > else on that thread, no?
>> 
>> Yes. This is why I don't believe you can accomplish this entirely
>> in userland.
>
> That's the point where I disagree. I do not think it is necessary to do
> that or even helpful. Let blocking events block the lwp.  When you took
> the time for a trap, the context switching overhead is reasonably small.

In the uniprocessor case M:N degenerates to N:1, in practice. If I let
the 1 lwp block, how do I get any of the other threads scheduled?