be vectors of length and m n,  respectively. Initialize Work := Available  Finish[i] := false for = 1,2,…,n.  Find an i (i.e. process Pi) such that both:  = Finish[i] false  Need_i <= Work  If no such i exists, go to step 4.  Work := Work + Allocation_i  Finish[i] := true  go to step 2  If Finish[i] = true for all i, then the system is in a safe  state. Let Work and 30 Resource-Request Algorithm
    Let Work and be vectors of length m and n, respectively. Initialize  Work := Available  Finish[i] := false for = 1,2,…,n. Find an i (i.e. process Pi) such that both:  Finish[i] = false  Need_i <= Work  If no such i exists, go to step 4. Work := Work + Allocation_i  Finish[i] := true  go to step 2 If Finish[i] = true for all i, then the system is in a safe state. 30 Resource-Request Algorithm