In a system using the Banker’s algorithm for deadlock avoidance, which…
2025
In a system using the Banker’s algorithm for deadlock avoidance, which scenario would place the system in an unsafe state?
Answer: B. A process request is granted even though the resulting allocation has no safe sequence in which every process can finish. — CONCEPTThe Banker’s algorithm grants a request only when the resulting allocation is safe. A state is safe if at least one safe sequence exists: each process…
- A.
The system has enough resources to satisfy the maximum possible demands of all processes simultaneously.
- B.
A process request is granted even though the resulting allocation has no safe sequence in which every process can finish.
- C.
All processes currently hold fewer resources than their declared maximum needs.
- D.
The system has more resources than the combined maximum needs of all processes.
Attempted by 136 students.
Show answer & explanation
Correct answer: B
CONCEPT
The Banker’s algorithm grants a request only when the resulting allocation is safe. A state is safe if at least one safe sequence exists: each process can obtain its remaining need, finish, and release its resources for later processes.
Having fewer immediately available resources than the sum of all maximum claims is not by itself unsafe, because completed processes release resources.
APPLICATION
Consider the state that would result after granting the request.
Find a process whose remaining need is no greater than the available-resource vector; let it finish and return its allocation.
Repeat this test. If no sequence lets every process finish, the resulting state is unsafe.
The scenario in which granting a request leaves no safe completion sequence therefore places the system in an unsafe state.
CONTRAST
Enough resources to meet all maximum claims simultaneously is a stronger resource condition than the safety test requires.
Merely holding less than the declared maximum does not determine safety without the Available, Allocation, and Need values.
Supply above the combined maximum claims permits every maximum claim to be covered.
CROSS-CHECK
The conclusion follows directly from the safety algorithm: failure to construct any complete safe sequence is exactly the unsafe-state condition. An unsafe state is not necessarily already deadlocked, but it has no guaranteed order of completion and may lead to deadlock.
Explore the full course: Mppsc Assistant Professor Computer Science Paper 2