Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jan 1999 15:51:13 -0800 (PST)
From:      Julian Elischer <julian@whistle.com>
To:        Jason Evans <jasone@canonware.com>
Cc:        Kelly Yancey <kbyanc@freedomnet.com>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: pthreads question/problem...
Message-ID:  <Pine.BSF.3.95.990105154902.1745C-100000@current1.whistle.com>
In-Reply-To: <369296F4.AE24010B@canonware.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On Tue, 5 Jan 1999, Jason Evans wrote:

> 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.

In fact we have a port of the linux threads to FreeBSD so we can do
EXACTLY what they do, including the kernel support. It's being worked on
as we speak. Some is already committed to -current. There is little
argumant however that the ultimate is to schedule N threads over M
processes where M is related to teh number of CPUs available.



> 
> 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
> 


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?Pine.BSF.3.95.990105154902.1745C-100000>