GateAI
Deadlock

GATE CSE 2015 Set 3 · Q52

MCQ2 marksEasy

Time

Consider the following policies for preventing deadlock in a system with mutually exclusive resources. I. Processes should acquire all their resources at the beginning of execution. If any resource is not available, all resources acquired so far are released II. The resources are numbered uniquely, and processes are allowed to request for resources only in increasing resource numbers III. The resources are numbered uniquely, and processes are allowed to request for resources only in decreasing resource numbers IV. The resources are numbered uniquely. A process is allowed to request only for a resource with resource number larger than its currently held resources Which of the above policies can be used for preventing deadlock?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: D) Any one of I, II, III, and IV

Deadlock

Deadlock prevention requires invalidating at least one of the four Coffman conditions (Mutual Exclusion, Hold and Wait, No Preemption, Circular Wait):

  • Policy I: Invalids the *Hold and Wait* condition (and allows preemption if resources aren't available). This prevents deadlocks.

  • Policy II: By strictly enforcing resource requests in monotonically increasing order of unique IDs, a circular wait chain cannot form, thus invalidating *Circular Wait*.

  • Policy III: By strictly enforcing resource requests in monotonically decreasing order of unique IDs, circular wait is also eliminated.

  • Policy IV: By allowing requests only for resources with an ID strictly greater than currently held resources, any dependency chain must be strictly monotonic, which prevents *Circular Wait* from occurring.

Since all four policies (I, II, III, and IV) successfully prevent deadlock, (D) is the correct option.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Deadlock previous year question is Q52 of the GATE CSE 2015 Set 3 paper. Find more GATE CSE PYQs on Deadlock in Operating Systems, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Deadlock PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Deadlock in GATE CSE

Deadlock has 11 GATE CSE PYQs across 10 papers from 2014 to 2026. 4 of them are 2-mark MCQs like this one, and it is the only one in GATE CSE 2015 Set 3.

How GATE tests Deadlock

More from GATE CSE 2015 Set 3

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2015 Set 3 · Q52 · MCQ

Consider the following policies for preventing deadlock in a system with mutually exclusive resources. I. Processes should acquire all their resources at the beginning of execution. If any resource is not available, all resources acquired so far are released II. The resources are numbered uniquely, and processes are allowed to request for resources only in increasing resource numbers III. The resources are numbered uniquely, and processes are allowed to request for resources only in decreasing resource numbers IV. The resources are numbered uniquely. A process is allowed to request only for a resource with resource number larger than its currently held resources Which of the above policies can be used for preventing deadlock?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.