A n important class of concurrent objec t s are those that are lock-free, tha t is, whose operat ions are not conta ined wi th in mutua l ly exclusive critical sect ions . A lock-free object can be accessed by m a n y threads at a t ime , yet clever u p d a t e protocols based on a t o m i c C o m p a r e A n d S w a p operat ions guarantee the object ' s consistency. In th is paper we take a practical look at the C o m p a r e A n d S w a p operat ion in the context of contemporary shared m e m o r y mult iprocessors . We first describe an operating s y s t e m b a s e d so lut ion tha t permit s the construct ion of a non-blocking C o m p a r e A n d S w a p funct ion on processor architectures that only support lock-oriented a t o m i c primit ives . We then eva luate several locking strategies that can be used to synthes ize a C o m p a r e A n d S w a p operat ion . W e show that the c o m m o n techniques for reducing the overhead of lock-oriented synchronizat ion in the presence of content ion are inappropria te when used as the basis for lock-free synchronizat ion. We then describe a s imple modif icat ion t o an ex i s t ing synchronizat ion protocol which allows us to avoid much of the overhead normal ly assoc iated wi th content ion. This research was sponsored in part by a National Science Foundation Presidential Young Investigator Award (PYI), the Defense Advanced Research Projects Agency, Information Science and Technology Office, under the title "Research on Parallel Computing", ARPA Order No. 7330, issued by DARPA/CMO under Contract MDS972-90-C-0035 and in part by the Open Software Foundation (OSF). The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of NSF, DARPA, OSF, or the U.S. government.
[1]
Larry Rudolph,et al.
Dynamic decentralized cache schemes for mimd parallel processors
,
1984,
ISCA '84.
[2]
John Mellor-Crummey.
Concurrent Queues: Practical Fetch-and-Phi Algorithms.
,
1987
.
[3]
Maurice Herlihy,et al.
Axioms for concurrent objects
,
1987,
POPL '87.
[4]
Maurice Herlihy,et al.
Impossibility and universality results for wait-free synchronization
,
1988,
PODC '88.
[5]
Shreekant S. Thakkar,et al.
Synchronization algorithms for shared-memory multiprocessors
,
1990,
Computer.
[6]
Thomas E. Anderson,et al.
The Performance of Spin Lock Alternatives for Shared-Memory Multiprocessors
,
1990,
IEEE Trans. Parallel Distributed Syst..
[7]
Jeannette M. Wing,et al.
A Library of Concurrent Objects and Their Proofs of Correctness
,
1990
.
[8]
Maurice Herlihy,et al.
Linearizability: a correctness condition for concurrent objects
,
1990,
TOPL.
[9]
Maurice Herlihy,et al.
A methodology for implementing highly concurrent data structures
,
1990,
PPOPP '90.
[10]
Anoop Gupta,et al.
The directory-based cache coherence protocol for the DASH multiprocessor
,
1990,
ISCA '90.
[11]
Michael L. Scott,et al.
Algorithms for scalable synchronization on shared-memory multiprocessors
,
1991,
TOCS.
[12]
Brian N. Bershad,et al.
Mutual exclusion for uniprocessors
,
1991
.
[13]
Maurice Herlihy,et al.
Wait-free synchronization
,
1991,
TOPL.
[14]
Brian N. Bershad,et al.
Scheduler activations: effective kernel support for the user-level management of parallelism
,
1991,
TOCS.
[15]
Calton Pu,et al.
A Lock-Free Multiprocessor OS Kernel
,
1992,
OPSR.