Concurrent size
Gal Sela, Erez Petrank
Abstract
The size of a data structure (i.e., the number of elements in it) is a widely used property of a data set. However, for concurrent programs, obtaining a correct size efficiently is non-trivial. In fact, the literature does not offer a mechanism to obtain a correct (linearizable) size of a concurrent data set without resorting to inefficient solutions, such as taking a full snapshot of the data structure to count the elements, or acquiring one global lock in all update and size operations. This paper presents a methodology for adding a concurrent linearizable size operation to sets and dictionaries with a relatively low performance overhead. Theoretically, the proposed size operation is wait-free with asymptotic complexity linear in the number of threads (independently of datastructure size). Practically, we evaluated the performance overhead by adding size to various concurrent data structures in Java-a skip list, a hash table and a tree. The proposed linearizable size operation executes faster by orders of magnitude compared to the existing option of taking a snapshot, while incurring a throughput loss of 1% -20% on the original data structure's operations. CCS Concepts: • Computing methodologies → Shared memory algorithms; Concurrent algorithms; • Theory of computation → Data structures design and analysis.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 531d3cbd-4bc7-4c6d-9ac3-9757e63d0f79Builds on2
- Constant-time snapshots with applications to concurrent data structuresYuanhao Wei, Naama Ben-David, Guy E. Blelloch, Panagiota Fatourou et al.PPoPP 2021 · 37 citations
- Bundling linked data structures for linearizable range queriesJacob Nelson-Slivon, Ahmed Hassan, Roberto PalmieriPPoPP 2022 · 11 citations
Related papers
- History-Independent Concurrent Hash TablesHagit Attiya, Michael A. Bender, Martín Farach-Colton, Rotem Oshman et al.STOC 2025 · 1 citation
- VERLIB: Concurrent Versioned PointersGuy E. Blelloch, Yuanhao WeiPPoPP 2024 · 6 citations
- Elimination (a, b)-trees with fast, durable updatesAnubhav Srivastava, Trevor BrownPPoPP 2022 · 12 citations
- Jiffy: a lock-free skip list with batch updates and snapshotsTadeusz Kobus, Maciej Kokocinski, Pawel T. WojciechowskiPPoPP 2022 · 12 citations
- Sharded Elimination and Combining for Highly-Efficient Concurrent StacksAjay Singh, Nikos Metaxakis, Panagiota FatourouPPoPP 2026
