A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

Discussion Forum

Que. 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:The scheme is deadlock-free, but not starvation-free
Confused About the Answer? Ask for Details Here
Know Explanation? Add it Here

Similar Questions: