What this operating-systems concurrency question tests
This is a medium-difficulty question on the fundamentals of lock implementation and mutual exclusion on a single-core processor. It probes whether a candidate understands the gap between a naive lock design and one that actually prevents race conditions and ensures correctness.
The core challenge is recognizing what can go wrong when a lock-acquire routine is not atomic, and what remedies are available on a uniprocessor system. Rather than demanding deep knowledge of hardware primitives, the question rewards clear reasoning about the order of operations, the role of the scheduler, and practical techniques for achieving atomicity.
- Atomicity and critical sections
- Interrupt disabling and context switching
- Busy-waiting and spinlock design
- Single-core vs. multi-core constraints