Question 1
Question 2
repeat P(mutex) {Critical section} V(mutex) foreverThe 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?
Question 3
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.
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
Question 9
Question 10
There are 42 questions to complete.