• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE | GATE-IT-2004 | Question 63

In a certain operating system, deadlock prevention is attempted using the following scheme. Each process is assigned a unique timestamp, and is restarted with the same timestamp if killed. Let Ph be the process holding a resource R, Pr be a process requesting for the same resource R, and T(Ph) and T(Pr) 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?

(A)

The scheme is deadlock-free, but not starvation-free

(B)

The scheme is not deadlock-free, but starvation-free

(C)

The scheme is neither deadlock-free nor starvation-free

(D)

The scheme is both deadlock-free and starvation-free

Answer

Please comment below if you find anything wrong in the above post
Feeling lost in the world of random DSA topics, wasting time without progress? It's time for a change! Join our DSA course, where we'll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks!

Last Updated :
Share your thoughts in the comments