Question discussion

A system has four processes and three resource types. The allocation, maximum demand and the currently available resources are given below.…

1101Medium DSSSB TGT Computer Science 0 replies 1 views
0

A system has four processes and three resource types. The allocation, maximum demand and the currently available resources are given below. Which of the following is a safe sequence?

Process  Allocation  Maximum
P0       2 2 0       5 2 0
P1       1 0 0       3 0 1
P2       1 2 1       2 4 1
P3       1 1 1       4 1 4
Available = (2, 1, 2)
  • AP3, P2, P1, P0
  • BP0, P1, P2, P3
  • CP2, P1, P0, P3
  • DP1, P0, P2, P3
Correct answer: D

Explanation

Needs are P0 (3,0,0), P1 (2,0,1), P2 (1,2,0), P3 (3,0,3); only P1 can start with (2,1,2), then P0, P2 and P3 can finish in turn, so P1, P0, P2, P3 is the unique safe sequence.

Discussion 0

Nobody has replied yet. Start the discussion!