OA. free
Free
Qualcomm Embedded Systems & Hardware Embedded Systems & Hardware Medium

Dijkstra's banking algorithm in an operating system solves the problem of

Qualcomm technical mcq question, verified with a worked answer. Free to practise - no sign-up.

Dijkstra's banking algorithm in an operating system solves the problem of

Choose one option.
Show answer & explanation
Answer: A. Deadlock avoidance

Dijkstra's Banker's Algorithm is a resource allocation algorithm designed to avoid deadlock by ensuring the system remains in a safe state before granting resource requests. It prevents deadlock from occurring by checking if resource allocation would lead to an unsafe state. Deadlock recovery (C) deals with breaking existing deadlocks after they occur, context switching (B) is CPU scheduling, and mutual exclusion (D) is synchronization—none of which the Banker's Algorithm directly addresses.

Step-by-step Derivation:
The Banker's Algorithm works by: (1) maintaining a record of maximum resources each process might need, (2) tracking currently allocated resources, (3) before granting any resource request, simulating the allocation and checking if the system would remain in a safe state, and (4) only granting the request if safety is guaranteed. This proactive approach prevents deadlock from ever occurring—hence 'avoidance' rather than 'recovery'.