Skip to main content
IntermediateconceptualReported frequent at Wipro

How can deadlocks be prevented, avoided, detected and recovered from?

ReportedSource: GeeksforGeeks interview experience: Infosys Specialist Programmer 2025

Quick answerFree

Prevent by breaking a Coffman condition (e.g. global lock ordering, all-at-once requests); avoid with safe-state checks (Banker's algorithm); detect via cycles in a wait-for graph; recover by aborting/rolling back victims.

Detailed answer· ~160 words

Interview Prep

Unlock the full answer with Interview Prep

Get a ~160-word model answer, plus 9 more Operating Systems questions.

Also in Pro (₹499 / 90 days).

+ 9 more Operating Systems questions in Interview Prep, each with the full answer.

Discussion