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? Databases goclasses2023-iiith-mock-1 goclasses databases transaction-and-concurrency multiple-selects 1-mark + – GO Classes asked Mar 26, 2023 • edited Mar 27, 2023 by Lakshman Bhaiya GO Classes 685 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
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. GO Classes answered Apr 8, 2023 GO Classes comment Share Follow See all 0 reply Please log in or register to add a comment.