In: Computer Science
Consider a system consisting of four processes and a single resource. The current state of the claim and allocation matrices is:
What is the minimum number of units of the resource needed to be available for this state to be safe?
The number of available units required for the state to be safe is 3, making a total of 10 units in the system. In the state shown in the problem, if one additional unit is available, P2 can run to completion, releasing its resources, making 2 units available. This would allow P1 to run to completion making 3 units available. But at this point P3 needs 6 units and P4 needs 5 units. If to begin with, there had been 3 units available instead of 1 unit, there would now be 5 units available. This would allow P4 to run to completion, making 7 units available, which would allow P3 to run to completion.
This would allow P4 to run to completion, making 7 units available, which would allow P3 to run to completion.