Ticket Spinlocks in Zephyr RTOS: What, Where & Why
summary
Zephyr gains a ticket spinlocks option that replaces the single-flag spinlock with a two-word ticket/owner scheme, plus a new spinlock fairness test that ran on 4-core Arc and RISC‑V boards and in the Synopsys simulator. On bare hardware and in simulation ticket locks restore per‑core fairness (previously one core could monopolize a lock), at the cost of one extra atomic increment and a couple more barriers. The feature is experimental; it works in CI and on hardware but still shows corner cases under host scheduling/virtualization and on platforms lacking cross‑core atomics.
AI-written summary · about
chapters (11)
- 0:00Ticket spinlocks in Zephyr
- 1:05Investigating spinlocks
- 5:02Spinlock fairness issues
- 10:00Spinlock fairness test
- 12:35Hardware impact on fairness
- 14:24Ticket spinlocks solve fairness
- 19:06Testing on platforms
- 22:38Performance impact
- 24:24Implementation issues
- 29:04Status and future plans
- 32:01Q&A
related talks
37mTicket Spinlocks in Zephyr RTOS: What, Where & Why
35mMulti-core Application Development with Zephyr RTOS
35mMulti-core Application Development with Zephyr RTOS
17m60 Adaptive userspace spinlocks with rseq
15mRON: One-Way Circular Shortest Routing to Achieve Efficient and Bounded-waiting Spinlocks
25mAdaptive futexes: spin if the owner is still running on another CPU
01h 38mLock-free Programming is Dead - Long Live Lock-free Programming!
41mTurning the Ignition on Safety: Zephyr RTOS in Automotive Compliance
