Could somebody please provide a step-through approach to solving the following problem using the Banker's Algorithm?
A system contains 10 units of resource class Ru. The resource requirements of three user processes P1, P2 and P3 are as follows
| P1 | P2 | P3 | Max Requirement | 8 | 7 | 5 | Current Allocation | 3 | 1 | 3 | Balance Requirement | 5 | 6 | 2 | New Request Made | 1 | 0 | 0 |
Using Banker’s algorithm, determine if the projected allocation state is safe and whether the request of P1 will be granted or not.
total recources :10 total allocation :7 available: 10 -7 = 3
Need P1 5 P2 6 P3 2 3>2 so P3 can run now available is 6 6>5 so P1 can run now availabl 9 9>6 so P2 can run
System is safe state,Hence P1 will be granted.
But I'm not sure if my solution is true.