SeniorLock: Wait-free locks that never help later arrivals
A new lock ensures threads finish regardless of later requests, eliminating indefinite helping.
Deep Dive
Tong Che's SeniorLock introduces retrospective wait-freedom: a call with ticket-time seniority β completes in O((β+1)(T+1)) steps, independent of later arrivals. It wraps critical sections in deterministic helpable thunks, doubling as a universal construction (SeniorObj) for any sequential object. No copying needed, and idle seniors incur native operation cost.
Key Points
- SeniorLock guarantees deterministic wait-freedom with retrospective cost: only active requests at ticket time count.
- Complexity is O((β+1)(T+1)) steps, with β being ticket seniority and T thunk execution cost.
- SeniorObj provides a universal construction for any sequential object, no copying needed, near-native overhead when idle.
Why It Matters
Removes starvation in wait-free locks, enabling more predictable and efficient concurrent systems for distributed computing.