Subject: NetBSD now has native pthreads!
To: None <email@example.com>
From: Jan Schaumann <firstname.lastname@example.org>
Date: 01/19/2003 17:14:49
After NetBSD supports symmetric multiprocessing (SMP) on a number of
systems for some time now, support for native threads was added by merging
the nathan_sw branch that contains a Scheduler Activations based threads
implementation by Nathan Williams and Jason Thorpe.
SMP means running processes on more than one CPU in parallel. (With some
care-taking from the kernel that both CPUs don't step on each other with
respect to writing to kernel data structures etc.).
Threading means splitting up a process into several (well :) threads, and
let them run on either one or more than one CPU. This is basically an
application-layer issue, in contrast to SMP which happens inside the
kernel. Having SMP available helps for performance in threads systems as
threads can be ran in parallel on several CPUs, but SMP is not strictly
necessary for a threaded system.
Many applications today use a threaded software architecture (over the
classical Unix "fork"ed processes), and so having some efficient threads
implementation is an important goal of the NetBSD project.
With the Scheduler Activations based work that Jason and Nathan made, this
is a very efficient implementation that can map N userland threads to M
kernel threads, and there is no need to have one kernel thread for each
userland thread, like some other systems (used to?) have, and which kills
performance for many threads.
With native threads now available in NetBSD-current, applications from
pkgsrc will readily pick it up upon rebuild, and things will be fixed over
the coming time.
For instructions on how to port existing applications and to use threads
in your own programs using the new libpthreads that come with NetBSD now,
(Thanks to Hubert Feyrer <email@example.com> for the detailed press
Multiarchitecture OS, no hype required.