Cheat sheets

OS-10Cheat sheet1 pageIn a paid pack

Deadlock: Conditions and Graphs

Deadlock defined and separated from starvation and livelock; the four necessary conditions; the resource-allocation graph and the wait-for graph, and why a cycle means deadlock only with single-instance resources, with a figure of a cycle that is not a deadlock; prevention by breaking each condition, including resource ordering; the four handling strategies; and the minimum number of resource units that makes deadlock impossible, checked by brute force, with the solved GATE CS 2026 Set 1 Q.35.

Diagrams from OS-10

OS-11Cheat sheet1 pageIn a paid pack

Banker's Algorithm, Detection

The Banker's data structures (Available, Max, Allocation, Need); the safety algorithm with a full worked run and the number of safe sequences; the resource-request algorithm with grant, deny, wait and error outcomes on the same example; safe versus unsafe versus deadlocked; the detection algorithm that uses current Request instead of Need, with a worked example that finds a deadlocked set; recovery by termination or preemption; and the cost of each algorithm.