115 views
3 3 votes

In the wait-for graph for transactions $A$ through $G$ shown below, which option lists all transactions that are in a permanent waiting state?

Here, an edge $X \to Y$ in the wait-for graph means that transaction $X$ is waiting for a resource locked by transaction $Y$ to be unlocked.

Wait-for graph for transactions $A$–$G$:

Which of the following is correct?

  1. $A,\ B,\ C,\ D$
     
  2. $B,\ C,\ D$
     
  3. $B,\ C,\ D,\ F$
     
  4. $C,\ D,\ E,\ F,\ G$

1 Answer

1 1 vote

First identify a cycle:

$B\rightarrow D$

$D\rightarrow C$

$C\rightarrow B$

So, $\boxed{B\rightarrow D\rightarrow C\rightarrow B}$ is a wait-for cycle.

Hence, $B,C,D$ are deadlocked.

Now examine $F$.

$F$ waits for $D$ as well as $E$.

Since $D$ is part of the deadlocked cycle, it will never release the required resource.

Therefore $F$ also waits permanently, even though $F$ itself does not belong to the cycle.

So the permanently waiting set is $\boxed{{B,C,D,F}}$
 

Answer : C

Answer:
Position:
Show:

Related questions

3 3 votes
1 1 answer
143
143 views
GO Classes asked Aug 21
143 views
A system contains three distinct critical resources: $R_1,R_2,R_3$ shared by four processes.Their resource requirements are:$P_1$ requires $R_1$ and $R_2$.$P_2$ requires ...
3 3 votes
1 1 answer
125
125 views
GO Classes asked Aug 21
125 views
In a multiprocessor system with preemptive scheduling, three processes $P_1,P_2,P_3$ share resources $R_1,R_2,R_3$.$P_1$ and $P_2$ compete for $R_1$. $P_2$ and $P_3$ comp...
2 2 votes
1 1 answer
156
156 views
GO Classes asked Aug 21
156 views
Four processes have the following state:$$\begin{array}{c@{\qquad\qquad}c}\textit{Current Allocation} & \textit{Current Request} \\ \begin{array}{|c|cc|}\hline\text{Proce...
2 2 votes
1 1 answer
140
140 views
GO Classes asked Aug 21
140 views
Suppose system $S_1$ uses a deadlock avoidance method, whereas system $S_2$ uses a deadlock detection method.Consider the following statements:$S_1$ restricts the order i...