We present a new technique, Safe Concurrent Optimistic Traversals (SCOT), to address a well-known problem related to optimistic traversals with classical and more recent safe memory reclamation (SMR) schemes, such as Hazard Pointers (HP), Hazard Eras (HE), Interval-Based Reclamation (IBR), and Hyaline. Unlike Epoch-Based Reclamation (EBR), these (robust) schemes protect against stalled threads but lack support for well-known data structures with optimistic traversals, e.g., Harris' list and the Natarajan-Mittal tree. Such schemes are either incompatible with them or need changes with performance trade-offs (e.g., the Harris-Michael list). SCOT keeps existing SMR schemes intact and retains performance benefits of original data structures. We implement and evaluate SCOT with Harris' list and the Natarajan-Mittal tree, but it is also applicable to other data structures. Furthermore, we provide a simple modification for wait-free traversals. We observe similar performance speedups (e.g., Harris vs. Harris-Michael lists) that were previously available only to EBR users. Our version of the tree also achieves very high throughput, comparable to that of EBR, which is often treated as a practical upper bound.
翻译:我们提出了一种新技术——安全并发乐观遍历(SCOT),以解决经典及近期安全内存回收(SMR)方案(如危险指针(HP)、危险纪元(HE)、基于区间的回收(IBR)和Hyaline)中与乐观遍历相关的已知问题。与基于纪元的回收(EBR)不同,这些(鲁棒性)方案虽能防范线程停滞,却缺乏对采用乐观遍历的经典数据结构(如Harris链表和Natarajan-Mittal树)的支持。此类方案要么与这些数据结构不兼容,要么需要以性能折损为代价进行修改(例如Harris-Michael链表)。SCOT在保持现有SMR方案不变的同时,保留了原始数据结构的性能优势。我们在Harris链表和Natarajan-Mittal树上实现并评估了SCOT,但该技术同样适用于其他数据结构。此外,我们还提供了一种实现无等待遍历的简易修改方案。实验观察到与以往仅EBR用户可获得的性能加速相当的效果(例如Harris链表与Harris-Michael链表的对比)。我们实现的树结构版本也达到了与常被视为实际性能上限的EBR方案相媲美的高吞吐量。