Skip to content
Related Articles

Related Articles

Improve Article

GATE | GATE CS 1996 | Question 70

  • Last Updated : 16 Jul, 2021
Geek Week

A computer system uses the Banker’s Algorithm to deal with deadlocks. Its current state is shown in the table below, where P0, P1, P2 are processes, and R0, R1, R2 are resources types.
alloc_tab

 

a) Show that the system can be in this state.
b) What will the system do on a request by process P0 for one unit of resource type R1?


Answer:

Explanation: (a) The current state of the system is possible because this can be part of one of the safe sequence. For example, following this state the system can follow P1->P2->P0 this sequence and will not lead to Deadlock, So, yes the system can be in this state.

(b) The system can allocate one unit of resource R1 to P0 and still will not lead to Deadlock, again it can still follow P1->P2->P0 sequence.

This is answered taken into consideration that the reader understands the Banker’s Algorithm.




Quiz of this Question

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :