Subject: Re: Multithreading package for NetBSD
To: None <tech-kern@netbsd.org>
From: Matthew Mondor <mmondor@gobot.ca>
List: tech-kern
Date: 10/11/2002 03:21:40
On Thu, 10 Oct 2002 12:45:01 -0600
kyle.unice@L-3com.com wrote:
> After looking around for some time, it is not clear what is the
> library/package of choice for multithreading applications on NetBSD.
> There is an unproven-pthreads library and a GNU pth library in the
> packages collection. pthreads seems to be what most code uses, yet the
> NetBSD library is marked as "unproven" ... ( making me alittle nervous
> ). What do most programmers use to multithread an application on
> NetBSD?
The library which seems to work the best for me consists of GNU Pth,
although of course it does not use preemptive scheduling. Although there
are various provided hacks to provide thread-safe functions which do not
block the whole process, it seemed better overall to use the pth_
functions for I/O rather than conventional syscall function names... And
of course threads that are aware that they are starving other threads (but
not calling any pth_ function which would cause that thread to sleep,
allowing others to be rescheduled), need to explicitely call pth_yield().
The nathan-sa branch work will hopefully solve most of this. Rather than
user-space thread library which cannot take advantage of SMP systems, it
uses scheduler activations...
Matt