An Efficient Kernel-Based Implementation of POSIX Threads
Robert A. Alfieri
Data General Corporation
Abstract
This paper describes the kernel-based implementation of POSIX Threads
(Pthreads) in the DG/UX operating system. The implementation achieves
time efficiency by using a general-purpose trap mechanism, known as a
Kernel Function Call (KFC), that carries an order of magnitude less
overhead than a traditional system call. On a 50 MHz Motorola MC88110,
the implementation can create and exit a thread (with the associated
context switch) in 8.1 microseconds and yield to another thread in 4.0
microseconds. The implementation also achieves space efficiency by
paging and decoupling bulky data structures.
The advantages of a kernel-based implementation include design
simplicity, less code redundancy, optimization of global
(interprocess) operations, avoidance of inopportune preemption, and
global semantic flexibility. The disadvantage is a monolithic design
that lacks user-level flexibility.
Download the full text of this paper in
ASCII (56,614 bytes) and
POSTSCRIPT (120,651 bytes) form.
To Become a USENIX Member, please see our
Membership Information.