[Paper Review] Constant RMR Recoverable Mutex under System-wide Crashes
This paper presents two novel Recoverable Mutual Exclusion (RME) locks designed for system-wide crashes in both cache-coherent (CC) and distributed shared memory (DSM) models. Using only standard atomic instructions (CAS, FAS), the algorithms achieve O(1) worst-case RMR complexity and constant space per process, while supporting dynamically created threads. The key contribution is a provable separation between system-wide and individual crash models in RMR complexity, demonstrating that system-wide crashes enable constant RMR performance where individual crash models have a lower bound of Ω(log n / log log n).
Recoverable mutual exclusion (RME) is a fault-tolerant variation of Dijkstra’s classic mutual exclusion (ME) problem that allows processes to fail by crashing as long as they recover eventually. A growing body of literature on this topic, starting with the problem formulation by Golab and Ramaraju (PODC'16), examines the cost of solving the RME problem, which is quantified by counting the expensive shared memory operations called remote memory references (RMRs), under a variety of conditions. Published results show that the RMR complexity of RME algorithms, among other factors, depends crucially on the failure model used: individual process versus system-wide. Recent work by Golab and Hendler (PODC'18) also suggests that explicit failure detection can be helpful in attaining constant RMR solutions to the RME problem in the system-wide failure model. Follow-up work by Jayanti, Jayanti, and Joshi (SPAA'23) shows that such a solution exists even without employing a failure detector, albeit this solution uses a more complex algorithmic approach. In this work, we dive deeper into the study of RMR-optimal RME algorithms for the system-wide failure model, and present contributions along multiple directions. First, we introduce the notion of withdrawing from a lock acquisition rather than resetting the lock. We use this notion to design a withdrawable RME algorithm with optimal O(1) RMR complexity for both cache-coherent (CC) and distributed shared memory (DSM) models in a modular way without using an explicit failure detector. In some sense, our technique marries the simplicity of Golab and Hendler’s algorithm with Jayanti, Jayanti and Joshi’s weaker system model. Second, we present a variation of our algorithm that supports fully dynamic process participation (i.e., both joining and leaving) in the CC model, while maintaining its constant RMR complexity. We show experimentally that our algorithm is substantially faster than Jayanti, Jayanti, and Joshi’s algorithm despite having stronger correctness properties. Finally, we establish an impossibility result for fully dynamic RME algorithms with bounded RMR complexity in the DSM model that are adaptive with respect to space, and provide a wait-free withdraw section.
Motivation & Objective
- To design RME locks that tolerate system-wide crashes in both CC and DSM models, where all processes crash simultaneously due to power outages.
- To achieve O(1) worst-case RMR complexity in both CC and DSM models, surpassing known lower bounds in the individual crash model.
- To support dynamically created threads with arbitrary names joining the protocol at runtime, without pre-allocation.
- To ensure bounded recovery and bounded exit properties, enabling efficient and predictable restart after crashes.
- To demonstrate a theoretical separation between system-wide and individual crash models in terms of worst-case RMR complexity.
Proposed method
- Designs a two-phase RME protocol using three-phase locks (Lock[0], Lock[1], Lock[2]) to manage critical section access and recovery state.
- Employs a sequence number (Seq) and state tracking (Sp, Sq, CSowner, Stop) to coordinate process states and ensure mutual exclusion during recovery.
- Uses atomic operations—CAS and FAS—to implement lock acquisition and release, ensuring correctness under system-wide crashes.
- Introduces a recovery mechanism where processes invoke ℓ.recoverp() after restart, returning IN REM or IN CS based on their last state.
- Employs a state machine with 28 program counter states per process to track progress and ensure correct resumption after crash.
- Uses a three-phase lock abstraction (Lock[i].try, Lock[i].exit, Lock[i].recover) to coordinate access and ensure bounded recovery and exit.
Experimental results
Research questions
- RQ1Can O(1) worst-case RMR complexity be achieved for RME locks under system-wide crashes in both CC and DSM models?
- RQ2Is it possible to design an RME lock that supports dynamically created threads without pre-allocation and maintains constant space and RMR?
- RQ3Does the system-wide crash model allow for better RMR complexity than the individual crash model, given known lower bounds?
- RQ4Can bounded recovery and bounded exit be achieved in a system-wide crash model while maintaining O(1) RMR?
- RQ5What structural properties of system-wide crashes enable a separation in RMR complexity compared to individual crashes?
Key findings
- The first algorithm achieves O(1) worst-case RMR complexity in the CC model with O(1) space per process and supports dynamic thread joining.
- The second algorithm extends the first to achieve O(1) worst-case RMR complexity in both CC and DSM models under the same space and dynamic joining constraints.
- The algorithms are the first to achieve O(1) worst-case RMR complexity in both models under standard hardware support (CAS, FAS).
- The work establishes a theoretical separation: system-wide crashes allow O(1) RMR, while the individual crash model has a lower bound of Ω(log n / log log n) RMR.
- The protocols ensure critical section reentry (CSR), mutual exclusion, starvation freedom, bounded recovery, and bounded exit.
- Formal inductive invariants are proven to verify correctness across all configurations, including crash and restart scenarios.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.