Source: Chapter 8 (Part I) from lecture slides by Neerja Mhaskar, McMaster University.
This lecture focuses on deadlocks in operating systems, their characteristics, and the various methods for handling deadlocks. It includes topics such as the system model, resource allocation graphs, deadlock characterization, and safe state determination.
R1, R2, ..., Rm
(e.g., CPU cycles, memory space, I/O devices).Ri
, has Wi
instances (e.g., two instances of a printer).Deadlock occurs when all the following four conditions hold simultaneously:
{P0, P1, ..., Pn}
such that:
P0
is waiting for a resource held by P1
,P1
is waiting for a resource held by P2
, and so on,Pn
is waiting for a resource held by P0
.Visual Representation:
Consider a circular wait with P0, P1, ..., Pn
, where each process is waiting for a resource held by the next process in the sequence, forming a cycle.