Dijkstra’s Banker’s algorithm in an operating system addresses which problem?
2011
Dijkstra’s Banker’s algorithm in an operating system addresses which problem?
Answer: A. deadlock avoidance — ConceptDeadlock-handling methods differ by when they act. Avoidance examines each proposed resource allocation and permits it only if the system can remain in…
- A.
deadlock avoidance
- B.
deadlock recovery
- C.
mutual exclusion
- D.
context switching
Attempted by 307 students.
Show answer & explanation
Correct answer: A
Concept
Deadlock-handling methods differ by when they act. Avoidance examines each proposed resource allocation and permits it only if the system can remain in a safe state.
A safe state is one for which at least one sequence exists in which every process can obtain its remaining resources and finish.
Application
The Banker’s algorithm uses the available resources, current allocations, and declared maximum demands to test a tentative request.
Compute each process’s remaining need from its maximum demand and current allocation.
Tentatively grant the request and update the available, allocation, and need values.
Run the safety test to check whether all processes can still finish in some safe sequence.
Grant the request only when that safe sequence exists; otherwise postpone it.
Contrast
Deadlock recovery acts after a deadlock has occurred and may terminate processes, roll them back, or preempt resources.
Mutual exclusion controls access to a critical section or non-shareable resource.
Context switching transfers CPU execution by saving and restoring process or thread state.
Cross-check
Because the Banker’s algorithm refuses a request that would leave the system unsafe, it prevents entry into unsafe allocation states rather than recovering from an existing deadlock.
Therefore, the problem addressed is deadlock avoidance.
Explore the full course: Mppsc Assistant Professor Computer Science Paper 2