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?

EFG
P₀101
P₁112
P₂103
P₃200
EFG
P₀431
P₁214
P₂133
P₃541
  1. (A) The system is in safe state.
  2. (B) The system is not in safe state, but would be safe if one more instance of E were available
  3. (C) The system is not in safe state, but would be safe if one more instance of F were available
  4. (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