0 votes
in Cloud Computing by

Consider a system with 12 magnetic tape drivers (TD) and 3 processes (P0,P1 and P2).  Suppose that, at time t0, process P0 is holding 5 TD, P1 is holding 2 TD and P2 is holding 2 TD and there are 3 free TDs.

Process         Maximum Needs

P0                     10

P1                     4
P2                     9

 

Provide the sequence which satisfies the safety condition (non-deadlock state).
a. P1, P0, P2      

b. P2, P0, P1      

c. P1, P2, P0      

d. P2, P0, P1

1 Answer

0 votes
by

The sequence P1, P0, P2 satisfies the safety condition, since process P1 can immediately be allocated all its TDs and then return them (so 5 available TDs), then P0 can get all its TDs and return them (now 10 available TDs) and finally P2 could get all its TDs and return them.

Related questions

+1 vote
asked May 27, 2019 in Other by rajeshsharma
0 votes
asked Jul 17, 2023 in IOT Prime by Robin
...