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 data-structure 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.
Funder
Israel Science Foundation
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Reference32 articles.
1. 2022. Java Platform Version 18 API Specification. https://docs.oracle.com/en/java/javase/18/docs/api/index.html 2022. Java Platform Version 18 API Specification. https://docs.oracle.com/en/java/javase/18/docs/api/index.html
2. Atomic snapshots of shared memory
3. Interrupting snapshots and the Java size method
4. Harnessing epoch-based reclamation for efficient range queries
5. Counting networks
Cited by
1 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Concurrent Size (Abstract);Proceedings of the 2024 ACM Workshop on Highlights of Parallel Computing;2024-06-17