= Spinlock
{wiki}
A mechanism that waits for ownership by repeatedly trying while consuming <CPU> execution time. A <spinlock> built from <test-and-set> can enforce <mutual exclusion> without guaranteeing <starvation freedom>. Progress also requires the owner to run and release: if a waiting <software thread> monopolizes the only <CPU> while the owner is suspended, exclusive entry alone cannot help.<Operating Systems: Three Easy Pieces by Remzi H. Arpaci-Dusseau and others/Locks>[pp. 8–9: preemption requirement and lack of fairness guarantees]{ref}
Back to article page