Spin/Sleep Proactive‐Awakening Locks for Alternative Performance/Energy Trade‐Offs
- 19 November 2025
- journal article
- Published by Wiley in Concurrency and Computation: Practice and Experience
- Vol. 37 (27-28)
Abstract
Locking plays a crucial role since it ensures synchronized access by concurrent threads to shared resources—like shared data structures to be managed in critical sections. Traditional sleep locks—based on blocking operating system services—adopt a reactive approach (e.g., upon lock release) to waking up waiting threads, which might introduce additional latency on the critical path. On the opposite side, non‐blocking locks, like spinlocks, allow threads to wait while still using CPU cycles for checking and updating the lock variable, which causes the waste of both cycles and energy. In this article, we present a new locking algorithm, called SSPA (Spin/Sleep Proactive‐Awakening)—and its implementation for Linux systems—which combines spin and sleep waiting phases via the introduction of an innovative proactive wake‐up mechanism that exploits the SoftIRQ daemon of the Linux kernel. Our solution allows threads to be awakened from their sleep phases on time to be already CPU dispatched when the lock is really released. This provides the opportunity to quickly access the critical section while at the same time enabling control over the actual amount of CPU cycles that are spent by spinning wait phases. As we show via experimental data, our solution allows exploring new trade‐offs between responsiveness and CPU/energy efficiency in concurrent applications, hence rising as an interesting alternative to literature solutions.Keywords
This publication has 11 references indexed in Scilit:
- Metronome: Adaptive and Precise Intermittent Packet Retrieval in DPDKIEEE/ACM Transactions on Networking, 2022
- Mutable locks: Combining the best of spin and sleep locksConcurrency and Computation: Practice and Experience, 2020
- Scalable and practical locking with shuffling2019
- Lock–UnlockACM Transactions on Computer Systems, 2018
- Malthusian Locks2017
- Shared-Memory Synchronization2013
- Measuring Energy and Power with PAPI2012
- Empirical studies of competitve spinning for a shared-memory multiprocessor1991
- Algorithms for scalable synchronization on shared-memory multiprocessorsACM Transactions on Computer Systems, 1991
- The performance of spin lock alternatives for shared-memory multiprocessorsIEEE Transactions on Parallel and Distributed Systems, 1990