GATE CS 2018 · Question 49 · Operating System · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer
In a system, there are three types of resources: E, F and G. Four processes P₀, P₁, P₂ and P₃ execute concurrently. At the outset, the processes have declared their maximum resource requirements using a matrix named Max as given below. For example, Max[P₂,F] is the maximum number of instances of F that P₂ would require. The number of instances of the resources allocated to the various processes at any given state is given by a matrix named Allocation.
Consider a state of the system with the Allocation matrix as shown below, and in which 3 instances of E and 3 instances of F are the only resources available.
Allocation
Max
From the perspective of deadlock avoidance, which one of the following is true?
| E | F | G | |
|---|---|---|---|
| P₀ | 1 | 0 | 1 |
| P₁ | 1 | 1 | 2 |
| P₂ | 1 | 0 | 3 |
| P₃ | 2 | 0 | 0 |
| E | F | G | |
|---|---|---|---|
| P₀ | 4 | 3 | 1 |
| P₁ | 2 | 1 | 4 |
| P₂ | 1 | 3 | 3 |
| P₃ | 5 | 4 | 1 |
- (A) The system is in safe state.
- (B) The system is not in safe state, but would be safe if one more instance of E were available
- (C) The system is not in safe state, but would be safe if one more instance of F were available
- (D) The system is not in safe state, but would be safe if one more instance of G were available
Answer
Answer (A)
Answer from the official GATE CS 2018 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes