Subject: Re: Pthreads...
To: John Clark <j1clark@ucsd.edu>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: netbsd-users
Date: 04/10/2002 08:05:21
On Wed, Apr 10, 2002 at 07:50:33AM -0700, John Clark wrote:

 > and how NetBSD pthreads differed from whatever other implementations
 > are in use?

The new NetBSD pthreads implementation (being developed on the nathanw_sa
branch of the source tree) uses Solaris-style LWPs + Scheduler Activations
(for more information on how they work, just google for "scheduler
activations", and you'll get pointers to several papers on the topic).

That code is not yet in the mainline sources, but it is available for you
to play with on that branch.

 > Anyway, I have some code which runs on a linux box, 2.2.16-smp to be more
 > specific, however, does not run correctly on the NetBSD 1.5.2, using the
 > PTL package (vers 2.0 or so).
 > 
 > I have not found the offending lines of code, but thought I'd put out 
 > this
 > message to see if there were some well known differences between the
 > linux implementation and *BSD implementations (the same effect occurs
 > in FreeBSD as well).

Well, both PTL and FreeBSD pthreads are all-userland implementations.  This
has certain drawbacks.  OTOH, LinuxThreads also has certain drawbacks.

We (obviously) believe that Nathan's Scheduler Activations-based pthreads
package is far better, and preliminary rest results seem to support that
claim.

What is your application?  If you want help running the nathanw_sa code
on your system, I'd be glad to try and help you along (which reminds me,
I need to set up a nathanw_sa userland for one of my ARM systems again).

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>