Lock-free locks revisited
Naama Ben-David, Guy E. Blelloch, Yuanhao Wei
摘要
This paper presents a new and practical approach to lockfree locks based on helping, which allows the user to write code using fine-grained locks, but run it in a lock-free manner. Although lock-free locks have been suggested in the past, they are widely viewed as impractical, have some key limitations, and, as far as we know, have never been implemented. The paper presents some key techniques that make lock-free locks practical and more general. The most important technique is an approach to idempotence-i.e. making code that runs multiple times appear as if it ran once. The idea is based on using a shared log among processes running the same protected code. Importantly, the approach can be library based, requiring very little if any change to standard code-code just needs to use the idempotent versions of memory operations (load, store, LL/SC, allocation, free).
We have implemented a C++ library called Flock based on the ideas. Flock allows lock-based data structures to run in either lock-free or blocking (traditional locks) mode. We implemented a variety of tree and list-based data structures with Flock and compare the performance of the lock-free and blocking modes under a variety of workloads. The lockfree mode is almost as fast as blocking mode under almost all workloads, and significantly faster when threads are oversubscribed (more threads than processors). We also compare with several existing lock-based and lock-free alternatives.
• Theory of computation → Concurrent algorithms.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper2
- RRR-SMR: Reduce, Reuse, Recycle: Better Methods for Practical Lock-Free Data StructuresMd Amit Hasan Arovi, Ruslan NikolaevPLDI 2025 · 被引用 2 次
- Bounding Speculative Execution of Atomic Regions to a Single RetryEduardo José Gómez-Hernández, Juan M. Cebrian, Stefanos Kaxiras, Alberto RosASPLOS 2024
相关 Paper
- Fast and Scalable In-network Lock Management Using Lock FissionHanze Zhang, Ke Cheng, Rong Chen, Haibo ChenOSDI 2024 · 被引用 9 次
- Concurrent Balanced Augmented TreesEvan Wrench, Ajay Singh, Younghun Roh, Panagiota Fatourou 等PPoPP 2026
- Hapax Locks: Scalable Value-Based Mutual ExclusionDave Dice, Alex KoganPPoPP 2026 · 被引用 2 次
- OrcGC: automatic lock-free memory reclamationAndreia Correia, Pedro Ramalhete, Pascal FelberPPoPP 2021 · 被引用 19 次
- Scalable range locks for scalable address spaces and beyondAlex Kogan, Dave Dice, Shady IssaEuroSys 2020 · 被引用 4 次
