This paper details the design of a scalable algorithm for the mutual exclusion problem. Starting by inserting a redundant assignment into Peterson's algorithm for two processes, we derive another algorithm that uses only local spins, i.e., a process busy-waits only on locally accessible shared variables. The new two-process algorithm is then adapted to serve as a building block of the complete tournament-like algorithm; the adaptation is such that the entire algorithm still uses only local spins, which is crucial for scalability. We consider the simplicity of the algorithm and its derivation to be the main contributions of this paper.
local spins mutual exclusion read/write atomicity refinement scalability
This is a preview of subscription content, log in to check access.
L. Lamport. A fast mutual exclusion algorithm. ACM Transactions on Computer Systems, 5(1):1–11, February 1987.CrossRefGoogle Scholar
N.A. Lynch. Distributed Algorithms. Morgan Kaufmann, 1996.Google Scholar
J.M. Mellor-Crummey and M.L. Scott. Algorithms for scalable synchronization on shared-memory multiprocessors. ACM Transactions on Computer Systems, 9(1):21–65, February 1991.CrossRefGoogle Scholar
G.L. Peterson. Myths about the mutual exclusion problem. Information Processing Letters, 12(3):115–116, June 1981.MATHCrossRefGoogle Scholar
G.L. Peterson and M.J. Fischer. Economical solutions for the critical section problem in a distributed system. In Proceedings of the 9th Annual ACM Symposium on Theory of Computing, pages 91–97, 1977.Google Scholar
J.-H. Yang and J.H. Anderson. A fast, scalable mutual exclusion algorithm. Distributed Computing, 9(1):51–60, 1995.CrossRefGoogle Scholar