Fixing non-blocking data structures for better compatibility with memory reclamation schemes
Md Amit Hasan Arovi, Ruslan Nikolaev
TL;DR
This work tackles the incompatibility of optimistic traversals in non-blocking data structures with memory reclamation schemes such as Hazard Pointers, Hazard Eras, Interval-Based Reclamation, and Hyaline. It introduces Safe Concurrent Optimistic Traversals (SCOT), a method that adapts data structures (not SMR APIs) to preserve safety and progress while maintaining performance near that of epoch-based reclamation. The authors implement SCOT for Harris' List and Natarajan-Mittal Tree, proving correctness through invariants and ensuring bounded memory overhead and lock-free progress under multiple SMRs. Empirical evaluation shows that SCOT-based implementations achieve high throughput and competitive memory usage, often approaching EBR’s performance, with recovery optimizations reducing restarts and improving scalability across core counts and key ranges.
Abstract
We present a new technique, Safe Concurrent Optimistic Traversals (SCOT), to address a well-known problem related to optimistic traversals with both classical and more recent memory reclamation schemes, such as Hazard Pointers (HP), Hazard Eras (HE), Interval-Based Reclamation (IBR), and Hyaline. Unlike Epoch-Based Reclamation (EBR), these schemes guarantee protection against stalled threads (robustness) but lack support for well-known data structures with optimistic traversals such as Harris' original list, Natarajan-Mittal tree, among others. For these reclamation schemes, existing data structure implementations are either buggy (e.g., Natarajan-Mittal tree) or come with performance trade-offs (e.g., Harris-Michael modified list). A recent work, HP++, supports optimistic traversals but uses a different API and is generally slower than even HP, not to mention more recent schemes such as IBR or Hyaline. Moreover, it has undesirable applicability trade-offs, and more complex implementation, among other issues. We propose a different method which keeps existing reclamation schemes intact but instead relies on data structure adaptations. Unlike existing Harris-Michael approach or HP++, our method retains performance benefits of the original data structure and also does not compromise performance of the underlying reclamation scheme. In fact, for IBR and Hyaline, our results almost match those of EBR, which often serves as a practical upper bound due to its great performance. We implement and evaluate two fundamentally different data structures: Harris' list and Natarajan-Mittal tree. SCOT enables their first correct implementations with optimistic traversals for HP, HE, IBR, and Hyaline.
