GATE CS 2018 (Forenoon) — Question 49

Operating Systems (OS)Deadlock Prevention, Avoidance, Detection, RecoveryMCQ2 marks · −2/3 if wrongMedium

In a system, there are three types of resources: \(E, F\) and \(G\). Four processes \(P_0, P_1, P_2\) and \(P_3\) 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_2,F\)] is the maximum number of instances of \(F\) that \(P_2\) 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 E F G \(P_0\) 1 0 1 \(P_1\) 1 1 2 \(P_2\) 1 0 3 \(P_3\) 2 0 0 Max E F G \(P_0\) 4 3 1 \(P_1\) 2 1 4 \(P_2\) 1 3 3 \(P_3\) 5 4 1 From the perspective of deadlock avoidance, which one of the following is true?
  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
Practise the full 2018-FN paper
Challenge a friend: WhatsApp Telegram
Recommended book · affiliate linkOperating System Concepts (Galvin)Scheduling, synchronisation, deadlocks, memory and file systems.
Practise more on Deadlock Prevention, Avoidance, Detection, RecoveryTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group