Deriving a scalable algorithm for mutual exclusion

  • Yih-Kuen Tsay
Contributed Papers
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1499)


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 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    T.E. Anderson. The performance of spin lock alternatives for shared-memory multiprocessors. IEEE Transactions on Parallel and Distributed Systems, 1(1):6–16, January 1990.CrossRefGoogle Scholar
  2. 2.
    M. Choy and A.K. Singh. Adaptive solutions to the mutual exclusion problem. Distributed Computing, 8(1):1–17, 1994.CrossRefGoogle Scholar
  3. 3.
    E.W. Dijkstra. Solution of a problem in concurrent programming control. Communications of ACM, 8:569, 1965.CrossRefGoogle Scholar
  4. 4.
    J.L.W. Kessels. Arbitration without common modifiable variables. Acta Informatica, 17:135–141, 1982.MATHMathSciNetCrossRefGoogle Scholar
  5. 5.
    L. Lamport. A fast mutual exclusion algorithm. ACM Transactions on Computer Systems, 5(1):1–11, February 1987.CrossRefGoogle Scholar
  6. 6.
    N.A. Lynch. Distributed Algorithms. Morgan Kaufmann, 1996.Google Scholar
  7. 7.
    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
  8. 8.
    G.L. Peterson. Myths about the mutual exclusion problem. Information Processing Letters, 12(3):115–116, June 1981.MATHCrossRefGoogle Scholar
  9. 9.
    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
  10. 10.
    J.-H. Yang and J.H. Anderson. A fast, scalable mutual exclusion algorithm. Distributed Computing, 9(1):51–60, 1995.CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1998

Authors and Affiliations

  • Yih-Kuen Tsay
    • 1
  1. 1.Department of Information ManagementNational Taiwan UniversityTaipeiTaiwan

Personalised recommendations