UGC-NET | UGC NET CS 2015 Dec – III | Question 39

Consider a system with twelve magnetic tape drives and three processes P1, P2 and P3. Process P1 requires maximum ten tape drives, process P2 may need as many as four tape drives and P3 may need upto nine tape drives. Suppose that at time t1, process P1 is holding five tape drives, process P2 is holding two tape drives and process P3 is holding three tape drives. At time t1, system is in:
(A) safe state
(B) unsafe state
(D) starvation state

Explanation: P1 is holding 5 tape drive but it require 10 tape drive, 5 tapes are required for P1.
P2 is holding 2 tape drive but it require 4 tape drive, 2 tapes are required for P2.
P3 is holding 3 tape drive but it require 9 tape drive, 6 tapes are required for P3.
We have total 12 tape out of which 10 are allocated, 2 tape are free. These 2 tape can be allocated to P2. After P2 complete its execution it will free 4 tape, but these 4 tape can not fulfill requirement for P1 or P3. That’s why system is in unsafe state.
So, option (B) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.