Gate2018 cs Q53

0. 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.
Allocation Max
 EFG  EFG
P0101 P0431
P1112 P1214
P2103 P2133
P3200 P3541

  • Option : A
  • Explanation :
    Max needCurrent allocationCurrent availableRemaining need
     EFGEFGE(3)F(3)G(0)EFG
    P0431101431330
    P1214112534102
    P2133103646030
    P3541200846341

    Safe sequence : P0, P2, P1, P3
    Safe state
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *