StackThreads/MP: version 0.77 User's Guide
StackThreads/MP is a library that supports fine-grain multithreading in
GCC/G++. It is supplied as a set of C library routines that are callable
from any GCC/G++ code that satisfies a few conditions described
later. It supports dynamic thread migration on multiprocessor systems,
assuming cache-coherent shared-memory.
Unlike traditional user-level thread libraries (e.g., Pthreads), it
tolerates a large number of (say, 10,000 or much more) threads and
imposes a very small overhead for creating and terminating a thread. The
programmer can create a new thread of control upon any procedure call
and a thread creation usually adds only a few instructions to the
procedure call. StackThreads/MP thus allows a programming style in which
the programmer assigns a thread to a unit of work that s/he considers
natural, and spawns them dynamically when needed.
The net result is that, using fine-grain threads, you can reduce the
cost of building a parallel program, either from scratch or from an
existing sequential source, and the cost of maintenance. It is also
useful as a compilation target of higher-level parallel programming
languages.