login

Process Sleep and Wakeup on a Shared-memory Multiprocessor

Published 1 January 1991
Robert N. Pike, Dave Presotto, Ken Thompson, Gerard J. Holzmann
Citations9

TL;DR

The code for sleep and wakeup primitives is presented, exercised by years of active use and by a verification system, to synchronise processes on a symmetric shared-memory multiprocessor system.

Abstract

The problem of enabling a `sleeping' process on a shared-memory multiprocessor is a difficult one, especially if the process is to be awakened by an interrupt-time event. We present here the code for sleep and wakeup primitives that we use in our multiprocessor system. The code has been exercised by months of active use and by a verification system. Our problem is to synchronise processes on a symmetric shared-memory multiprocessor. Processes suspend execution, or sleep, while awaiting an enabling event such as an I/O interrupt. When the event occurs, the process is issued a wakeup to resume its execution. During these events, other processes may be running and other interrupts occurring on other processors. More specifically, we wish to implement subroutines called sleep, callable by a process to relinquish control of its current processor, and wakeup, callable by another process or an interrupt to resume the execution of a suspended process. The calling conventions of these subroutin...

Keywords

Computer Science