Reciprocating Locks
Dave Dice, Alex Kogan
Abstract
We present Reciprocating Locks, a novel mutual exclusion locking algorithm, targeting cache-coherent shared memory (CC), that enjoys a number of desirable properties. The doorway arrival phase and the Release operation both run in constant-time. Waiting threads use local spinning and only a single waiting element is required per thread, regardless of the number of locks a thread might hold at a given time. While our lock does not provide strict FIFO admission, it bounds bypass and has strong anti-starvation properties. The lock is compact, space efficient, and has been intentionally designed to be readily usable in real-world general purpose computing environments such as pthreads, or C++. We show the lock exhibits high throughput under contention and low latency in the uncontended case. Under sustained contention, Reciprocating Locks generate less coherence traffic than MCS and CLH. The performance of Reciprocating Locks is competitive with and often better than the best state-of-the-art scalable queue-based spin locks.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 18149019-c157-403e-a7ed-d1f5e9d61aa4Builds on1
Related papers
- Fairer and More Scalable Reader-Writer Locks by Optimizing Queue ManagementTakashi Hoshino, Kenjiro TauraPPoPP 2025 · 1 citation
- OptiQL: Robust Optimistic Locking for Memory-Optimized IndexesGe Shi, Ziyi Yan, Tianzheng WangSIGMOD 2024 · 3 citations
- Efficient, Distributed, and Non-Speculative Multi-Address Atomic OperationsEduardo José Gómez-Hernández, Juan M. Cebrian, J. Rubén Titos Gil, Stefanos Kaxiras et al.MICRO 2021 · 8 citations
- ShiftLock: Mitigate One-sided RDMA Lock Contention via HandoverJian Gao, Qing Wang, Jiwu ShuFAST 2025 · 10 citations
- Avoiding scheduler subversion using scheduler-cooperative locksYuvraj Patel, Leon Yang, Leo Prasath Arulraj, Andrea C. Arpaci-Dusseau et al.EuroSys 2020 · 6 citations
