License: Creative Commons Attribution 3.0 Unported license (CC BY 3.0)
When quoting this document, please refer to the following
DOI: 10.4230/LIPIcs.DISC.2020.4
URN: urn:nbn:de:0030-drops-130827
URL: http://dagstuhl.sunsite.rwth-aachen.de/volltexte/2020/13082/
Go to the corresponding LIPIcs Volume Portal


Guerraoui, Rachid ; Kogan, Alex ; Marathe, Virendra J. ; Zablotchi, Igor

Efficient Multi-Word Compare and Swap

pdf-format:
LIPIcs-DISC-2020-4.pdf (0.6 MB)


Abstract

Atomic lock-free multi-word compare-and-swap (MCAS) is a powerful tool for designing concurrent algorithms. Yet, its widespread usage has been limited because lock-free implementations of MCAS make heavy use of expensive compare-and-swap (CAS) instructions. Existing MCAS implementations indeed use at least 2k+1 CASes per k-CAS. This leads to the natural desire to minimize the number of CASes required to implement MCAS.
We first prove in this paper that it is impossible to "pack" the information required to perform a k-word CAS (k-CAS) in less than k locations to be CASed. Then we present the first algorithm that requires k+1 CASes per call to k-CAS in the common uncontended case. We implement our algorithm and show that it outperforms a state-of-the-art baseline in a variety of benchmarks in most considered workloads. We also present a durably linearizable (persistent memory friendly) version of our MCAS algorithm using only 2 persistence fences per call, while still only requiring k+1 CASes per k-CAS.

BibTeX - Entry

@InProceedings{guerraoui_et_al:LIPIcs:2020:13082,
  author =	{Rachid Guerraoui and Alex Kogan and Virendra J. Marathe and Igor Zablotchi},
  title =	{{Efficient Multi-Word Compare and Swap}},
  booktitle =	{34th International Symposium on Distributed Computing (DISC 2020)},
  pages =	{4:1--4:19},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-168-9},
  ISSN =	{1868-8969},
  year =	{2020},
  volume =	{179},
  editor =	{Hagit Attiya},
  publisher =	{Schloss Dagstuhl--Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/opus/volltexte/2020/13082},
  URN =		{urn:nbn:de:0030-drops-130827},
  doi =		{10.4230/LIPIcs.DISC.2020.4},
  annote =	{Keywords: lock-free, multi-word compare-and-swap, persistent memory}
}

Keywords: lock-free, multi-word compare-and-swap, persistent memory
Collection: 34th International Symposium on Distributed Computing (DISC 2020)
Issue Date: 2020
Date of publication: 07.10.2020


DROPS-Home | Fulltext Search | Imprint | Privacy Published by LZI