Possible Approaches
Deadlock Avoidance
- general idea: provide info in advance about what resources will be needed by processes to guarantee that deadlock will not exist.
E.g., define a sequence of procs <P1,P2,..Pn> as safe if for each Pi, the resources that Pi can still request can be satisfied by the currently available resources plus the resources held by all Pj,j<i.
- this avoids circularities.
- when a process requests a resource, the system grants or forces it to wait, depending on whether this would be an unsafe state.