Document Open Access Logo

LL/SC and Atomic Copy: Constant Time, Space Efficient Implementations Using Only Pointer-Width CAS

Authors Guy E. Blelloch , Yuanhao Wei



PDF
Thumbnail PDF

File

LIPIcs.DISC.2020.5.pdf
  • Filesize: 495 kB
  • 17 pages

Document Identifiers

Author Details

Guy E. Blelloch
  • Carnegie Mellon University, Pittsburgh, PA, USA
Yuanhao Wei
  • Carnegie Mellon University, Pittsburgh, PA, USA

Acknowledgements

We would like to thank our anonymous reviewers for their helpful comments.

Cite AsGet BibTex

Guy E. Blelloch and Yuanhao Wei. LL/SC and Atomic Copy: Constant Time, Space Efficient Implementations Using Only Pointer-Width CAS. In 34th International Symposium on Distributed Computing (DISC 2020). Leibniz International Proceedings in Informatics (LIPIcs), Volume 179, pp. 5:1-5:17, Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2020)
https://doi.org/10.4230/LIPIcs.DISC.2020.5

Abstract

When designing concurrent algorithms, Load-Link/Store-Conditional (LL/SC) is a very useful primitive since it avoids ABA problems. The full semantics of LL/SC are not supported in hardware by any modern architecture, so there has been a significant amount of work on simulations of LL/SC using CAS. However, all previous algorithms that are constant time either use unbounded sequence numbers (and thus base objects of unbounded size), or require Ω(MP) space to implement M LL/SC objects for P processes. We present the first constant time implementation of LL/SC from bounded-sized CAS objects using only constant space overhead per LL/SC variable. In particular, our implementation uses Θ(M+kP²) space, where k is the number of outstanding LL operations per process, and only requires pointer-width CAS operations. In most algorithms that use LL/SC, k is a small constant which reduces our additive space overhead to Θ(P²). Our algorithm can also be extended to implement L word LL/SC objects in Θ(L) time for LL and SC, O(1) time for VL, and Θ((M+kP²)L) space. To achieve these bounds, our main technical contribution is implementing a new primitive called Single-Writer Copy which takes a pointer to a word sized memory location and atomically copies its contents into another object. The restriction is that only one process is allowed to write/copy into the destination object at a time. The ability to read from one memory location and write to another atomically, and in constant-time, is very powerful and we believe this primitive will be useful in designing other algorithms.

Subject Classification

ACM Subject Classification
  • Computing methodologies → Concurrent algorithms
Keywords
  • LL/SC
  • Atomic Copy
  • CAS
  • Constant Time

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. Yehuda Afek, Dalia Dauber, and Dan Touitou. Wait-free made fast. In Symposium on Theory of Computing (STOC), pages 538-547, 1995. Google Scholar
  2. Zahra Aghazadeh, Wojciech Golab, and Philipp Woelfel. Making objects writable. In ACM Symposium on Principles of Distributed Computing (PODC), pages 385-395, 2014. Google Scholar
  3. Zahra Aghazadeh and Philipp Woelfel. Space-and time-efficient long-lived test-and-set objects. In International Conference on Principles of Distributed Systems (OPODIS), pages 404-419. Springer, 2014. Google Scholar
  4. Zahra Aghazadeh and Philipp Woelfel. Upper bounds for boundless tagging with bounded objects. In International Symposium on Distributed Computing (DISC), pages 442-457, 2016. Google Scholar
  5. James H Anderson and Mark Moir. Universal constructions for large objects. In International Workshop on Distributed Algorithms (WDAG), pages 168-182. Springer, 1995. Google Scholar
  6. James H Anderson and Mark Moir. Universal constructions for multi-object operations. In ACM Symposium on Principles of Distributed Computing (PODC), pages 184-193, 1995. Google Scholar
  7. Maya Arbel-Raviv and Trevor Brown. Reuse, don't recycle: Transforming lock-free algorithms that throw away descriptors. arXiv preprint arXiv:1708.01797, 2017. Google Scholar
  8. Hagit Attiya and Jennifer Welch. Distributed computing: fundamentals, simulations, and advanced topics, volume 19. John Wiley & Sons, 2004. Google Scholar
  9. Henry G Baker Jr. List processing in real time on a serial computer. Communications of the ACM, 21(4):280-294, 1978. Google Scholar
  10. Greg Barnes. A method for implementing lock-free shared-data structures. In ACM Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 261-270, 1993. Google Scholar
  11. Guy E. Blelloch and Yuanhao Wei. LL/SC and atomic copy: Constant time, space efficient implementations using only pointer-width CAS, 2019. URL: http://arxiv.org/abs/1911.09671.
  12. Guy E. Blelloch and Yuanhao Wei. Concurrent reference counting and resource management in wait-free constant time, 2020. URL: http://arxiv.org/abs/2002.07053.
  13. Simon Doherty, Maurice Herlihy, Victor Luchangco, and Mark Moir. Bringing practical lock-free synchronization to 64-bit applications. In ACM Symposium on Principles of Distributed Computing (PODC), pages 31-39. ACM, 2004. Google Scholar
  14. Faith Ellen and Philipp Woelfel. An optimal implementation of fetch-and-increment. In International Symposium on Distributed Computing (DISC), pages 284-298. Springer, 2013. Google Scholar
  15. Maurice Herlihy. Wait-free synchronization. ACM Transactions on Programming Languages and Systems (TOPLAS), 13(1):124-149, 1991. Google Scholar
  16. Maurice Herlihy. A methodology for implementing highly concurrent data objects. ACM Transactions on Programming Languages and Systems (TOPLAS), 15(5):745-770, 1993. Google Scholar
  17. Maurice P Herlihy and Jeannette M Wing. Linearizability: A correctness condition for concurrent objects. ACM Transactions on Programming Languages and Systems, 12(3):463-492, 1990. Google Scholar
  18. IBM. IBM System/370 Extended Architecture, Principles of Operation, publication no. sa22-7085. 1983. Google Scholar
  19. Amos Israeli and Lihu Rappoport. Disjoint-access-parallel implementations of strong shared memory primitives. In ACM Symposium on Principles of Distributed Computing (PODC), pages 151-160. ACM, 1994. Google Scholar
  20. Prasad Jayanti and Srdjan Petrovic. Efficient and practical constructions of LL/SC variables. In ACM Symposium on Principles of Distributed Computing (PODC), pages 285-294. ACM, 2003. Google Scholar
  21. Prasad Jayanti and Srdjan Petrovic. Efficient wait-free implementation of multiword LL/SC variables. In IEEE International Conference on Distributed Computing Systems (ICSCS), pages 59-68. IEEE, 2005. Google Scholar
  22. Prasad Jayanti and Srdjan Petrovic. Efficiently implementing a large number of LL/SC objects. In International Conference on Principles of Distributed Systems (OPODIS), pages 17-31. Springer, 2005. Google Scholar
  23. Prasad Jayanti and Srdjan Petrovic. Efficiently implementing LL/SC objects shared by an unknown number of processes. In International Workshop on Distributed Computing (IWDC), pages 45-56. Springer, 2005. Google Scholar
  24. Maged M Michael. ABA prevention using single-word instructions. IBM Research Division, RC23089 (W0401-136), Tech. Rep, 2004. Google Scholar
  25. Maged M Michael. Hazard pointers: Safe memory reclamation for lock-free objects. IEEE Transactions on Parallel and Distributed Systems, 15(6):491-504, 2004. Google Scholar
  26. Maged M Michael. Practical lock-free and wait-free LL/SC/VL implementations using 64-bit CAS. In International Symposium on Distributed Computing (DISC), pages 144-158. Springer, 2004. Google Scholar
  27. Mark Moir. Practical implementations of non-blocking synchronization primitives. In ACM Symposium on Principles of Distributed Computing (PODC), pages 219-228, 1997. Google Scholar
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail