Tools and Techniques for Building Fast Portable Threads Packages (91KB) UW-CSE-93-05-06.

By David Keppel


Threads are units of concurrent execution that can be viewed as abstract data types (ADTs) with operations to initialize and run them. It is common to improve performance by hard-coding allocation and scheduling policies, but that has led to the development of many threads packages, each with policies tuned for a particular set of applications. Further, the machine-dependence of threads packages restricts the availability of applications built on top of them. This paper examines techniques for building threads packages and discusses tradeoffs between performance, flexibility, and portability. It then introduces QuickThreads, a simple threads toolkit with a portable interface. This paper shows how QuickThreads can be used to implement a basic uniprocessor threads package and discusses the implementation of portable threads packages tuned to the needs of particular applications. For example, QuickThreads can be used to build barrier synchronization that runs in O(lg2 processors) time units instead of the traditional O(lg2 threads). This paper also reports on the performance and implementation of QuickThreads and describes some experiences using it to reimplement and port existing multiprocessor threads packages.

%A David Keppel
%T Tools and Techniques for Building Fast Portable Threads Packages
%R UWCSE 93-05-06
%I University of Washington Department of Computer Science and Engineering
%D May 1993

    author={David Keppel},
    title={Tools and Techniques for Building Fast Portable Threads Packages},
    number={UWCSE 93-05-06},
    institution={University of Washington Department of Computer
                 Science and Engineering},
The QuickThreads source code currently has implementations for the DEC AXP (Alpha), Intel 80x86, Hewlett Packard HP-PA, MIPS Rx000, Motorola 88000, SPARC (Designed by Sun but now officially managed by SPARC International), and DEC VAX, plus limited support for the Kendall Square Research KSR-1 and KSR-2.

An older version is also available, because there's bound to be obscure problems with the new version.

It's usually pretty simple to port QuickThreads. if you'd like to write code for another target, send e-mail to Some retargets have already been started.

See also: