Constant-time snapshots with applications to concurrent data structures
Authors:
Open Access
- 17 February 2021
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 31-46
Abstract
Given a concurrent data structure, we present an approach for efficiently taking snapshots of its constituent CAS objects. More specifically, we support a constant-time operation that returns a snapshot handle. This snapshot handle can later be used to read the value of any base object at the time the snapshot was taken. Reading an earlier version of a base object is wait-free and takes time proportional to the number of successful writes to the object since the snapshot was taken. Importantly, our approach preserves all the time bounds and parallelism of the original data structure. Our fast, flexible snapshots yield simple, efficient implementations of atomic multi-point queries on a large class of concurrent data structures. For example, in a search tree where child pointers are updated using CAS, once a snapshot is taken, one can atomically search for ranges of keys, find the first key that matches some criteria, or check if a collection of keys are all present, simply by running a standard sequential algorithm on a snapshot of the tree. To evaluate the performance of our approach, we apply it to three search trees, one balanced and two not. Experiments show that the overhead of supporting snapshots is low across a variety of workloads. Moreover, in almost all cases, range queries on the trees built from our snapshots perform as well as or better than state-of-the-art concurrent data structures that support atomic range queries.Keywords
All Related Versions
Funding Information
- National Science Foundation (CCF-1901381, CCF-1910030, and CCF-1919223)
- Natural Sciences and Engineering Research Council of Canada
This publication has 40 references indexed in Scilit:
- Help when needed, but no more: Efficient read/write partial snapshotJournal of Parallel and Distributed Computing, 2012
- Versioned boxes as the basis for memory transactionsScience of Computer Programming, 2006
- How Hard Is It to Take a Snapshot?Lecture Notes in Computer Science, 2005
- Fully persistent lists with catenationJournal of the ACM, 1994
- Atomic snapshots of shared memoryJournal of the ACM, 1993
- Linearizability: a correctness condition for concurrent objectsACM Transactions on Programming Languages and Systems, 1990
- Making data structures persistentJournal of Computer and System Sciences, 1989
- Planar point location using persistent search treesCommunications of the ACM, 1986
- On Concurrency Control by Multiple VersionsACM Transactions on Database Systems, 1984
- Multiversion concurrency control—theory and algorithmsACM Transactions on Database Systems, 1983