Now that our operating system supports true multiprocessing and preemptive scheduling, we confront the structural pathologies of concurrent execution. Expanding beyond race conditions on shared memory, we examine the systemic failure states that emerge when threads compete for scarce system resources: Deadlock, Livelock, and Starvation.
lockdep).Contrast CPU-burning livelock with blocking deadlocks, study scheduling starvation, and analyze Priority Inheritance Protocols (PIP) using the Mars Pathfinder anomaly.
Dissect the four necessary and sufficient Coffman conditions: Mutual Exclusion, Hold and Wait, No Preemption, and Circular Wait. Construct Resource Allocation Graphs (RAGs) and execute graph cycle detection.
Evaluate the Ostrich policy, static prevention via global lock hierarchy, runtime detection with victim preemption, and Dijkstra's Banker's Algorithm for multi-unit resource allocation.
Analyze the Dining Philosophers, Readers-Writers starvation, and Sleeping Barber challenges. Investigate production OS deadlock defenses, including Linux lockdep validation and Windows Driver Verifier.
Interactive graph cycle detection sandbox for Resource Allocation Graphs.
Simulate concurrent resource contention, deadlocks, and asymmetric fork solutions.
Trace lock contention, two-phase locking (2PL), and transaction abort/rollback.
Explore synchronous rendezvous message queues and circular wait deadlocks.