GATE / CS ARCHIVE

GATE CSE 2008 / QUESTION 65

Deadlock prevention versus avoidance

Operating Systems · Deadlocks · Full GATE CSE 2008 paper

GATE 2008, Q65 2 marks · MCQ
Report issue

Deadlocks

Question 65, GATE 2008: Which is NOT true of deadlock prevention and avoidance?

(A) Prevention always grants a request if the resulting state is safe
(B) Avoidance always grants a request if the resulting state is safe
(C) Avoidance is less restrictive than prevention
(D) Avoidance needs resource requirements known in advance
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

1. Prevention breaks a necessary condition for deadlock, for example by requiring a fixed acquisition order or all-at-once requests. It may deny a request even though granting it would leave a safe state.
2. Avoidance explicitly tests safety using declared maximum needs and grants an otherwise valid request if safety is preserved.
3. Thus A incorrectly attributes avoidance’s rule to prevention. The conventional comparison makes B,C,D true: avoidance is less structurally restrictive but needs advance resource information.

Original paper, page 13