Realtime preemption: spinlocks Spinlocks are a latency problem Processor "spins" waiting for a lock Threads holding locks cannot be preempted Thus: spinlocks can block unrelated processes The solution: get rid of spinlocks Create a new type of semaphore "Mutex" Includes priority inheritance Redefine spinlock_t to the new type Some preprocessor ugliness As a result Spinlock contention does not stall processors Code holding locks can be preempted