edited by
685 views
1 votes
1 votes

A simple way to detect a state of deadlock is to construct a wait-for graph. One node is created in the graph for each transaction that is currently executing in the schedule. Whenever a transaction $\text{T}_i$ is waiting to lock an item $\text{X}$ that is currently locked by a transaction $\text{T}_j,$ it creates a directed edge $(\text{T}_i \# \text{T}_j).$ When $\text{T}_j$ releases the lock(s) on the items that $\text{T}_i$ was waiting for, the directed edge is dropped from the waiting-for graph.

Given the graph below, which is/are deadlock free?

edited by

1 Answer

1 votes
1 votes
We have a state of deadlock if and only if the wait-for graph has a cycle.
In graph $\text{A},$ there is no cycle, so it is deadlock free.
Answer:

Related questions

773
views
1 answers
1 votes
GO Classes asked Mar 26, 2023
773 views
Assume by "Serializability", we mean "Conflict Serializability".For the given schedule, which of the following is TRUE?$\text{T}_1$\text{T}_2$\text{T}_3$ ... serial schedule $\text{T}_2, \text{T}_3, \text{T}_1, \text{T}_4$
1.1k
views
1 answers
2 votes
GO Classes asked Mar 26, 2023
1,108 views
Consider a relation schema $\mathrm{R}$ with attributes $(\mathrm{X}, \mathrm{Y}, \mathrm{Z}, \mathrm{U}, \mathrm{V}, \mathrm{W})$ ... $3 \mathrm{NF}$.$\mathrm{S}$ is in $3 \mathrm{NF}$.
666
views
1 answers
1 votes
GO Classes asked Mar 26, 2023
666 views
Consider the following relations and query. ... textsf{A>C}} (\textsf{s})$\sigma_{\textsf{A>C}}(\text{r} \cap \textsf{s})$
1.3k
views
1 answers
2 votes
GO Classes asked Mar 26, 2023
1,281 views
Consider a $4$ input boolean function $\mathrm{F}(\mathrm{X}, \mathrm{Y}, \mathrm{Z}, \mathrm{T})$ ...