Safety Check Algorithm
Safety Check Algorithm
Process Need
(A B C D)
P0 (0 0 0 0)
P1 (0 7 5 0)
P2 (1 0 0 2)
P3 (0 0 2 0)
P4 (0 6 4 2)
Initially Available = (1 5 2 0)
Step 3: Check each process ( NOTE : Always select the next process whose Need ≤ Available. )
Final Answer:
System is SAFE.