WBJECA 2025 — Computer PYQ
WBJECA | Computer | 2025Which of the following is a deadlock avoidance algorithm?
Choose the correct answer:
- A.
First-Come, First-Served (FCFS)
- B.
Banker's Algorithm
(Correct Answer) - C.
Round Robin (RR)
- D.
Shortest Remaining Time First (SRTF)
Banker's Algorithm
Explanation
Explanation:
A deadlock occurs in an operating system when a set of processes are blocked because each process is holding a resource and waiting for another resource acquired by some other process.
Banker's Algorithm: This is a classic deadlock avoidance algorithm. It works by simulating the allocation of predetermined maximum possible amounts of all resources, and then makes an "s-state" check to test for all possible deadlock conditions before deciding whether to grant an allocation request.
Other Options:
FCFS, Round Robin (RR), and SRTF are all CPU Scheduling algorithms. They are used to decide which process gets the CPU and for how long, but they are not designed to manage resource allocation to prevent deadlocks.
Mathematically, the Banker's Algorithm ensures the system remains in a "safe state," defined as:
System State=Safe⟺∃ sequence ⟨P1,P2,…,Pn⟩ s.t. resource needs can be met sequentially
If no such sequence exists, the system is in an "unsafe state," and the resource allocation request is denied to avoid a potential deadlock.

