Mutual exclusion algorithms with constant RMR complexity and wait-free exit code

Rotem Dvir, Gadi Taubenfeld

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

Two local-spinning queue-based mutual exclusion algorithms are presented that have several desired properties: (1) their exit codes are wait-free, (2) they satisfy FIFO fairness, (3) they have constant RMR complexity in both the CC and the DSM models, (4) it is not assumed that the number of processes, n, is a priori known, that is, processes may appear or disappear intermittently, (5) they use only O(n) shared memory locations, and (6) they make no assumptions on what and how memory is allocated. The algorithms are inspired by J. M. Mellor-Crummey and M. L. Scott famous MCS queuebased algorithm [13] which, except for not having a wait-free exit code, satisfies similar properties. A drawback of the MCS algorithm is that executing the exit code (i.e., releasing a lock) requires spinning - a process executing its exit code may need to wait for the process that is behind it in the queue to take a step before it can proceed. The two new algorithms overcome this drawback while preserving the simplicity and elegance of the original algorithm. Our algorithms use exactly the same atomic instruction set as the original MCS algorithm, namely: read, write, fetch-and-store and compare-and-swap. In our second algorithm it is possible to recycle memory locations so that if there are L mutual exclusion locks, and each process accesses at most one lock at a time, then the algorithm needs only O(L+n) space, as compared to O(Ln) needed by our first algorithm.

Original languageEnglish
Title of host publication21st International Conference on Principles of Distributed Systems, OPODIS 2017
EditorsJames Aspnes, Joao Leitao, Alysson Bessani, Pascal Felber
PublisherSchloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
ISBN (Electronic)9783959770613
DOIs
StatePublished - 1 Mar 2018
Externally publishedYes
Event21st International Conference on Principles of Distributed Systems, OPODIS 2017 - Lisboa, Portugal
Duration: 18 Dec 201720 Dec 2017

Publication series

NameLeibniz International Proceedings in Informatics, LIPIcs
Volume95
ISSN (Print)1868-8969

Conference

Conference21st International Conference on Principles of Distributed Systems, OPODIS 2017
Country/TerritoryPortugal
CityLisboa
Period18/12/1720/12/17

Bibliographical note

Publisher Copyright:
© 2017 Rotem Dvir and Gadi Taubenfeld.

Keywords

  • Cache coherent
  • Distributed shared memory
  • Local-spinning
  • Locks
  • Mutual exclusion
  • RMR complexity

Fingerprint

Dive into the research topics of 'Mutual exclusion algorithms with constant RMR complexity and wait-free exit code'. Together they form a unique fingerprint.

Cite this