Kamal R. Prasad kamalpr at
Mon Mar 7 11:34:59 GMT 2005

--- Steve Watt <steve at Watt.COM> wrote:
> In
<20050306101423.44745.qmail at>,
> >N)?
> "Problem"?  Scheduler activations may be used to
> build M:N
> systems, but that is not a requirement -- you can
> easily
> build a 1:1 (all threads are system contention
> scope) system
> with activations.
But the POSIX std allows one to specify that the
thread be either process scope or system scope, and if
some of them are system/process scope -that leads to
an M:N system.

> Admittedly, at this point in industry experience,
> most
> threads experts will say that M:N threading usually
> isn't
> worth the implementation headaches.  But there are

Hmm -so no implementation can provide a good M:N

> convenience.  Very many processes with thousands of
> threads
> in them will drag down a 1:1 system pretty rapidly.
I get the idea that not everyone in the pthreads-user
community is content with a 1:1 model (though I would

> handle contention scope correctly.  I don't think
> anyone
> has built such a system, but would be happy to be
> proven
> wrong -- it'd be a useful advancement of the art. 

Isn't a system supporting both process/system scope a
POSIX requirement?
BTW -the std sounds weird to me at times. They want to
treat a process as a shell with a single
(hypothetical) thread in it -and their scheduling
classes don't have a 1:1 correspondence to the unix
scheduler. SCHED_RR is a realtime scheduling class but
I mistook it for a round robin scheduler:-).

> One
> challenge is accounting for time on threads that
> don't do
> much work when awakened before going back to sleep
If every kernel thread were to be treated at par with
a process, we wouldn't need a special algorithm.


Kamal R. Prasad
UNIX systems consultant 
kamalp at

In theory, there is no difference between theory and practice. In practice, there is:-).

Celebrate Yahoo!'s 10th Birthday! 
Yahoo! Netrospective: 100 Moments of the Web

More information about the freebsd-hackers mailing list