📖 Explanation
To determine conflict serializability, we construct a precedence graph for each schedule and check for cycles. An edge Ti→Tj exists if Ti accesses an item before Tj, and at least one of these accesses is a write operation (i.e., they conflict).
For S1:r1(X);r1(Y);r2(X);r2(Y);w2(Y);w1(X):
- r1(Y) and w2(Y) conflict (read-write on Y), so T1→T2.
- r2(X) and w1(X) conflict (read-write on X), so T2→T1.
The precedence graph contains a cycle: T1→T2→T1. Thus, S1 is not conflict serializable.
For S2:r1(X);r2(X);r2(Y);w2(Y);r1(Y);w1(X):
- r2(X) and w1(X) conflict (read-write on X), so T2→T1.
- w2(Y) and r1(Y) conflict (write-read on Y), so T2→T1.
The precedence graph contains only edges T2→T1. There is no cycle. Thus, S2 is conflict serializable.
Therefore, S1 is not conflict serializable, and S2 is conflict serializable.
The final answer is C