Papers
Topics
Authors
Recent
Search
2000 character limit reached

Space-Efficient Lock-Free Linear-Probing Hash Table

Published 15 Jun 2026 in cs.DC and cs.DS | (2606.17315v1)

Abstract: Linear probing is one of the simplest and most space-efficient approaches to hash table design, and is widely used in sequential settings due to its compact memory layout. However, designing a concurrent linear-probing hash table with strong liveness guarantees has proved difficult, and only a handful of such algorithms have been proposed, all of which either restrict concurrency or rely on large per-entry metadata, thereby compromising space efficiency. We present a lock-free linear-probing hash table with wait-free lookups that retains the core advantages of sequential linear probing while handling contention gracefully. Our design uses only a small amount of metadata per table entry: a constant number of additional bits when using LL/SC, or a logarithmic number of bits when using CAS. The algorithm is linearizable and lock-free, supports insert, delete, and wait-free lookup operations, and is able to safely reclaim space used by deleted elements without rebuilding the table. We analyze the amortized step complexity of our hash table assuming no concurrent insertions of the same key, and show that each operation has expected amortized step complexity matching that of sequential linear probing, up to the point contention per key.

Summary

  • The paper introduces a lock-free linear-probing hash table that minimizes per-cell metadata while ensuring wait-free lookups and lock-free insert/delete operations.
  • It employs tentative/final states and revalidate tags to manage concurrent operations robustly, allowing immediate reuse of tombstoned cells without rebuilding the table.
  • Benchmark results indicate that the design maintains cache locality and achieves amortized performance comparable to sequential linear probing under moderate contention.

Space-Efficient Lock-Free Linear-Probing Hash Table: A Technical Synthesis

Motivation and Context

The canonical linear-probing hash table is well-established for achieving high memory locality and space efficiency in sequential (single-threaded) environments, offering compact memory layouts and minimal pointer indirection. However, scaling these advantages into the concurrent (multi-threaded) scenario presents substantial algorithmic complexity. Many lock-free or non-blocking concurrent hash tables in the literature default to chaining or employ indirection, pointer-rich structures, heavy per-cell metadata, periodic rebuilding, or resort to locking—each of these breaks either locality, space efficiency, or both.

Prior concurrent linear probing implementations frequently either sacrifice space complexity (by requiring, for example, unbounded per-entry metadata to handle synchronization and ABA detection) or restrict concurrency and safe reclamation, especially in the presence of deletions (e.g., managing tombstones and handling duplicate inserts for the same key).

Technical Contributions

This paper introduces the first lock-free linear-probing hash table that employs minimal per-cell metadata and supports safe space reclamation of deleted entries without necessitating table-wide rebuilds. The key technical attributes are:

  • Wait-free lookups: Any lookup operation (lookup(v)lookup(v)) completes in a bounded number of steps, independent of contention.
  • Lock-free insert/delete: Insert (insert(v)insert(v)) and delete (delete(v)delete(v)) operations are linearizable and lock-free.
  • Space efficiency: Each cell contains log2U+O(1)\lceil \log_2 U \rceil + O(1) bits (with LL/SCLL/SC), or log2U+min{log2m,log2n}+O(1)\lceil \log_2 U \rceil + \min\{\lceil \log_2 m \rceil, \lceil \log_2 n \rceil\} + O(1) bits (with CASCAS), where UU is the key domain, mm is the table capacity, and nn is the number of processes. This sharply contrasts previous lock-free schemes, e.g., Purcell-Harris [PurcellHarris05], which use unbounded per-entry data.
  • No rebuilding for safety: Table cells occupied by keys can be recycled safely after deletions, removing the necessity for periodic table rebuilds to reclaim "tombstoned" space.
  • Probe-bound runtime: In executions with no overlapping inserts for the same key, the expected amortized step complexity per operation matches sequential linear probing within additive contention.

Concurrency Control and Metadata Management

The design leverages two variants: one based on the insert(v)insert(v)0 primitive (load-linked/store-conditional), and one on the ubiquitous insert(v)insert(v)1 (compare-and-swap). The insert(v)insert(v)2 version achieves minimal per-cell metadata overhead, as proper pairing ensures synchronized updates without the need for explicit version counters or per-thread IDs. The insert(v)insert(v)3 version introduces small additional indices (cell or thread), logarithmic in either the process number or the table size.

Key synchronization mechanisms:

  • Tentative/final states and revalidate tags allow speculation and conflict resolution for in-flight inserts/deletes on the same key with minimal coordination.
  • Insert Elimination: If multiple concurrent inserts of the same key occur, an invariant is maintained where only one "finalized" copy survives, and all others are cleaned up or overwritten with collision/deleted markers. The winner is determined by probe order to avoid circular eliminations.
  • Tombstone management: Unlike traditional tombstone use (where tombstones accumulate, forcing periodic rebuilding), the design enables safe reuse of tombstoned slots immediately, even under concurrency, provided no in-flight conflicting operation is depending on the cell.

In the insert(v)insert(v)4 variant, a “marked” state with process/cell IDs is employed to temporarily reserve tentative copies for potential elimination. This avoids the pitfalls of ABA and enables ownership identification during elimination phases without allocating unbounded extra metadata.

Correctness and Linearizability

A complete formal linearizability proof is given, adapted to the parallel hash table context:

  • Operations are shown to appear atomically at one point during their execution ("linearization points"), and per-key, per-operation histories are merged to a sequential, dictionary-compliant execution.
  • The correctness argument addresses both non-mutator (lookup, failed insert, failed delete) and mutator (successful insert/delete) operations.
  • The notion of “insert sequences” (chains of overlapping inserts on the same key) structures the argument that at any time, for any key, at most one finalized copy can exist, and eliminations proceed monotonically towards the beginning of the probe run.

When a cell contains a tentative copy, all subsequent operations treat the key as present ("helpful" semantics). This is a critical point for multiprocess safety under the possibility of preemption and delayed clean-up.

For deletions, while backward-shifting is theoretically more memory-efficient after deletes, real concurrent backward-shifting introduces prohibitive complexity and metadata overhead; tombstone-based management with bounded metadata and careful conflict resolution achieves robust results in practice.

Amortized Step Complexity

Assuming no overlapping concurrent insertions for the same key, the step complexity for each operation is insert(v)insert(v)5, where insert(v)insert(v)6 parameterizes the load factor (insert(v)insert(v)7 with insert(v)insert(v)8 keys, insert(v)insert(v)9 cells) and delete(v)delete(v)0 is "point contention" (the maximum number of overlapping operations on a given key). This matches classical sequential linear probing [Knuth1963OpenAddressing] up to additive concurrency effects. Under adversarial scheduling, only delete(v)delete(v)1 "excess" tombstones are ever present.

The scheme sharply outperforms previous lock-free linear probing methods in per-cell overhead, wait-free lookups, and robustness under contention. Unlike prior algorithms:

  • It requires no unbounded per-cell timestamps or descriptors.
  • It does not demand rebuilding to reclaim tombstoned space.
  • It supports safe and immediate space reclamation after deletes.
  • It achieves these without pointer indirection or auxiliary arrays, thus preserving cache performance and data locality.

Recently proposed history-independent, concurrent open addressing approaches (e.g., [HIHashTableSTOC25]) and techniques based on helping and rich metadata [PurcellHarris05] are functionally dominated by this construction in both the concurrency and efficiency metrics for the offered feature set.

Implications and Future Directions

From a practical perspective, this design advances the deployment of high-performance, scalable associative arrays in concurrent, memory-constrained environments. The methodology—especially the lock-free cell state protocol—can readily be incorporated into managed run-time systems, object stores, and parallel in-memory indices where pointer avoidance and cache efficiency are paramount.

On the theoretical front, the hash table approaches the cell-probe space lower bounds for dynamic dictionaries [LiLYZ23, BFKKL22] within the limitations of the concurrency model, and establishes a new baseline for space-efficient lock-free objects. Provably succinct lock-free dictionaries remain open, as does the challenge of concurrent backward-shift deletion or history-independent dynamic resizing with similar efficiency.

Potential research advances include dynamic resizing without data migration, extensions for greater deletion locality, and application to specialized domains (e.g., persistent memory, NUMA-aware structures). New progress on constant-time emulation of delete(v)delete(v)2 using delete(v)delete(v)3 for multi-word state [blellochWei20] may further drive reductions in per-cell overhead and broaden architectural portability.

Conclusion

This work realizes a lock-free, space-efficient linear probing hash table that provides wait-free lookup, lock-free updates, and memory usage approaching information-theoretic optima, without resorting to rebuilding or unbounded metadata. The approach resets the tradeoff frontier for concurrent open addressing, offering both theoretical robustness and immediate practical relevance in scenarios requiring compact, concurrent key-value stores.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 6 likes about this paper.