-
Consider three data items D1, D2 and D3 and the following execution schedule of transactions T1, T2 and T3. In the diagram, R(D) ans W(D) denote the actions reading and writing the data item D respectively.
Which of the following statements is correct?
-
- The schedule is serializable as T2; T3; T1
- The schedule is serializable as T2; T1; T3
- The schedule is serializable as T3; T2; T1
- The schedule is not serializable
- The schedule is serializable as T2; T3; T1
Correct Option: D
Step 1: Create a node for each transaction.
Step 1:
Step 2 : Find the conflict pairs (RW, WR, WW) on same variable by different transactions.
W1(D1); W2(D1) [1a]
W1(D1); R2(D1) [1d]
R2(D3); W3(D3) [3e]
W2(D2); W3(D2) [42]
W2(D2); R3(D2) [4f]
W3(D2); W1(D2) [2b]
W3(D2); R1(D2) [2c]
Step 3 : Draw an edge for each conflict pair.
As Cycle formed, Therefore schedule is not a conflict serializable schedule.