Subject: Re: pkg/10704
To: Simon Burge <simonb@wasabisystems.com>
From: Nathan J. Williams <nathanw@MIT.EDU>
List: port-alpha
Date: 02/14/2001 16:59:58
nathanw@MIT.EDU (Nathan J. Williams) writes:

> There is another option, which is to implement a restartable region of
> code for a program. I don't have the paper reference handy; I'll dig
> it out at work tomorrow..

Brian N. Bershad, David D. Redell, John R. Ellis. Fast Mutual
Exclusion for Uniprocessors, presented at ASPLOS V, October 1992.

Abstract (from 
http://www.cs.cmu.edu/afs/cs/project/mach/public/www/doc/abstracts/Rcs.html):

"In this paper we describe restartable atomic sequences, an optimistic
mechanism for implementing simple atomic operations (such as Test-And-
Set) on a uniprocessor. A thread that is suspended within a
restartable atomic sequence is resumed by the operating system at teh
beginning of the sequence, rather than at the point of
suspension. This guarantees that the thread eventually executes the
sequence atomically. A restartable atomic sequence has significantly
less overhead than other software-based synchronization mechanisms,
such as kernel emulation or software reservation. Consequently, it is
an attractive alternative for use on uniprocessors that do not support
atomic operations. Even on processors that do support atomic
operations in hardware, restartable atomic sequences can have lower
overhead.

"We describe different implementation of restartable atomic sequences
for the Mach 3.0 and Taos operating systems. These systems' thread
management packages rely on atomic operations to implement
higher-level mutual exclusion facilties. We show that improving the
performance of low-level atomic operations, and therefore mutual
exclusion mechanisms, improves application perfomance."


The full paper is at
http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/published/Rcs.ps

        - Nathan