Deadlock: GATE CS Previous Year Questions

Deadlock · Operating System

23 questions · asked in 17 of 27 years (2000–2026)

MCQ 17 · MSQ 3 · NAT 31-mark 11 · 2-mark 12

2000Questions per year2026

Questions 21–23 of 23

Q21GATE 20041 markMCQ−0.33 if wrong
In a certain operating system, deadlock prevention is attemped using the following scheme. Each process is assigned a unique timestamp, and is restarted with the same timestamp if killed. Let PhP_h be the process holding a resource R, PrP_r be a process requesting for the same resource R, and T(PhP_h) and T(PrP_r) be their timestamps respectively. The decision to wait or preempt one of the processes is based on the following algorithm.
 if T(Pr) < T(Ph) then 
    kill Pr 
else wait
Which one of the following is TRUE?

Q22GATE 20031 markMCQ−0.33 if wrong
The following are the starting and ending times of activities A,B,C,D,E,F,G and H respectively in chronological order: as  bs  cs  ae  ds  ce  es  fs  be  de  gs  ee  fe  hs  ge  hea_{s}\; b_{s} \; c_{s}\;a_{e}\;d_{s}\;c_{e}\;e_{s}\;f_{s}\;b_{e}\;d_{e}\;g_{s}\;e_{e}\;f_{e}\;h_{s}\;g_{e}\;h_{e}. Here, xsx_{s} denotes the starting time and xex_{e} denotes the ending time of activity X. W need to schedule the activities in a set of rooms available to us. An activity can be scheduled in a room only if the room is reserved for the activity for its entire duration. What is the minimum number of rooms required?

Q23GATE 20001 markMCQ−0.33 if wrong
Which of the following is not a valid deadlock prevention scheme?

Keep practising

Topics in Operating System

All CS topics ›