English

A Lock-free Binary Trie

Data Structures and Algorithms 2025-09-04 v2

Abstract

A binary trie is a sequential data structure for a dynamic set on the universe {0,,u1}\{0,\dots,u-1\} supporting Search with O(1)O(1) worst-case step complexity, and Insert, Delete, and Predecessor operations with O(logu)O(\log u) worst-case step complexity. We give a wait-free implementation of a relaxed binary trie, using read, write, CAS, and (logu\log u)-bit AND operations. It supports all operations with the same worst-case step complexity as the sequential binary trie. However, Predecessor operations may not return a key when there are concurrent update operations. We use this as a component of a lock-free, linearizable implementation of a binary trie. It supports Search with O(1)O(1) worst-case step complexity and Insert, Delete and Predecessor with O(c2+logu)O(c^2 + \log u) amortized step complexity, where cc is a measure of the contention. A lock-free binary trie is challenging to implement as compared to many other lock-free data structures because Insert and Delete operations perform a non-constant number of modifications to the binary trie in the worst-case to ensure the correctness of Predecessor operations.

Keywords

Cite

@article{arxiv.2405.06208,
  title  = {A Lock-free Binary Trie},
  author = {Jeremy Ko},
  journal= {arXiv preprint arXiv:2405.06208},
  year   = {2025}
}