Safety Check
1. new vars: work[1..m] = available ; to accumulate resources
finish[1..n] = false (for all i) ; none finished yet
2. find an i s.t. finish[i]=false and need[i] <= work
(find a proc that can complete its request now)
if no such i exists, go to step 4 (we’re done)
finish [i] = true ; done with this process
work = work + allocation [i] (assume this process were to finish, and its allocation back to the available list)
4. If finish[i] = true for all i, the system is safe.