Skip to main content
QUICK REVIEW

[Paper Review] Lock-Free Augmented Trees

Panagiota Fatourou, Eric Ruppert|arXiv (Cornell University)|Jan 1, 2024
Parallel Computing and Optimization TechniquesComputer Science1 citations
TL;DR

This paper presents a general technique to construct lock-free, linearizable augmented binary trees that support efficient concurrent queries by maintaining immutable version objects for each node. The method enables O(log N) time for insertions, deletions, and order-statistic queries in a wait-free trie and O(h) time in a lock-free BST, with no asymptotic performance cost to updates, while supporting arbitrary multi-point queries like range sums with sequential-time complexity.

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|)).

Motivation & Objective

  • To design a general method for augmenting lock-free tree data structures with additional fields that support efficient concurrent queries.
  • To ensure that updates remain lock-free and linearizable while maintaining O(log N) or O(h) time complexity for operations.
  • To enable queries to obtain a consistent snapshot of the data structure using immutable version objects, allowing sequential query algorithms to be executed safely.
  • To support arbitrary multi-point queries (e.g., range sums, order statistics) with the same time complexity as in the sequential counterpart.
  • To extend the technique to both tries and binary search trees, demonstrating its generality and efficiency.

Proposed method

  • The technique introduces a tree of immutable Version objects that mirror the structure of the original tree, storing augmented fields such as subtree size or sum.
  • Each node in the original tree maintains a pointer to a Version object whose fields are computed from the node’s data and its children’s Version objects.
  • Updates propagate changes cooperatively up the path from leaf to root, using single-word compare-and-swap (CAS) operations to atomically update Version objects.
  • Version objects are never modified after creation, ensuring that reading the root’s Version provides a consistent snapshot for queries.
  • Queries traverse the Version tree using the immutable snapshot, executing sequential logic as if in a static data structure.
  • The method supports any augmentation where the new field can be computed from the node’s data and its children’s fields, such as subtree size, sum, or maximum interval endpoint.

Experimental results

Research questions

  • RQ1Can a general technique be designed to augment lock-free trees with arbitrary fields that depend on node and child data?
  • RQ2Can such an augmentation preserve the asymptotic time complexity of update operations in concurrent settings?
  • RQ3Can queries be implemented to run in the same time complexity as in the sequential version, even under concurrent updates?
  • RQ4Can the technique support complex queries like range sums or order-statistic queries with linearizability guarantees?
  • RQ5Can the method be applied to both tries and binary search trees with similar performance characteristics?

Key findings

  • The proposed technique enables lock-free, linearizable augmented trees where updates take O(log N) steps in a trie and O(h) steps in a BST, with no asymptotic overhead compared to the base data structure.
  • Queries can be implemented by reading a consistent snapshot of the root’s Version object and traversing the immutable Version tree, ensuring correctness and linearizability.
  • The method supports arbitrary multi-point queries such as range sums or interval queries with the same time complexity as in the sequential version.
  • An optimized variant of the trie achieves O(log |S|) query and update complexity, where |S| is the number of elements in the set, at the cost of slightly increased update step count.
  • The technique is general and applies to any augmentation where the new field is a function of the node’s data and its children’s fields, including subtree size, sum, maximum interval endpoint, or product.
  • The approach ensures that no field in a Version object is ever modified after creation, enabling safe, concurrent query execution.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.