in Databases edited by
393 views
1 vote
1 vote

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?

in Databases edited by
393 views

1 Answer

1 vote
1 vote
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