iBet uBet web content aggregator. Adding the entire web to your favor.
iBet uBet web content aggregator. Adding the entire web to your favor.



Link to original content: https://doi.org/10.1007/3-540-36108-1_18
A Practical Multi-word Compare-and-Swap Operation | SpringerLink
Skip to main content

A Practical Multi-word Compare-and-Swap Operation

  • Conference paper
  • First Online:
Distributed Computing (DISC 2002)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2508))

Included in the following conference series:

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. S. V. Adve and K. Gharachorloo. Shared memory consistency models: a tutorial. IEEE Computer, 29(12):66–76, Dec. 1996.

    Google Scholar 

  2. J. H. Anderson and M. Moir. Universal constructions for multi-object operations. In Proc. 14th PODC, pp 184–193, Aug. 1995.

    Google Scholar 

  3. J. H. Anderson, S. Ramamurthy, and R. Jain. Implementing wait-free objects on priority-based systems. In Proc. 16th PODC, pp 229–238, Aug. 1997.

    Google Scholar 

  4. D. L. Detlefs, C. H. Flood, A. T. Garthwaite, P. A. Martin, N. N. Shavit, and G. L. Steele Jr. Even better DCAS-based concurrent deques. In Proc. 14th DISC, LNCS 1914, pp 59–73, Oct. 2000.

    Google Scholar 

  5. M. Greenwald. Non-blocking synchronization and system design. PhD thesis, Stanford University, Aug. 1999.

    Google Scholar 

  6. T. L. Harris. A pragmatic implementation of non-blocking linked lists. In Proc. 15th DISC, LNCS 2180, pp 300–314, Oct. 2001.

    Google Scholar 

  7. M. Herlihy. A methodology for implementing highly concurrent data objects. ACM TOPLAS, 15(5):745–770, Nov. 1993.

    Google Scholar 

  8. M. Herlihy, V. Luchangco, and M. Moir The repeat offender problem: a mechanism for supporting dynamic-sized, lock-free data structures. In Proc. 16th DISC, 2002.

    Google Scholar 

  9. G. J. Holzmann. The model checker SPIN. IEEE Transactions on Software Engineering, 23(5):279–295, May 1997.

    Google Scholar 

  10. A. Israeli and L. Rappoport. Disjoint-access-parallel implementations of strong shared memory primitives. In Proc. 13th PODC, pp 151–160, Aug. 1994.

    Google Scholar 

  11. H. Massalin and C. Pu. A lock-free multiprocessor OS kernel. Technical Report CUCS-005-91, Columbia University, Department of Computer Science, June 1991.

    Google Scholar 

  12. J. M. Mellor-Crummey and M. L. Scott. Algorithms for scalable synchronization on shared-memory multiprocessors. ACM TOCS, 9(1):21–65, Feb. 1991.

    Google Scholar 

  13. M. M. Michael. Safe memory reclamation for dynamic lock-free objects using atomic reads and writes. In Proc. 21st PODC, July 2002.

    Google Scholar 

  14. M. Moir. Practical implementations of non-blocking synchronization primitives. In Proc. 16th PODC, pp 219–228, Aug. 1997.

    Google Scholar 

  15. M. Moir. Transparent support for wait-free transactions. In Distributed Algorithms, 11th International Workshop, LNCS 1320, pp 305–319, Sept. 1997.

    Chapter  Google Scholar 

  16. N. N. Shavit and D. Touitou. Software transactional memory. In Proc. 14th PODC, pp 204–213, Aug. 1995.

    Google Scholar 

  17. J. D. Valois. Lock-free linked lists using compare-and-swap. In Proc. 14th PODC pp 214–222, Aug. 1995.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2002 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Harris, T.L., Fraser, K., Pratt, I.A. (2002). A Practical Multi-word Compare-and-Swap Operation. In: Malkhi, D. (eds) Distributed Computing. DISC 2002. Lecture Notes in Computer Science, vol 2508. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-36108-1_18

Download citation

  • DOI: https://doi.org/10.1007/3-540-36108-1_18

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-00073-0

  • Online ISBN: 978-3-540-36108-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics