- preemptable resource
- nonpreemptable resource
deadlock
- conditions: (known as the Coffman conditions)
- Mutual exclusion
- Hold and wait or resource holding
- No preemption:
- Circular wait: There is a set of waiting processes P={p1,p2,…,pn}, s.t. pi is waiting for a resource held by p(i+1)modn.
- handling:
- ignoring
- detection and recovery
- detection
- (system) resource-allocation graph
- T={T1,T2,…,Tn}: set of active threads
- R={R1,R2,…,Rm}: set of resource types
- request edge Ti→Rj: thread Ti has requested an instance of resource type Rj
- assignment edge Rj→Ti: an instance of resource type Rj has been allocated to thread Ti
- Multiple Resources
- current allocation matrix
- (E1,E2,…,Em): total number of each resource type
- C[i,j]= number of instances of resource type Rj currently allocated to thread Ti
- request matrix
- (A1,A2,…,Am): number of available instances of each resource type
- R[i,j]= number of instances of resource type Rj requested by thread Ti
- invariant: ∑i=1nC[i,j]+Aj=Ej
- recovery
- preemption
- rollback
- procces killing
- avoidance
- resource trajectories
- safe states
- Banker’s algorithm
- prevention