-
A system shares 9 tape drives. The current allocation and maximum requirement of tape drives for three processes are shown below:
Process Current Allocation MaximumRequirement P1 3 7 P2 1 6 P3 3 5
Which of the following best describes current state of the system?
-
- Safe, Deadlocked
- Safe, Not Deadlocked
- Not Safe, Deadlocked
- Not Safe, Not Deadlocked
- Safe, Deadlocked
Correct Option: B
As given table is:
There are total 9 tape drives.
So according to the above table we can see that, it have currently allocated 7 tape drive, so currently available tape drive
⇒ 9 – 7 = 2.
So, P3 can use it and after using, it will release 3 then new resources are available = 5, then P1 can use it and it will release 3, so new available resources = 8, and lastly P2 can use it so all the process are in 'SAFE STATE' and there will be No 'DEADLOCK'. Then we can get the following 2 safe sequence
(1)
3, P2, P1 > (2)
3, P1, P2 >.
So, system is in safe state from (P3 → P1 → P2) and no deadlocked. Hence, option (b) is correct.