GATE - 2017 | OS | A system shares 9 tape drives. The current allocation and maximum

GATE - 2017 | OS | A system shares 9 tape drives. The current allocation and maximum
Posted on 09-02-2022

GATE - 2017 [Operating System]

Question:

A system shares 9 tape drives. The current allocation and maximum requirement of tape drives for three processes are shown below:

A system shares 9 tape drives. The current allocation and maximum requirement of tape drives for three processes are shown below:

Which of the following best describes the current state of the system?

A

Safe, Deadlocked

B

Safe, Not Deadlocked

C

Not Safe, Deadlocked

D

Not Safe, Not Deadlocked

 

Solution:   

Option (B) is Correct

A system shares 9 tape drives. The current allocation and maximum requirement of tape drives for three processes are shown below:


Available: (9 - (3 + 1 + 3)) = 2, P3 can be satisfied.
New available = 3 + 2 = 5
Now, P2 can be satisfied.
Now available: 5 + 1 = 6
Now, P1 can be satisfied. Thus safe sequence: P3 → P2 → P1
That is not deadlocked.

-----------------------------------------------

A system shares 9 tape drives. The current allocation and maximum requirement of tape drives for three processes are shown below:

Thank You