Lock-Free Locks Revisited
Naama Ben-David, Guy E. Blelloch, Yuanhao Wei

TL;DR
This paper introduces a practical lock-free lock approach using helping and idempotence, implemented in a C++ library, enabling lock-based data structures to operate in lock-free mode with comparable or better performance.
Contribution
It presents a novel, practical method for lock-free locks based on helping and idempotence, with an implementation that requires minimal code changes.
Findings
Lock-free mode performs nearly as well as blocking mode in most workloads.
Lock-free mode outperforms blocking when threads are oversubscribed.
The approach is practical and can be integrated with existing code with minimal modifications.
Abstract
This paper presents a new and practical approach to lock-free 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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsParallel Computing and Optimization Techniques · Software System Performance and Reliability · Cloud Computing and Resource Management
