Skip to main content
Top

2002 | OriginalPaper | Chapter

A Practical Multi-word Compare-and-Swap Operation

Authors : Timothy L. Harris, Keir Fraser, Ian A. Pratt

Published in: Distributed Computing

Publisher: Springer Berlin Heidelberg

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Work on non-blocking data structures has proposed extending processor designs with a compare-and-swap primitive, CAS2, which acts on two arbitrary memory locations. Experience suggested that current operations, typically single-word compare-and-swap (CAS1), are not expressive enough to be used alone in an efficient manner. In this paper we build CAS2 from CAS1 and, in fact, build an arbitrary multi-word compare-and-swap (CASN). Our design requires only the primitives available on contemporary systems, reserves a small and constant amount of space in each word updated (either 0 or 2 bits) and permits nonoverlapping updates to occur concurrently. This provides compelling evidence that current primitives are not only universal in the theoretical sense introduced by Herlihy, but are also universal in their use as foundations for practical algorithms. This provides a straightforward mechanism for deploying many of the interesting non-blocking data structures presented in the literature that have previously required CAS2.

Metadata
Title
A Practical Multi-word Compare-and-Swap Operation
Authors
Timothy L. Harris
Keir Fraser
Ian A. Pratt
Copyright Year
2002
Publisher
Springer Berlin Heidelberg
DOI
https://doi.org/10.1007/3-540-36108-1_18

Premium Partner