Skip to main content
Log in

Closing the complexity gap between FCFS mutual exclusion and mutual exclusion

  • Published:
Distributed Computing Aims and scope Submit manuscript

Abstract

First-Come-First-Served (FCFS) mutual exclusion (ME) is the problem of ensuring that processes attempting to concurrently access a shared resource do so one by one, in a fair order. In this paper, we close the complexity gap between FCFS ME and ME in the asynchronous shared memory model where processes communicate using atomic reads and writes only, and do not fail. Our main result is the first known FCFS ME algorithm that makes O(log N) remote memory references (RMRs) per passage and uses only atomic reads and writes. Our algorithm is also adaptive to point contention. More precisely, the number of RMRs a process makes per passage in our algorithm is Θ(min(k, log N)), where k is the point contention. Our algorithm matches known RMR complexity lower bounds for the class of ME algorithms that use reads and writes only, and beats the RMR complexity of prior algorithms in this class that have the FCFS property.

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.

Similar content being viewed by others

References

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

    Article  Google Scholar 

  2. Lamport L.: A new solution to Dijkstra’s concurrent programming problem. Commun. ACM 17(8), 453–455 (1974)

    Article  MATH  MathSciNet  Google Scholar 

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

    Article  Google Scholar 

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

    Article  Google Scholar 

  5. Kim, Y.J., Anderson, J.: A time complexity bound for adaptive mutual exclusion. In: Proceedings of DISC ’01, pp. 1–15 (2008)

  6. Attiya, H., Hendler, D., Woelfel, P.: Tight RMR lower bounds for mutual exclusion and other problems. In: Proceedings of STOC’08, pp. 217–226 (2008)

  7. Golab, W., Hadzilacos, V., Hendler, D., Woelfel, P.: Constant-RMR implementations of CAS and other synchronization primitives using read and write operations. In: Proceedings of PODC ’07, New York, NY, USA, ACM, pp. 3–12 (2007)

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

    Article  Google Scholar 

  9. Styer, E.: Improving fast mutual exclusion. In: PODC ’92: Proceedings of the Eleventh Annual ACM Symposium on Principles of Distributed Computing, New York, NY, USA, ACM, pp. 159–168 (1992)

  10. Choy M., Singh A.K.: Adaptive solutions to the mutual exclusion problem. Distrib. Comput. 8(1), 1–17 (1994)

    Article  Google Scholar 

  11. Attiya H., Bortnikov V.: Adaptive and efficient mutual exclusion. Distrib. Comput. 15(3), 177–189 (2002)

    Article  Google Scholar 

  12. Yang J.H., Anderson J.H.: A fast, scalable mutual exclusion algorithm. Distrib. Comput. 9(1), 51–60 (1995)

    Article  Google Scholar 

  13. Kim Y.J., Anderson J.: Adaptive mutual exclusion with local spinning. Distrib. Comput. 19(3), 197–236 (2007)

    Article  Google Scholar 

  14. Afek Y., Stupp G., Touitou D.: Long lived adaptive splitter and applications. Distrib. Comput. 15(2), 67–86 (2002)

    Article  Google Scholar 

  15. Jayanti, P.: f-arrays: Implementation and applications. In: PODC ’02: Proceedings of the Twenty-first Annual Symposium on Principles of Distributed Computing, New York, NY, USA, ACM, pp. 270–279 (2002)

  16. Taubenfeld, G.: The black-white bakery algorithm and related bounded-space, adaptive, local-spinning and fifo algorithms. In: DISC, pp. 56–70 (2004)

  17. Cypher, R.: The communication requirements of mutual exclusion. In: SPAA ’95: Proceedings of the 7th Annual ACM Symposium on Parallel Algorithms and Architectures, New York, NY, USA, ACM Press, pp. 147–156 (1995)

  18. Anderson J., Kim Y.J.: An improved lower bound for the time complexity of mutual exclusion. Distrib. Comput. 15(4), 221–253 (2002)

    Article  Google Scholar 

  19. Fan, R., Lynch, N.: An Ω(n log n) lower bound on the cost of mutual exclusion. In: PODC ’06: Proceedings of the 25th Annual ACM Symposium on Principles of Distributed Computing, New York, NY, USA, ACM Press, pp. 275–284 (2006)

  20. Lynch N., Tuttle M.: An introduction to input/output automata. CWI-Q. 2(3), 219–246 (1989)

    MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Robert Danek.

Additional information

Research supported in part by the Natural Sciences and Engineering Research Council of Canada.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Danek, R., Golab, W. Closing the complexity gap between FCFS mutual exclusion and mutual exclusion. Distrib. Comput. 23, 87–111 (2010). https://doi.org/10.1007/s00446-010-0096-2

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00446-010-0096-2

Keywords

Navigation