Threading arch quetions

Julian Elischer julian at
Mon Dec 4 13:57:56 PST 2006

Joshua M wrote:
> Hello,
> Sorry for disturbing but i have some questions concerning threaded arch 
> in FreeBSD.
> Sorry for possible repeating also.
> 1. What was primary concern when adopting KSE based threading model ?

We adopted a scheme which would allow us to implement both M:N threads
and 1:1 threads with compatible libraries that do it each way.
The hope was that this would allow people to experiment with these.
and for us to be able to select the best approach.

After a couple of years, the general consensus is that M:N threads
has added complexity that keeps it from reaching it's theoretical

There are examples where M:N outperforms 1:1 but they are the
minority, so we will be switching the default library to
1:1 threads and making the M:N library available to those
applications for which it makes more sense. We will continue
to keep M:N threading available where it is currently supported,
but there are a lot of complexities that make things like correct 
statistics (per thread) and debugging, to be more difficult in M:N 

Note that the kernel support for threads is the same for both models,
where processes have sub-entities (kernel schedulable entities) called 
threads, as opposed to in Linux where each thread is a separate process.

> 2. Is there benchmarks comparing Linux's NPTL and KSE based pthreads in 
> FreeBSD ?

Not generally..there are some that show performance problems with
the FreeBSD threads and there is an ongoing project to improve the

> Thank you.
> _________________________________________________________________
> Windows Live Messenger sur i-mode™ : dialoguez avec vos amis depuis 
> votre mobile comme sur PC !
> _______________________________________________
> freebsd-threads at mailing list
> To unsubscribe, send any mail to "freebsd-threads-unsubscribe at"

More information about the freebsd-threads mailing list