Advertisement

Distributed Computing

, Volume 9, Issue 1, pp 51–60 | Cite as

A fast, scalable mutual exclusion algorithm

  • Jae-Heon Yang
  • Jams H. Anderson
Article

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.

Key Words

Fast mutual exclusion Local spinning Mutual exclusion Read/write atomicity Scalability Synchronization primitives Time complexity 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Agarwal A, Cherian M: Adaptive backoff synchronization techniques. Proc 16th International Symposium on Computer Architecture, pp 396–406 (1989)Google Scholar
  2. 2.
    Anderson J: A fine-grained solution to the mutual exclusion problem. Acta Inf 30(3): 249–265 (1993)Google Scholar
  3. 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. 4.
    BBN Advanced Computers, Inside the TC2000 Computer, February, 1990Google Scholar
  5. 5.
    Chandy K, Misra J: Parallel program design: a foundation. Addison-Wesley 1988Google Scholar
  6. 6.
    Dijkstra E: Solution of a problem in concurrent programming control. Commun ACM 8 (9) 569 (1965)Google Scholar
  7. 7.
    Graunke G, Thakkar S: Synchronization algorithms for shared-memory multiprocessors. IEEE Comput. 23: 60–69 (1990)Google Scholar
  8. 8.
    Kessels J: Arbitration without common modifiable variables. Acta Inf 17: 135–141 (1982)Google Scholar
  9. 9.
    Lamport L: A fast mutual exclusion algorithm. ACM Trans Comput Syst 5 (1): 1–11 (1987)Google Scholar
  10. 10.
    Lamport L: How to write a proof. Research Report 94, Digital Equipment Corporation Systems Research Center, February, 1993Google Scholar
  11. 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. 12.
    Michael M, Scott M: Fast mutual exclusion, even with contention. Technical Report, University of Rochester, June, 1993Google Scholar
  13. 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)Google Scholar
  14. 14.
    Styer E: Improving fast mutual exclusion. Proc 11th Annual ACM Symposium on Principles of Distributed Computing, 1992, pp 159–168Google Scholar
  15. 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)Google Scholar
  16. 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)Google Scholar
  17. 17.
    Yang J, Anderson J: A fast, scalable mutual exclusion algorithm. Technical Report TR94-064, The University of North Carolina at Chapel Hill, November, 1994Google Scholar

Copyright information

© Springer-Verlag 1995

Authors and Affiliations

  • Jae-Heon Yang
    • 1
  • Jams H. Anderson
    • 2
  1. 1.Department of Mathematics and Computer ScienceMills CollegeOaklandUSA
  2. 2.Department of Computer ScienceThe University of North Carolina at Chapel HillChapel HillUSA

Personalised recommendations