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 language | English |
---|---|
Title of host publication | 21st International Conference on Principles of Distributed Systems, OPODIS 2017 |
Editors | James Aspnes, Joao Leitao, Alysson Bessani, Pascal Felber |
Publisher | Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing |
ISBN (Electronic) | 9783959770613 |
DOIs | |
State | Published - 1 Mar 2018 |
Externally published | Yes |
Event | 21st International Conference on Principles of Distributed Systems, OPODIS 2017 - Lisboa, Portugal Duration: 18 Dec 2017 → 20 Dec 2017 |
Publication series
Name | Leibniz International Proceedings in Informatics, LIPIcs |
---|---|
Volume | 95 |
ISSN (Print) | 1868-8969 |
Conference
Conference | 21st International Conference on Principles of Distributed Systems, OPODIS 2017 |
---|---|
Country/Territory | Portugal |
City | Lisboa |
Period | 18/12/17 → 20/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