CS FundamentalsEasyWipro · Cognizant technical pattern
The Banker’s algorithm is used for which strategy of handling deadlocks?
- A. Deadlock avoidance
- B. Deadlock prevention
- C. Deadlock detection and recovery
- D. Ignoring deadlocks (ostrich approach)
Correct answer: A. Deadlock avoidance
The Banker’s algorithm grants a request only if the resulting state is safe, i.e. it avoids unsafe states using advance knowledge of maximum needs. Prevention instead breaks one of the four Coffman conditions by design.
More Operating Systems questions
- If the time quantum of Round Robin scheduling is made larger than the longest CPU burst of every process, Round Robin behaves like:
- Processes (arrival, burst): P1 (0, 6), P2 (2, 2), P3 (3, 4), P4 (5, 1). Round Robin with quantum 2 is used; a newly arrived process joins…
- Processes (arrival, burst): P1 (0, 8), P2 (1, 4), P3 (2, 2), P4 (3, 5). What is the average waiting time under preemptive SJF (Shortest…
- Reference string: 5, 2, 5, 8, 2, 3, 5, 9, 8, 2, 3, 5. With 3 frames, initially empty, how many page faults does LRU replacement cause?
- Reference string: 1, 3, 0, 3, 5, 6, 3, 1, 0, 6, 5, 3. With 3 frames, initially empty, how many page faults does the Optimal (Belady’s MIN)…
- A disk has cylinders 0–199 and the head is at cylinder 100. Pending requests: 45, 130, 12, 180, 90, 150, 60. What is the total head…