Lock-Free Augmented Trees

Authors Panagiota Fatourou , Eric Ruppert



PDF
Thumbnail PDF

File

LIPIcs.DISC.2024.23.pdf
  • Filesize: 0.93 MB
  • 24 pages

Document Identifiers

Author Details

Panagiota Fatourou
  • FORTH ICS, Heraklion, Greece
  • University of Crete, Heraklion, Greece
Eric Ruppert
  • York University, Toronto, Canada

Acknowledgements

We thank the anonymous reviewers for their comments.

Cite AsGet BibTex

Panagiota Fatourou and Eric Ruppert. Lock-Free Augmented Trees. In 38th International Symposium on Distributed Computing (DISC 2024). Leibniz International Proceedings in Informatics (LIPIcs), Volume 319, pp. 23:1-23:24, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024)
https://doi.org/10.4230/LIPIcs.DISC.2024.23

Abstract

Augmenting an existing sequential data structure with extra information to support greater functionality is a widely used technique. For example, search trees are augmented to build sequential data structures like order-statistic trees, interval trees, tango trees, link/cut trees and many others. We study how to design concurrent augmented tree data structures. We present a new, general technique that can augment a lock-free tree to add any new fields to each tree node, provided the new fields' values can be computed from information in the node and its children. This enables the design of lock-free, linearizable analogues of a wide variety of classical augmented data structures. As a first example, we give a wait-free trie that stores a set S of elements drawn from {0,…,N-1} and supports linearizable order-statistic queries such as finding the kth smallest element of S. Updates and queries take O(log N) steps. We also apply our technique to a lock-free binary search tree (BST), where changes to the structure of the tree make the linearization argument more challenging. Our augmented BST supports order statistic queries in O(h) steps on a tree of height h. The augmentation does not affect the asymptotic step complexity of the updates. As an added bonus, our technique supports arbitrary multi-point queries (such as range queries) with the same step complexity as they would have in the corresponding sequential data structure. For both our trie and BST, we give an alternative augmentation to improve searches and order-statistic queries to run in O(log |S|) steps (at the cost of increasing step complexity of updates by a factor of O(log|S|)).

Subject Classification

ACM Subject Classification
  • Theory of computation → Concurrent algorithms
  • Theory of computation → Data structures design and analysis
Keywords
  • shared-memory
  • data structure
  • tree
  • binary search tree
  • augmentation
  • linearizable
  • lock-free
  • order statistic
  • snapshot

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 Proc. 27th ACM Symposium on Theory of Computing, pages 538-547, New York, NY, USA, 1995. URL: https://doi.org/10.1145/225058.225271.
  2. Yehuda Afek, Haim Kaplan, Boris Korenfeld, Adam Morrison, and Robert Endre Tarjan. The CB tree: a practical concurrent self-adjusting search tree. Distributed Computing, 27(6):393-417, 2014. URL: https://doi.org/10.1007/S00446-014-0229-0.
  3. Vitaly Aksenov, Trevor Brown, Alexander Fedorov, and Ilya Kokorin. Poster: Unexpected scaling in path copying trees. In Proc. 28th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming, pages 438-440, 2023. URL: https://doi.org/10.1145/3572848.3577512.
  4. Maya Arbel-Raviv and Trevor Brown. Harnessing epoch-based reclamation for efficient range queries. In Proc. 23rd ACM Symposium on Principles and Practice of Parallel Programming, pages 14-27, 2018. URL: https://doi.org/10.1145/3178487.3178489.
  5. Shalom Asbell and Eric Ruppert. A wait-free deque with polylogarithmic step complexity. In Proc. 27th International Conference on Principles of Distributed Systems, volume 286 of LIPIcs, pages 17:1-17:22, 2023. URL: https://doi.org/10.4230/LIPICS.OPODIS.2023.17.
  6. Benyamin Bashari and Philipp Woelfel. An efficient adaptive partial snapshot implementation. In Proc. ACM Symposium on Principles of Distributed Computing, pages 545-555, 2021. URL: https://doi.org/10.1145/3465084.3467939.
  7. Dmitry Basin, Edward Bortnikov, Anastasia Braginsky, Guy Golan-Gueta, Eshcar Hillel, Idit Keidar, and Moshe Sulamy. Kiwi: A key-value map for scalable real-time analytics. ACM Trans. Parallel Comput., 7(3):16:1-16:28, June 2020. URL: https://doi.org/10.1145/3399718.
  8. Naama Ben-David, Guy E. Blelloch, Panagiota Fatourou, Eric Ruppert, Yihan Sun, and Yuanhao Wei. Space and time bounded multiversion garbage collection. In Proc. 35th International Symposium on Distributed Computing, volume 209 of LIPIcs, pages 12:1-12:20, 2021. URL: https://doi.org/10.4230/LIPICS.DISC.2021.12.
  9. J. L. Bentley. Solutions to Klee’s rectangle problems. Technical report, Carnegie-Mellon University, Pittsburgh, PA, 1977. Google Scholar
  10. Mark de Berg, Otfried Cheong, Marc van Kreveld, and Mark Overmars. Computational Geometry: Algorithms and Applications. Springer, 3rd edition, 2008. Google Scholar
  11. Guy E. Blelloch and Yuanhao Wei. VERLIB: concurrent versioned pointers. In Proc. 29th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming, pages 200-214, 2024. URL: https://doi.org/10.1145/3627535.3638501.
  12. Prosenjit Bose, Marc J. van Kreveld, Anil Maheshwari, Pat Morin, and Jason Morrison. Translating a regular grid over a point set. Computational Geometry, 25(1-2):21-34, 2003. URL: https://doi.org/10.1016/S0925-7721(02)00128-1.
  13. Peter Brass. Advanced Data Structures. Cambridge University Press, 2008. Google Scholar
  14. Trevor Brown and Hillel Avni. Range queries in non-blocking k-ary search trees. In Proc. 16th International Conference on Principles of Distributed Systems, volume 7702 of LNCS, pages 31-45, 2012. URL: https://doi.org/10.1007/978-3-642-35476-2_3.
  15. Trevor Brown, Faith Ellen, and Eric Ruppert. A general technique for non-blocking trees. In Proc. 19th ACM Symposium on Principles and Practice of Parallel Programming, pages 329-342, 2014. URL: https://doi.org/10.1145/2555243.2555267.
  16. Tushar Deepak Chandra, Prasad Jayanti, and King Tan. A polylog time wait-free construction for closed objects. In Proc. 17th ACM Symposium on Principles of Distributed Computing, pages 287-296, 1998. URL: https://doi.org/10.1145/277697.277753.
  17. Bapi Chatterjee. Lock-free linearizable 1-dimensional range queries. In Proc. 18th International Conference on Distributed Computing and Networking, pages 9:1-9:10, 2017. URL: https://doi.org/10.1145/3007748.3007771.
  18. Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms, chapter 17, pages 480-496. MIT Press, fourth edition, 2022. Google Scholar
  19. Erik D. Demaine, Dion Harmon, John Iacono, and Mihai Pătrascu. Dynamic optimality-almost. SIAM Journal on Computing, 37(1):240-251, 2007. URL: https://doi.org/10.1137/S0097539705447347.
  20. James R. Driscoll, Neil Sarnak, Daniel D. Sleator, and Robert E. Tarjan. Making data structures persistent. Journal of Computer and System Sciences, 38(1):86-124, 1989. URL: https://doi.org/10.1016/0022-0000(89)90034-2.
  21. Faith Ellen, Panagiota Fatourou, Joanna Helga, and Eric Ruppert. The amortized complexity of non-blocking binary search trees. In Proc. 33rd ACM Symposium on Principles of Distributed Computing, pages 332-340, 2014. Full version available online from https://users.ics.forth.gr/~faturu/BSTproof.pdf. URL: https://doi.org/10.1145/2611462.2611486.
  22. Panagiota Fatourou and Nikolaos D. Kallimanis. The RedBlue family of universal constructions. Distributed Computing, 33(6):485-513, 2020. URL: https://doi.org/10.1007/S00446-020-00370-7.
  23. Panagiota Fatourou, Elias Papavasileiou, and Eric Ruppert. Persistent non-blocking binary search trees supporting wait-free range queries. In Proc. 31st ACM Symposium on Parallelism in Algorithms and Architectures, pages 275-286, 2019. URL: https://doi.org/10.1145/3323165.3323197.
  24. Panagiota Fatourou and Eric Ruppert. Lock-free augmented trees. Full version available from https://arxiv.org/abs/2405.10506, May 2024. URL: https://doi.org/10.48550/arXiv.2405.10506.
  25. Edward Fredkin. Trie memory. Communications of the ACM, 3(9):490-499, 1960. URL: https://doi.org/10.1145/367390.367400.
  26. Gaston H. Gonnet, J. Ian Munro, and Derick Wood. Direct dynamic structures for some line segment problems. Computer Vision, Graphics and Image Processing, 23(2):178-186, 1983. URL: https://doi.org/10.1016/0734-189X(83)90111-1.
  27. Shane V. Howley and Jeremy Jones. A non-blocking internal binary search tree. In Proc. 24th ACM Symposium on Parallelism in Algorithms and Architectures, pages 161-171, 2012. URL: https://doi.org/10.1145/2312005.2312036.
  28. Prasad Jayanti. f-arrays: implementation and applications. In Proc. 21st ACM Symposium on Principles of Distributed Computing, pages 270-279. ACM, 2002. URL: https://doi.org/10.1145/571825.571875.
  29. Prasad Jayanti and Srdjan Petrovic. Logarithmic-time single deleter, multiple inserter wait-free queues and stacks. In Proc. 25th International Conference on Foundations of Software Technology and Theoretical Computer Science, volume 3821 of LNCS, pages 408-419, 2005. URL: https://doi.org/10.1007/11590156_33.
  30. Donald E. Knuth. The Art of Computer Programming, Volume 3. Addison-Wesley, second edition, 1998. Google Scholar
  31. Jeremy Ko. A lock-free binary trie. In Proc. 44th IEEE International Conference on Distributed Computing Systems, 2024. To appear. Preliminary version available from https://arxiv.org/abs/2405.06208. URL: https://doi.org/10.48550/arXiv.2405.06208.
  32. Ilya Kokorin, Victor Yudov, Vitaly Aksenov, and Dan Alistarh. Wait-free trees with asymptotically-efficient range queries. In Proc. IEEE International Parallel and Distributed Processing Symposium, pages 169-179, 2024. URL: https://doi.org/10.1109/IPDPS57955.2024.00023.
  33. Edward M. McCreight. Priority search trees. SIAM Journal on Computing, 14(2):257-276, 1985. URL: https://doi.org/10.1137/0214021.
  34. Hossein Naderibeni and Eric Ruppert. A wait-free queue with polylogarithmic step complexity. Distributed Computing, 2024. Published online August, 2024. URL: https://doi.org/10.1007/s00446-024-00471-7.
  35. Aravind Natarajan, Arunmoezhi Ramachandran, and Neeraj Mittal. FEAST: a lightweight lock-free concurrent binary search tree. ACM Transactions on Parallel Computing, 7(2), May 2020. URL: https://doi.org/10.1145/3391438.
  36. Jacob Nelson-Slivon, Ahmed Hassan, and Roberto Palmieri. Bundling linked data structures for linearizable range queries. In Proc. ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 368-384, 2022. URL: https://doi.org/10.1145/3503221.3508412.
  37. Aleksandar Prokopec, Nathan Grasso Bronson, Phil Bagwell, and Martin Odersky. Concurrent tries with efficient non-blocking snapshots. In Proc. 17th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 151-160, 2012. URL: https://doi.org/10.1145/2145816.2145836.
  38. Gal Sela and Erez Petrank. Concurrent size. Proc. of the ACM on Programming Languages, 6(OOPSLA2):345-372, 2022. URL: https://doi.org/10.1145/3563300.
  39. Gal Sela and Erez Petrank. Concurrent aggregate queries. Manuscript available from https://arxiv.org/abs/2405.07434, May 2024. URL: https://doi.org/10.48550/arXiv.2405.07434.
  40. Niloufar Shafiei. Non-blocking Patricia tries with replace operations. Distributed Computing, 32(5):423-442, 2019. URL: https://doi.org/10.1007/S00446-019-00347-1.
  41. Daniel D. Sleator and Robert Endre Tarjan. A data structure for dynamic trees. Journal of Computer and System Sciences, 26(3):362-391, June 1983. URL: https://doi.org/10.1145/800076.802464.
  42. Yihan Sun, Daniel Ferizovic, and Guy E. Blelloch. PAM: parallel augmented maps. In Proc. 23rd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 290-304, 2018. URL: https://doi.org/10.1145/3178487.3178509.
  43. Robert Endre Tarjan. Data Structures and Network Algorithms, chapter 4.2, pages 45-57. SIAM, Philadelphia, USA, 1983. URL: https://doi.org/10.1137/1.9781611970265.
  44. Yuanhao Wei, Naama Ben-David, Guy E. Blelloch, Panagiota Fatourou, Eric Ruppert, and Yihan Sun. Constant-time snapshots with applications to concurrent data structures. In Proc. ACM Symposium on Principles and Practice of Parallel Programming, pages 31-46, 2021. URL: https://doi.org/10.1145/3437801.3441602.
  45. Yuanhao Wei, Guy E. Blelloch, Panagiota Fatourou, and Eric Ruppert. Practically and theoretically efficient garbage collection for multiversioning. In Proc. 28th ACM Annual Symposium on Principles and Practice of Parallel Programming, pages 66-78, 2023. URL: https://doi.org/10.1145/3572848.3577508.
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