Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
157 tokens/sec
GPT-4o
43 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
47 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Wait-free Trees with Asymptotically-Efficient Range Queries (2310.05293v1)

Published 8 Oct 2023 in cs.DB, cs.DC, and cs.DS

Abstract: Tree data structures, such as red-black trees, quad trees, treaps, or tries, are fundamental tools in computer science. A classical problem in concurrency is to obtain expressive, efficient, and scalable versions of practical tree data structures. We are interested in concurrent trees supporting range queries, i.e., queries that involve multiple consecutive data items. Existing implementations with this capability can list keys in a specific range, but do not support aggregate range queries: for instance, if we want to calculate the number of keys in a range, the only choice is to retrieve a whole list and return its size. This is suboptimal: in the sequential setting, one can augment a balanced search tree with counters and, consequently, perform these aggregate requests in logarithmic rather than linear time. In this paper, we propose a generic approach to implement a broad class of range queries on concurrent trees in a way that is wait-free, asymptotically efficient, and practically scalable. The key idea is a new mechanism for maintaining metadata concurrently at tree nodes, which can be seen as a wait-free variant of hand-over-hand locking (which we call hand-over-hand helping). We implement, test, and benchmark a balanced binary search tree with wait-free insert, delete, contains, and count operations, returning the number of keys in a given range which validates the expected speedups because of our method in practice.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (33)
  1. compare-and-swap, 2022. URL: https://en.wikipedia.org/wiki/Compare-and-swap.
  2. fetch-and-add, 2022. URL: https://en.wikipedia.org/wiki/Fetch-and-add.
  3. Persistent data structures, 2022. URL: https://en.wikipedia.org/wiki/Persistent_data_structure.
  4. Universally unique identifier, 2022. URL: https://en.wikipedia.org/wiki/Universally_unique_identifier.
  5. Unexpected scaling in path copying trees. In Proceedings of the 28th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming, pages 438–440, 2023.
  6. Parallel-batched interpolation search tree. In International Conference on Parallel Computing Technologies, pages 109–125. Springer, 2023.
  7. Parallel combining: Benefits of explicit synchronization. In 22nd International Conference on Principles of Distributed Systems, 2019.
  8. Harnessing epoch-based reclamation for efficient range queries. ACM SIGPLAN Notices, 53(1):14–27, 2018.
  9. Kiwi: A key-value map for scalable real-time analytics. In Proceedings of the 22Nd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 357–369, 2017.
  10. Rudolf Bayer. R. bayer, e. mccreight organization and maintenance. Software Pioneers: Contributions to Software Engineering, 1:245, 2012.
  11. Trie: an alternative data structure for data mining algorithms. Mathematical and Computer Modelling, 38(7-9):739–751, 2003.
  12. Range queries in non-blocking k-ary search trees. In International Conference On Principles Of Distributed Systems, pages 31–45. Springer, 2012.
  13. A general technique for non-blocking trees. In Proceedings of the 19th ACM SIGPLAN symposium on Principles and practice of parallel programming, pages 329–342, 2014.
  14. Non-blocking interpolation search trees with doubly-logarithmic running time. In Proceedings of the 25th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 276–291, 2020.
  15. Douglas Comer. Ubiquitous b-tree. ACM Computing Surveys (CSUR), 11(2):121–137, 1979.
  16. Computational geometry: algorithms and applications. Springer Science & Business Media, 2000.
  17. Persistent non-blocking binary search trees supporting wait-free range queries. In The 31st ACM Symposium on Parallelism in Algorithms and Architectures, pages 275–286, 2019.
  18. Goetz Graefe et al. Modern b-tree techniques. Foundations and Trends® in Databases, 3(4):203–402, 2011.
  19. A dichromatic framework for balanced trees. In 19th Annual Symposium on Foundations of Computer Science (sfcs 1978), pages 8–21. IEEE, 1978.
  20. A practical multi-word compare-and-swap operation. In International Symposium on Distributed Computing, pages 265–279. Springer, 2002.
  21. Flat combining and the synchronization-parallelism tradeoff. In Proceedings of the twenty-second annual ACM symposium on Parallelism in algorithms and architectures, pages 355–364, 2010.
  22. Maurice Herlihy. Wait-free synchronization. ACM Transactions on Programming Languages and Systems (TOPLAS), 13(1):124–149, 1991.
  23. The art of multiprocessor programming. Newnes, 2020.
  24. Wait-free queues with multiple enqueuers and dequeuers. ACM SIGPLAN Notices, 46(8):223–234, 2011.
  25. Leslie Lamport. A new solution of dijkstra’s concurrent programming problem. In Concurrency: the Works of Leslie Lamport, pages 171–178. 2019.
  26. Dynamic interpolation search. Journal of the ACM (JACM), 40(3):621–634, 1993.
  27. Simple, fast, and practical non-blocking and blocking concurrent queue algorithms. In Proceedings of the fifteenth annual ACM symposium on Principles of distributed computing, pages 267–275, 1996.
  28. Analysis and evaluation of non-blocking interpolation search trees. arXiv preprint arXiv:2001.00413, 2020.
  29. Self-adjusting binary search trees. Journal of the ACM (JACM), 32(3):652–686, 1985.
  30. On supporting efficient snapshot isolation for hybrid workloads with multi-versioned indexes. Proceedings of the VLDB Endowment, 13(2), 2019.
  31. Pam: parallel augmented maps. In Proceedings of the 23rd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 290–304, 2018.
  32. Constant-time snapshots with applications to concurrent data structures. In Proceedings of the 26th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 31–46, 2021.
  33. A wait-free queue as fast as fetch-and-add. In Proceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 1–13, 2016.
Citations (3)

Summary

We haven't generated a summary for this paper yet.