A computer system uses the Banker’s Algorithm to deal with deadlocks. Its…
GATE · 1996 · CS · Descriptive BModified — slightly modified from the official paper; see the solution
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.

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?
- A.
The current state is safe; one safe sequence is P1 → P2 → P0. If P0 requests one unit of R1, the request should not be granted immediately because the tentative state is unsafe.
- B.
The current state is safe; one safe sequence is P1 → P2 → P0. If P0 requests one unit of R1, the request can be granted immediately and the same safe sequence still works.
Attempted by 145 students.
Sign up free to check your answer
Sign up freeLoading lesson…