Deadlocks questions

Q24

GATE CS 2018 CSDeadlocksNAT1 mark
Consider a system with 3 processes that share 4 instances of the same resource type. Each process can request a maximum of KK instances. Resource instances can be requested and released only one at a time. The largest value of KK that will always avoid deadlock is ____.
Show answer without attempting

Answer: 2

Q39

GATE CS 2018 CSDeadlocksMCQ2 marks−2/3 if wrong
In a system, there are three types of resources: E,FE, F and GG. Four processes P0,P1,P2P_0, P_1, P_2 and P3P_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[P2,F]\text{Max}[P_2, F] is the maximum number of instances of FF that P2P_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 EE and 3 instances of FF are the only resources available.

Allocation:
EEFFGG
P0P_0101
P1P_1112
P2P_2103
P3P_3200
Max:
EEFFGG
P0P_0431
P1P_1214
P2P_2133
P3P_3541
From the perspective of deadlock avoidance, which one of the following is true?
Show answer without attempting

Answer: A

0/20 correct0 marks

Related topics in Operating Systems