Consider the following process and resource requirement of each process.
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$.
Total no of Type 1 resources = 5
Total no. of Type 2 resources = 4
Type 1 allocated = 1+1+2=4
Type 2 allocated = 1+1+1=3
Type 1 available = Total -avl = 5-4 = 1
Type 2 available = Total - avl = 4-3=1
Now this ( 1,1) cant handle any of one further needs of any process as the need vector (MAX - USED) for the processes are
So answer is Unsafe State.
Agreed @shivanisrivarshini ...
But I have one doubt here... here every process needs two types of resource. My question is after taking all max need of type 1 resource can it release type 1 resource and at the same time need of resource type 2 is not fulfilled ??
For example if we try to schedule like - p1, p2 ,p3 ... is it going to lead us in deadlock or not ??
If we consider in this way
type1 we have only 1 resource , type 2 we have only 1 resource
with that we can finish P1 use of type1 P2 use of type 2 but if processes dnt release resouces till its completion then non will be finished and leads to deadlock ???
@Tauhin Gangwar sir ... please read again ...
@cse itz not deadlock.....read the defination of the deadlock & unsafe state..
both are in the safe state