Consider the following schedule S of transactions T1, T2, T3, T4: Which one of…
2014
Consider the following schedule S of transactions T1, T2, T3, T4:

Which one of the following statements is CORRECT?
Answer: C. S is both conflict-serializable and recoverable — Analysis summary: determine conflict-serializability via the precedence graph and check recoverability by verifying that no transaction commits after reading…
- A.
S is conflict-serializable but not recoverable
- B.
S is not conflict-serializable but is recoverable
- C.
S is both conflict-serializable and recoverable
- D.
S is neither conflict-serializable nor is it recoverable
Attempted by 122 students.
Show answer & explanation
Correct answer: C
Analysis summary: determine conflict-serializability via the precedence graph and check recoverability by verifying that no transaction commits after reading an uncommitted value.
Step 1 — Build the precedence (conflict) graph:
T1 -> T2 because T1 performs a write(X) that is read later by T2.
T2 -> T3 because T2 reads X before T3 performs a write(X) (read-write conflict).
T3 -> T4 because T3 writes X before T4 reads X (write-read conflict).
T2 -> T4 because T2 writes Y before T4 reads Y (write-read conflict).
Because the precedence graph has no cycles, the schedule is conflict-serializable. One equivalent serial order consistent with these edges is:
T1
T2
T3
T4
Step 2 — Check recoverability:
T2 reads X that was written by T1, and T1 has already committed before T2 depends on that value.
T4 reads X that was written by T3, and T3 commits before T4 uses that value.
T4 reads Y that was written by T2, and T2 commits before T4 uses that value.
Since no transaction commits after reading an uncommitted value, the schedule is recoverable.
Conclusion: the schedule is both conflict-serializable and recoverable.
A video solution is available for this question — log in and enroll to watch it.
Explore the full course: Ssc Je Imd Scientific Assistant Computer Science