Spinlocks The core Linux mutual exclusion primitive A simple, shared integer variable To lock a spinlock: Decrement it by one If resulting value is zero it's yours else increment value go try again (spin) Some implications Spinlocks are very fast Contention is very expensive Sleeping is out of the question