Skip to content
Related Articles

Related Articles

ISRO | ISRO CS 2013 | Question 57

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 15 May, 2018

Consider the following process and resource requirement of each process.

                 Type 1        Type 2
Process         Used  Max      Used  Max
   P1            1     2         1    3
   P2            1     3         1    2
   P3            2     4         1    4 

Predict the state of this system, assuming that there are a total of 5 instances of resource type 1 and 4 instances of resource type 2.

(A) Can go to safe or unsafe state based on sequence

(B) Safe state
(C) Unsafe state
(D) Deadlock state


Answer: (C)

Explanation: Need Matrix of the processes:

         Type 1              Type 2
Process   Used  Max  Need     Used  Max  Need
   P1      1     2    1         1    3    2
   P2      1     3    2         1    2    2
   P3      2     4    2         1    4    3

Available resources : type1 = 5 – 4 = 1 and type2 = 4 – 3 = 1

But with one resource of type1 and type2 each, none of the process request can be fulfilled, so it is an unsafe state.

Option (C) is correct.


Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!