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