Skip to main content
Log in

A fast, scalable mutual exclusion algorithm

  • Published:
Distributed Computing Aims and scope Submit manuscript

Summary

This paper is concerned with synchornization under read/write atomicity in shared memory multi-processors. We present a new algorithm forN-process mutual exclusion that requires only read and write operations and that hasO(logN) time complexity, where “time” is measured by counting remote memory references. The time complexity of this algorithm is better than that of all prior solutions to the mutual exclusion problem that are based upon atomic read and write instructions; in fact, the time complexity of most prior solutions is unbounded. Performance studies are presented that show that our mutual exclusion algorithm exhibits scalable performance under heavy contention. In fact, its performance rivals that of the fastest queue-based spin locks based on strong primitives such as compare-and-swap and fetch-and-add. We also present a modified version of our algorithm that generates onlyO(1) memory references in the absence of contention.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Similar content being viewed by others

References

  1. Agarwal A, Cherian M: Adaptive backoff synchronization techniques. Proc 16th International Symposium on Computer Architecture, pp 396–406 (1989)

  2. Anderson J: A fine-grained solution to the mutual exclusion problem. Acta Inf 30(3): 249–265 (1993)

    Google Scholar 

  3. Anderson T: The performance of spin lock alternatives for shared-memory multiprocessors. IEEE Trans Parallel Distrib Syst 1(1): 6–16 (1990)

    Google Scholar 

  4. BBN Advanced Computers, Inside the TC2000 Computer, February, 1990

  5. Chandy K, Misra J: Parallel program design: a foundation. Addison-Wesley 1988

  6. Dijkstra E: Solution of a problem in concurrent programming control. Commun ACM 8 (9) 569 (1965)

    Google Scholar 

  7. Graunke G, Thakkar S: Synchronization algorithms for shared-memory multiprocessors. IEEE Comput. 23: 60–69 (1990)

    Google Scholar 

  8. Kessels J: Arbitration without common modifiable variables. Acta Inf 17: 135–141 (1982)

    Google Scholar 

  9. Lamport L: A fast mutual exclusion algorithm. ACM Trans Comput Syst 5 (1): 1–11 (1987)

    Google Scholar 

  10. Lamport L: How to write a proof. Research Report 94, Digital Equipment Corporation Systems Research Center, February, 1993

  11. Mellor-Crummey J, Scott M: Algorithms for scalable synchronization on shared-memory multi-processors. ACM Trans Comput Syst 9(1): 21–65 (1991)

    Google Scholar 

  12. Michael M, Scott M: Fast mutual exclusion, even with contention. Technical Report, University of Rochester, June, 1993

  13. Peterson G, Fischer M: Economical solutions for the critical section problem in a distributed system. Proc 9th ACM Symposium on Theory of Computing, pp 91–97 (1977)

  14. Styer E: Improving fast mutual exclusion. Proc 11th Annual ACM Symposium on Principles of Distributed Computing, 1992, pp 159–168

  15. Yang J, Anderson J: Fast, scalable synchronization with minimal hardware support (extended abstract). Proc 12th Annual ACM Symposium on Principles of Distributed Computing, pp 171–182 (1993)

  16. Yang J, Anderson J: Time bounds for mutual exclusion and related problems. Proc 26th Annual ACM Symposium on Theory of Computing, pp 224–233 (1994)

  17. Yang J, Anderson J: A fast, scalable mutual exclusion algorithm. Technical Report TR94-064, The University of North Carolina at Chapel Hill, November, 1994

Download references

Author information

Authors and Affiliations

Authors

Additional information

Jae-Heon Yang received the B.S. and M. S. degrees in Computer Engineering from Seoul National University in 1985 and 1987, respectively, and the Ph.D. degree in Computer Science from the University of Maryland at College Park in 1994. Since June 1994, he has been an Assistant Professor of Computer Science at Mills College in Oakland, California. From 1987 to 1989, he was a junior researcher at the Korea Telecommunication Authority Research Center. His research interests include distributed computing and operating systems.

James H. Anderson received the M. S. degree in Computer Science from Michigan State University in 1982, the M.S. degree in Computer Science from Purdue University in 1983, and the Ph.D. degree in Computer Sciences from the University of Texas at Austin in 1990. Since August 1993, he has been an Assistant Professor of Computer Science at the University of North Carolina at Chapel Hill. Prior to joining the University of North Carolina, he was an Assistant Professor of Computer Science for three years at the University of Maryland at College Park Professor Anderson's main research interests are within the area of coneurrent and distributed computing. His current interests include wait-free algorithms, scalabde synchronization mechanisms for shared-memory systems, and object-sharing strategies for hard real-time applications.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Yang, JH., Anderson, J.H. A fast, scalable mutual exclusion algorithm. Distrib Comput 9, 51–60 (1995). https://doi.org/10.1007/BF01784242

Download citation

  • Received:

  • Accepted:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01784242

Key Words

Navigation