Skip to main content
Log in

RMR-efficient implementations of comparison primitives using read and write operations

  • Published:
Distributed Computing Aims and scope Submit manuscript

Abstract

We consider asynchronous multiprocessors where processes communicate only by reading or writing shared memory. We show how to implement consensus, compare-and-swap and other comparison primitives, as well as load-linked/store-conditional (LL/SC) using only a constant number of remote memory references (RMRs), in both the cache-coherent and the distributed-shared-memory models of such multiprocessors. Our implementations are blocking, rather than wait-free: they ensure progress provided all processes that invoke the implemented primitive are live. Our results imply that any algorithm using read and write operations, and either comparison primitives or LL/SC, can be simulated by an algorithm that uses read and write operations only, with at most a constant-factor increase in RMR complexity.

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. Anderson J., Kim Y.-J.: A generic local-spin fetch-and-\({\phi}\) -based mutual exclusion algorithm. J. Parallel Distrib. Comput. 67(5), 551–580 (2007)

    Article  MATH  Google Scholar 

  2. 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 

  3. Anderson J., Kim Y.-J., Herman T.: Shared-memory mutual exclusion: major research trends since 1986. Distrib. Comput. 16, 75–110 (2003)

    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. Attiya, H., Hendler, D., Woelfel, P.: Tight RMR lower bounds for mutual exclusion and other problems. In: Proceedings of the 40th STOC (2008)

  6. Craig, T.: Queuing spin lock algorithms to support timing predictability. In: Proceedings of the 14th RTSS, pp. 148–156 (1993)

  7. Cypher, R.: The communication requirements of mutual exclusion. In: Proceedings of the 7th SPAA, pp. 147–156 (1995)

  8. Danek R., Golab W.: Closing the complexity gap between FCFS mutual exclusion and mutual exclusion. Distrib. Comput. 23(2), 87–111 (2010)

    Article  MATH  Google Scholar 

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

    Article  Google Scholar 

  10. Dwork C., Herlihy M., Waarts O.: Contention in shared memory algorithms. J. ACM 44(6), 779–805 (1997)

    Article  MathSciNet  MATH  Google Scholar 

  11. Ellen F., Herlihy M., Shavit N.: On the space complexity of randomized synchronization. J. ACM 45(5), 843–862 (1998)

    Article  MathSciNet  Google Scholar 

  12. Fan, R., Lynch, N.: An Omega(n log n) lower bound on the cost of mutual exclusion. In: Proceedings of the 25th PODC, pp. 275–284 (2006)

  13. Golab, W.: A complexity separation between the cache-coherent and distributed shared memory models. In: Proceedings of the 30th PODC, pp. 109–118 (2011)

  14. Golab, W.: Constant-RMR implementations of CAS and other synchronization primitives using read and write operations. Ph.D. thesis, University of Toronto (2010)

  15. Golab W., Hendler D., Woelfel P.: An O(1) RMRs leader election algorithm. SIAM J. Comput. 39(7), 2726–2760 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  16. Herlihy M.: Wait-free synchronization. ACM Trans. Program. Lang. Syst. 13(1), 124–149 (1991)

    Article  Google Scholar 

  17. Herlihy M., Wing J.M.: Linearizability: a correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst. 12(3), 463–492 (1990)

    Article  Google Scholar 

  18. Jayanti, P.: A complete and constant time wait-free implementation of CAS from LL/SC and vice versa. In: Proceedings of the 12th DISC, pp. 216–230 (1998)

  19. Lee, H.: Transformations of mutual exclusion algorithms from the cache-coherent model to the distributed shared memory model. In: Proceedings of the 25th ICDCS, pp. 261–270 (2005)

  20. Luchangco, V., Moir, M., Shavit, N.: On the uncontended complexity of consensus. In: Proceedings of the 17th DISC, pp. 45–59 (2003)

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

    MathSciNet  MATH  Google Scholar 

  22. Moir, M.: Practical implementations of non-blocking synchronization primitives. In: Proceedings of the 16th PODC, pp. 219–228 (1997)

  23. Patterson D.A., Hennessy J.L.: Computer Organization & Design: The Hardware/Software Interface. Morgan Kaufmann, San Francisco, California (1994)

    MATH  Google Scholar 

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

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Wojciech Golab.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Golab, W., Hadzilacos, V., Hendler, D. et al. RMR-efficient implementations of comparison primitives using read and write operations. Distrib. Comput. 25, 109–162 (2012). https://doi.org/10.1007/s00446-011-0150-8

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00446-011-0150-8

Keywords

Navigation