Question 1

A computer has six tape drives, with n processes competing for them. Each process may need two drives. What is the maximum value of n for the system to be deadlock free?
• 6
• 5
• 4
• 3

Question 2

Each Process Pi, i= 1.......9 is coded as follows
``` repeat
P(mutex)
{Critical section}
V(mutex)
forever
```
The code for P10 is identical except it uses V(mutex) in place of P(mutex). What is the largest number of processes that can be inside the critical section at any moment?
• 1
• 2
• 3
• None of above

Question 3

A solution to the Dining Philosophers Problem which avoids deadlock is:
• ensure that all philosophers pick up the left fork before the right fork
• ensure that all philosophers pick up the right fork before the left fork
• ensure that one particular philosopher picks up the left fork before the right fork, and that all other philosophers pick up the right fork before the left fork
• None of the above

Question 4

A computer system uses the Banker’s Algorithm to deal with deadlocks. Its current state is shown in the table below, where P0, P1, P2 are processes, and R0, R1, R2 are resources types.

[caption width="800"] [/caption]

a) Show that the system can be in this state. b) What will the system do on a request by process P0 for one unit of resource type R1?

•  The current state of the system is possible because this can be part of one of the safe sequence. For example, following this state the system can follow P1->P2->P0 this sequence and will not lead to Deadlock, So, yes the system can be in this state

• The system can allocate one unit of resource R1 to P0 and still will not lead to Deadlock, again it can still follow P1->P2->P0 sequence.

Question 5

A system shares 9 tape drives. The current allocation and maximum requirement of tape drives for 4 processes are shown below: Which of the following best describes the current state of the system?

Question 6

Consider a system with 3 processes that share 4 instances of the same resource type. Each process can request a maximum of K instances. Resource instances can be requested and released only one at a time. The largest value of K that will always avoid deadlock is _______ . Note - This was Numerical Type question.
• 1
• 2
• 3
• 4

Question 7

In a system, there are three types of resources: E, F and G. Four processes P0, P1, P2 and P3 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] is the maximum number of instances of F that P2 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. From the perspective of deadlock avoidance, which one of the following is true?
• The system is in safe state
• The system is not in safe state, but would be safe if one more instance of E were available
• The system is not in safe state, but would be safe if one more instance of F were available
• The system is not in safe state, but would be safe if one more instance of G were available

Question 8

What problem is solved by Dijkstra banker’s algorithm?
• Cache coherence
• Mutual exclusion

Question 9

• if there are more than two processes competing for that resources
• if there are only two processes competing for that resources
• if there is a single process competing for that resources
• none of these

Question 10

Which of the following is not a necessary condition for deadlock?
• Mutual exclusion
• Reentrancy
• Hold and wait
• No pre-emption

There are 42 questions to complete.

Last Updated :
Take a part in the ongoing discussion