edited by
729 views
4 votes
4 votes

Consider the following snapshot of a system running $n$ processes.

Process $i$ is holding $x_i$ instances of a resource $R$,$ 1\leq i\leq n$. Currently, all instances of $R$ are occupied. Further, for all $i$, process $i$ has placed a request for an additional $y_i$ instances while holding the $x_i$ instances it already has. There are exactly two processes $p$ and $q$ and such that $y_p=y_q=0$. Which one of the following can serve as a sufficient condition to guarantee that the system would not be going to a deadlock?

  1. $x_{p}+x_{q}> \max_{k\neq p,q}y_{k}$
  2. $\max(x_{p},x_{q})>1$
  3. $x_{p}+x_{q}\geq \min_{k\neq p,q}y_{k}$
  4. None of the above
edited by

1 Answer

Best answer
7 votes
7 votes
The question asks for "sufficient" condition for the system not to reach a deadlock.

This means if this condition is satisfied there should be no deadlock. For this the system must currently be in a safe state and also proceed through a sequence of safe states.

Neither the question statement guarantees a safe state nor the given options guarantees a safe sequence (option A ensures that the if the current state is safe, then the next state is also safe but it does not guarantee that current state is safe).

So correct answer is D. None of the above.
selected by
Answer:

Related questions