Spinlock
Everything on SkillVeris tagged Spinlock — collected across the glossary, study notes, blog, and cheat sheets.
6 resources across 1 library
Interview Questions(6)
What is the Test-and-Set Instruction?
Test-and-set is a hardware-atomic CPU instruction that reads a memory location, sets it to true, and returns the old value, all as one indivisible operation, w…
What is a Spinlock?
A spinlock is a locking mechanism where a thread that cannot acquire the lock repeatedly polls it in a tight busy-wait loop instead of yielding the CPU or slee…
How is a Mutex Lock Actually Implemented?
A mutex is implemented as a memory word holding a locked/unlocked flag plus a wait queue, where acquiring it uses an atomic instruction such as compare-and-swa…
What is Busy Waiting and Why is it Costly?
Busy waiting is when a thread repeatedly checks a condition in a tight loop instead of yielding the CPU or being put to sleep, which wastes CPU cycles and star…
Overview of Synchronization Primitives: Mutex, Semaphore, Condition Variable, Spinlock
Synchronization primitives are the building blocks — mutexes, semaphores, condition variables, and spinlocks — that operating systems and languages provide to…
What Hardware Support Exists for Process Synchronization?
Hardware support for process synchronization refers to CPU instructions — such as Test-and-Set, Swap (Exchange), and Compare-and-Swap — that execute as a singl…