Non-blocking timeout in scalable queue-based spin locks
Michael Lee Scott · 2002
Queue-based spin locks allow programs with busy-wait synchronization to scale to very large multiprocessors, without fear of starvation or performance-destroying contention. Timeout-capable spin locks allow a thread to abandon its attempt to acquire a lock; they are used widely in real-time systems to avoid overshooting a deadline, and in database systems to recover from transaction deadlock and to tolerate preemption of the thread that holds a lock.In previous work we showed how to incorporate timeout in scalable queue-based locks. Technological trends suggest that this combination will be of increasing commercial importance. Our previous solutions, however, require a thread that is timing out to handshake with its neighbors in the queue, a requirement that may lead to indefinite delay in a preemptively multiprogrammed system.In the current paper we present new queue-based locks in which the timeout code is non-blocking. These locks sacrifice the constant worst-case space per thread of our previous algorithms, but allow us to bound the time that a thread may be delayed by preemption of its peers. We present empirical results indicating that space needs are modest in practice, and that performance scales well to large machines. We also conjecture that constant per-thread space cannot be guaranteed together with non-blocking timeout in a queue-based lock.
Cited by 54 works. doi:10.1145/571825.571830 Open-access PDF
Authors
References
- Algorithms for scalable synchronization on shared-memory multiprocessors
- Scheduling Techniques for Concurrent Systems.
- Scheduler activations
- The performance of spin lock alternatives for shared-memory multiprocessors
- Empirical studies of competitve spinning for a shared-memory multiprocessor
- The MIT Alewife machine
- Synchronization algorithms for shared-memory multiprocessors
- Scheduling support for concurrency and parallelism in the Mach operating system
- First-class user-level threads
- Process Management for Highly Parallel Unix Systems