Distributed Computing

, Volume 25, Issue 2, pp 109–162 | Cite as

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

  • Wojciech Golab
  • Vassos Hadzilacos
  • Danny Hendler
  • Philipp Woelfel


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.


Comparison primitives Consensus Load-linked/store-conditional Mutual exclusion Remote memory references Shared memory 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 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)zbMATHCrossRefGoogle Scholar
  2. 2.
    Anderson J., Kim Y.-J.: An improved lower bound for the time complexity of mutual exclusion. Distrib. Comput. 15(4), 221–253 (2002)CrossRefGoogle Scholar
  3. 3.
    Anderson J., Kim Y.-J., Herman T.: Shared-memory mutual exclusion: major research trends since 1986. Distrib. Comput. 16, 75–110 (2003)CrossRefGoogle Scholar
  4. 4.
    Anderson T.: The performance of spin lock alternatives for shared-memory multiprocessors. IEEE Trans. Parallel Distrib. Syst. 1(1), 6–16 (1990)CrossRefGoogle Scholar
  5. 5.
    Attiya, H., Hendler, D., Woelfel, P.: Tight RMR lower bounds for mutual exclusion and other problems. In: Proceedings of the 40th STOC (2008)Google Scholar
  6. 6.
    Craig, T.: Queuing spin lock algorithms to support timing predictability. In: Proceedings of the 14th RTSS, pp. 148–156 (1993)Google Scholar
  7. 7.
    Cypher, R.: The communication requirements of mutual exclusion. In: Proceedings of the 7th SPAA, pp. 147–156 (1995)Google Scholar
  8. 8.
    Danek R., Golab W.: Closing the complexity gap between FCFS mutual exclusion and mutual exclusion. Distrib. Comput. 23(2), 87–111 (2010)zbMATHCrossRefGoogle Scholar
  9. 9.
    Dijkstra E.W.: Solution of a problem in concurrent programming control. Commun. ACM 8(9), 569 (1965)CrossRefGoogle Scholar
  10. 10.
    Dwork C., Herlihy M., Waarts O.: Contention in shared memory algorithms. J. ACM 44(6), 779–805 (1997)MathSciNetzbMATHCrossRefGoogle Scholar
  11. 11.
    Ellen F., Herlihy M., Shavit N.: On the space complexity of randomized synchronization. J. ACM 45(5), 843–862 (1998)MathSciNetCrossRefGoogle Scholar
  12. 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)Google Scholar
  13. 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)Google Scholar
  14. 14.
    Golab, W.: Constant-RMR implementations of CAS and other synchronization primitives using read and write operations. Ph.D. thesis, University of Toronto (2010)Google Scholar
  15. 15.
    Golab W., Hendler D., Woelfel P.: An O(1) RMRs leader election algorithm. SIAM J. Comput. 39(7), 2726–2760 (2010)MathSciNetzbMATHCrossRefGoogle Scholar
  16. 16.
    Herlihy M.: Wait-free synchronization. ACM Trans. Program. Lang. Syst. 13(1), 124–149 (1991)CrossRefGoogle Scholar
  17. 17.
    Herlihy M., Wing J.M.: Linearizability: a correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst. 12(3), 463–492 (1990)CrossRefGoogle Scholar
  18. 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)Google Scholar
  19. 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)Google Scholar
  20. 20.
    Luchangco, V., Moir, M., Shavit, N.: On the uncontended complexity of consensus. In: Proceedings of the 17th DISC, pp. 45–59 (2003)Google Scholar
  21. 21.
    Lynch N., Tuttle M.: An introduction to input/output automata. CWI Q. 2(3), 219–246 (1989)MathSciNetzbMATHGoogle Scholar
  22. 22.
    Moir, M.: Practical implementations of non-blocking synchronization primitives. In: Proceedings of the 16th PODC, pp. 219–228 (1997)Google Scholar
  23. 23.
    Patterson D.A., Hennessy J.L.: Computer Organization & Design: The Hardware/Software Interface. Morgan Kaufmann, San Francisco, California (1994)zbMATHGoogle Scholar
  24. 24.
    Yang J.-H., Anderson J.: A fast, scalable mutual exclusion algorithm. Distrib. Comput. 9(1), 51–60 (1995)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag 2011

Authors and Affiliations

  • Wojciech Golab
    • 1
  • Vassos Hadzilacos
    • 2
  • Danny Hendler
    • 3
  • Philipp Woelfel
    • 4
  1. 1.HP LabsPalo AltoUSA
  2. 2.University of TorontoTorontoCanada
  3. 3.Ben-Gurion UniversityBeer-ShevaIsrael
  4. 4.University of CalgaryCalgaryCanada

Personalised recommendations