In a system, there are three types of resources and four processes that execute concurrently. At the outset, the processes have declared their maximum resource requirements using a matrix named Max as given below. For example, Max[ ] is the maximum number of instances of that 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 P0 1 0 1 P1 1 1 2 P2 1 0 3 P3 2 0 0   Max   E F G P0 4 3 1 P1 2 1 4 P2 1 3 3 P3 5 4 1   From the perspective of deadlock avoidance, which one of the following is true?

In a system, there are three types of resources and four processes that execute concurrently. At the outset, the processes have declared their maximum resource requirements using a matrix named Max as given below. For example, Max[ ] is the maximum number of instances of that 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 P0 1 0 1 P1 1 1 2 P2 1 0 3 P3 2 0 0   Max   E F G P0 4 3 1 P1 2 1 4 P2 1 3 3 P3 5 4 1   From the perspective of deadlock avoidance, which one of the following is true? Correct Answer The system is in safe state.

Using Banker's algorithm we can deduce that the system is in a safe state. 

The formula to find the required resources for each process = Maximum allocation possible - Already allocated resources.

The requirement of each process is like:

Required
  E F G
P0 3 3 0
P1 1 0 2
P2 0 3 0
P3 3 4 1
Total 7 10 3

 

The total number of free resources are more than they need for any process, as a result, the system is in a safe state.

Related Questions