Consider a system with 3 processes P0 to P2 and 3 resource types A, B, and C.…
2025
Consider a system with 3 processes P0 to P2 and 3 resource types A, B, and C. Resource type A has 10 instances, resource type B has 5 instances and resource type C has 7 instances. The following snapshot of the system has been taken at a given time.
Allocation (A B C) | Max (A B C) | Available (A B C) | |
P0 | 0 1 0 | 7 5 3 | 5 4 5 |
P1 | 2 0 0 | 3 2 2 | |
P2 | 3 0 2 | 9 0 2 |
Which of the following is true?
Answer: C. The system is in safe state — First, calculate the Need matrix by subtracting Allocation from Max for each process. P0 needs [7, 4, 3], P1 needs [1, 2, 2], and P2 needs [6, 0, 0]. With…
- A.
The system is not in safe state
- B.
The system is blocked
- C.
The system is in safe state
- D.
The request cannot be granted to all the processes
Attempted by 227 students.
Show answer & explanation
Correct answer: C
First, calculate the Need matrix by subtracting Allocation from Max for each process. P0 needs [7, 4, 3], P1 needs [1, 2, 2], and P2 needs [6, 0, 0].
With Available resources at [5, 4, 5], process P1 can execute first since its needs are met. Upon completion, resources increase to [7, 4, 5], allowing P0 and then P2 to finish.
Since a valid safe sequence exists (P1, P0, P2), the system is in a safe state.
Explore the full course: Iocl Engineers Officers Grade A Paper 2