Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 Jan 1999 14:49:24 -0800
From:      Jason Evans <jasone@canonware.com>
To:        Kelly Yancey <kbyanc@freedomnet.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: pthreads question/problem...
Message-ID:  <369296F4.AE24010B@canonware.com>
References:  <Pine.BSF.4.05.9812281837110.2148-100000@bright.fx.genx.net> <36881978.CFE748CD@freedomnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Kelly Yancey wrote:
> > one more thing, a dirty secret in FreeBSD is that all threads are done as
> > ONE process, if you have multiple CPUs you do not gain the advantage of
> > multiple processors, you have to design a hybrid fork/thread model.
> >
> 
>   Argh. Is this going to be fixed in 3.0? Does anyone intend on fixing
> it? I mean, even Linux has kernel support for threads, I should think
> that FreeBSD...the king of server OS'es...could at least do the same.
> For the time being this isn't a problem, as I only have a single CPU,
> but I'm really going to need FreeBSD to support scheduling threads on
> separate processors by the time I finish the project. I *really* like
> FreeBSD, but if I have to I suppose Linux will be the target platform if
> 3.0 can't schedule threads independantly.

Things aren't quite that simple.  Linux's 1-1 kernel threads model has some
problems, such as slow thread switching (as compared to a user-land threads
implementation), slow thread creation, and some scalability issues I've
noticed when creating large numbers of threads.

To ask if FreeBSD's threads library is going to be "fixed" to work like
Linux's threads library is IMO a poor question, since my observation has
been that there are more performance problems that reach out and bite the
programmer with LinuxThreads than with FreeBSD's user-land threads.

Implementing a threads library that performs well for a wide range of
applications is a very difficult (though feasible) task.  Thus far, none of
the free OSes have come up with such a beast.

Jason

-- 
Jason Evans
Email: [jasone@canonware.com]
Web: [http://www.canonware.com/~jasone]
Home phone: [(650) 856-8204]
Work phone: [(415) 808-8742]
Quote: ["Invention is 1% inspiration and 99% perspiration" - Thomas Edison]

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?369296F4.AE24010B>