- Let Work and Finish be vectors of length m and n, respectively. Initialize:
Work = Available
Finish [i] = false for i - 1,3, …,
n.
- Find and i such that both:
- Finish [i] = false
- Needi £ Work
If
no such i exists, go to step 4.
- Work = Work + Allocationi
Finish[i] = true
go to step 2.
go to step 2.
- If Finish [i] == true for all i, then the system is in a safe state.
No comments:
Post a Comment