GATE Computer Science · Operating Systems and Computer Networks · medium
A system has 4 processes (P1..P4) and a single resource type. Each process has a maximum claim of 4 units (Max = [4, 4, 4, 4]) and currently holds 2 units each (Allocated = [2, 2, 2, 2], so Need = [2, 2, 2, 2]). What is the minimum number of additional free (Available) units required so the state is guaranteed to be SAFE under the Banker's algorithm?
Published · Last updated · checked before publication — how we verify questions
Options
Answer: A. 2 available units so one process satisfies its remaining need of 2
Each process has Need_i = 4 - 2 = 2 units. If Available = 2, any process P_i can satisfy its Need (2 <= 2), run to completion, and release its 2 allocated units, raising Available to 4 and allowing all remaining processes to finish. With Available = 1, no process can satisfy Need_i = 2.
Why the other options are wrong
- B. 0 available units because each process already holds 50% of its maximum claim — With 0 available units, no process can acquire its remaining 2 needed units, causing deadlock.
- C. 1 available unit because processes can acquire one unit at a time and release half — In the worst case, a process releases its allocated resources only after acquiring its full maximum claim (Need = 2).
- D. 8 available units equal to the sum of remaining needs across the four processes — Once the first process finishes with 2 units, it returns its allocated units to the pool for the remaining processes.
More Operating Systems and Computer Networks questions
- Three processes P1, P2, and P3 arrive at times 0 ms, 1 ms, and 2 ms with CPU burst times of 8 ms, 4 ms, and 2 ms…
- For the page reference string 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5 with 3 initially empty page frames, how many page…
All Operating Systems and Computer Networks questions and the topic overview →
GATE is a mark of the Indian Institute of Science and the Indian Institutes of Technology. PrepIQ Hub is not affiliated with, endorsed by, or sponsored by the GATE Committee.