What is Resource Allocation Graph (RAG)? What are the necessary conditions for deadlock? Explain. Determine if the system is safe from deadlock or…
BIT Operating System · 2079 · Solved Question with Answer
What is Resource Allocation Graph (RAG)? What are the necessary conditions for deadlock? Explain. Determine if the system is safe from deadlock or not using Banker's Algorithm for given condition.
[Note: Consider process sequence as: P1, P2, P3, P4, P5]
| Need Matrix | |||
|---|---|---|---|
| Process | A | B | C |
| P1 | 11 | 6 | 4 |
| P2 | 3 | 4 | 1 |
| P3 | 8 | 2 | 3 |
| P4 | 3 | 2 | 4 |
| P5 | 5 | 2 | 3 |
| Allocation Matrix | |||
|---|---|---|---|
| Process | A | B | C |
| P1 | 3 | 1 | 1 |
| P2 | 3 | 1 | 0 |
| P3 | 4 | 1 | 1 |
| P4 | 1 | 0 | 1 |
| P5 | 2 | 0 | 1 |
| MAX Resource Matrix | ||
|---|---|---|
| A | B | C |
| 17 | 8 | 10 |
