Skip to main content
QUICK REVIEW

[Paper Review] A new and five older Concurrent Memory Reclamation Schemes in Comparison (Stamp-it)

Manuel Pöter, Jesper Larsson Träff|arXiv (Cornell University)|Dec 17, 2017
Distributed systems and fault toleranceComputer Science25 references3 citations
TL;DR

This paper introduces Stamp-it, a novel lock-free, amortized constant-time memory reclamation scheme that avoids scanning all threads to determine reclaimability, unlike prior schemes. Evaluated across four architectures with up to 512 threads, Stamp-it outperforms five established schemes—including Hazard Pointers, Epoch-based Reclamation, and Reference Counting—in reclamation efficiency and runtime, especially under high concurrency.

ABSTRACT

Memory management is a critical component in almost all shared-memory, concurrent data structures and algorithms, consisting in the efficient allocation and the subsequent reclamation of shared memory resources. This paper contributes a new, lock-free, amortized constant-time memory reclamation scheme called \emph{Stamp-it}, and compares it to five well-known, selectively efficient schemes from the literature, namely Lock-free Reference Counting, Hazard Pointers, Quiescent State-based Reclamation, Epoch-based Reclamation, and New Epoch-based Reclamation. An extensive, experimental evaluation with both new and commonly used benchmarks is provided, on four different shared-memory systems with hardware supported thread counts ranging from 48 to 512, showing Stamp-it to be competitive with and in many cases and aspects outperforming other schemes.

Motivation & Objective

  • To address the performance bottleneck in concurrent memory reclamation caused by scanning all threads to detect reclaimable nodes.
  • To design a general-purpose, non-intrusive, portable, and standard-conforming memory reclamation scheme compatible with C++ and modern hardware.
  • To evaluate Stamp-it against five well-known schemes under diverse workloads and architectures to establish its superiority in scalability and efficiency.
  • To reduce memory pressure and improve reclamation latency, especially in high-concurrency scenarios with many threads.
  • To provide a production-ready, open-source implementation of all schemes for reproducibility and real-world use.

Proposed method

  • Introduces a new reclamation mechanism, Stamp-it, that uses a global 'stamp' value to track thread activity and detect when a node can be safely reclaimed without scanning all threads.
  • Employs a per-thread local retire list and a global retire list, with reclamation triggered only when the global stamp indicates no active references.
  • Uses hardware-supported atomic operations (CAS, FAA) to ensure lock-free progress and thread safety, avoiding non-standard instructions.
  • Implements a restart mechanism during reclamation: if the global stamp changes mid-reclamation, the process restarts with the new stamp to avoid race conditions.
  • Designs a thread-local data structure that tracks node references and retires them to the global list only when necessary, minimizing contention.
  • Uses a standardized C++ interface (as proposed by Robison [29]) to ensure portability and non-intrusiveness across different data structures.

Experimental results

Research questions

  • RQ1Can a memory reclamation scheme achieve amortized constant-time reclamation without scanning all threads?
  • RQ2How does Stamp-it compare to established schemes (e.g., Hazard Pointers, Epoch Reclamation) in terms of reclamation efficiency and runtime under high concurrency?
  • RQ3What is the impact of thread count (up to 512) on reclamation performance and memory pressure across different architectures?
  • RQ4How does Stamp-it handle the 'last thread' problem—where no thread is left to reclaim the remaining retired nodes—compared to other schemes?
  • RQ5Can a general-purpose, non-reference-counting reclamation scheme match or exceed the performance of reference counting while avoiding its memory overhead?

Key findings

  • Stamp-it achieves amortized constant-time reclamation per node without scanning all threads, unlike all other schemes except reference counting.
  • In the HashMap benchmark on Sparc, Stamp-it and LFRC show decreasing runtime over trials, while HP, ER, NER, and QSR show increasing runtime due to uncollected memory pressure.
  • On all architectures, Stamp-it outperforms HP, ER, NER, and QSR in reclamation efficiency, with significantly fewer unreclaimed nodes over time.
  • The number of unreclaimed nodes for HP, ER, NER, and QSR increases steadily and fails to drop to zero even after all threads terminate, indicating persistent memory pressure.
  • Stamp-it mitigates the 'last thread' race condition by using a lightweight stamp-based restart mechanism, reducing memory leaks and improving final reclamation.
  • On systems with 48–512 hardware threads, Stamp-it consistently outperforms or matches all other schemes in both performance and memory efficiency, especially under high thread counts.

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.