Skip to main content
QUICK REVIEW

[Paper Review] VBR: Version Based Reclamation

Gali Sheffi, Maurice Herlihy|arXiv (Cornell University)|Jan 1, 2021
Distributed systems and fault toleranceComputer Science47 references6 citations
TL;DR

This paper introduces Version-Based Reclamation (VBR), a fully optimistic, lock-free memory reclamation scheme that enables speculative execution for both reads and writes on retired memory objects. By extending objects with per-field version counters, VBR detects and rejects invalid accesses due to reclamation, ensuring correctness without relying on hardware or OS assumptions beyond double-word CAS, and outperforms existing solutions in lock-free data structures.

ABSTRACT

Safe lock-free memory reclamation is a difficult problem. Existing solutions follow three basic methods (or their combinations): epoch based reclamation, hazard pointers, and optimistic reclamation. Epoch-based methods are fast, but do not guarantee lock-freedom. Hazard pointer solutions are lock-free but typically do not provide high performance. Optimistic methods are lock-free and fast, but previous optimistic methods did not go all the way. While reads were executed optimistically, writes were protected by hazard pointers. In this work we present a new reclamation scheme called version based reclamation (VBR), which provides a full optimistic solution to lock-free memory reclamation, obtaining lock-freedom and high efficiency. Speculative execution is known as a fundamental tool for improving performance in various areas of computer science, and indeed evaluation with a lock-free linked-list, hash-table and skip-list shows that VBR outperforms state-of-the-art existing solutions.

Motivation & Objective

  • To address the challenge of safe, lock-free memory reclamation in concurrent systems without relying on blocking mechanisms or hardware extensions.
  • To eliminate performance bottlenecks in existing reclamation schemes, particularly the use of hazard pointers for writes, which limits optimization.
  • To achieve full speculative execution—both for reads and writes—while maintaining linearizability and lock-freedom.
  • To design a scheme that is robust against non-responsive threads and avoids memory exhaustion due to stalled reclamation.
  • To provide a practical, efficient, and portable solution that works on standard architectures without requiring OS or hardware modifications.

Proposed method

  • VBR extends each shared object with version counters for each mutable field, enabling detection of stale or invalid memory accesses.
  • It uses a global epoch counter and per-thread local epoch tracking to determine when a retired object can be reclaimed.
  • A thread speculatively accesses a retired object only if its version numbers match the current epoch; mismatches trigger a rollback or retry.
  • The scheme integrates checkpoints in interface operations (e.g., add, remove, contains) to support safe rollback after speculative access failures.
  • It leverages double-word compare-and-swap (CAS) instructions to atomically update epoch and version information, ensuring consistency.
  • Failures due to reclamation validation are handled via retry logic, which is integrated into the control flow of lock-free data structures.

Experimental results

Research questions

  • RQ1Can a fully optimistic memory reclamation scheme be designed that supports speculative access for both reads and writes without relying on hazard pointers?
  • RQ2How can versioning be used to detect and reject invalid memory accesses during speculative execution in a lock-free manner?
  • RQ3Can such a scheme guarantee lock-freedom and avoid blocking due to non-responsive threads, even in the worst case?
  • RQ4What is the performance overhead of versioning compared to existing hybrid or conservative reclamation methods in real concurrent data structures?
  • RQ5How can speculative access failures be handled efficiently and transparently within the control flow of lock-free algorithms?

Key findings

  • VBR achieves full lock-freedom and avoids the blocking issues of epoch-based reclamation by ensuring that no thread can stall reclamation indefinitely.
  • The scheme outperforms state-of-the-art solutions, including epoch-based and hazard pointer-based methods, in benchmarks on lock-free linked lists, hash tables, and skip lists.
  • VBR enables immediate reuse of retired objects after retirement, improving space efficiency without compromising correctness.
  • The use of versioned fields allows both speculative reads and writes, eliminating the need for costly memory fences on write operations.
  • The method is portable and relies only on widely available double-word CAS instructions, making it practical for deployment on modern architectures.
  • Failures due to reclamation validation are handled naturally within the control flow of existing lock-free data structures, with minimal performance impact when properly integrated.

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.