
Correct : b
The correct answer is Option B.
To figure out which schedule is conflict serializable, we use the precedence graph (also called a serialization graph). The idea is straightforward — if two operations from different transactions conflict with each other (meaning they access the same data item and at least one of them is a write), we draw a directed edge from the transaction whose operation comes first. If this graph ends up having a cycle, the schedule is not conflict serializable. If there's no cycle, it is.
Two operations conflict when — they belong to different transactions, they access the same data item (X or Y in this case), and at least one of them is a Write. So R1(X) and W2(X) conflict. W1(Y) and W2(Y) also conflict. You get the idea.
Now let's walk through Option B:
W2(X) → R1(X): T2 writes X before T1 reads it → edge from T2 to T1
W2(Y) → W1(Y): T2 writes Y before T1 writes it → edge from T2 to T1
Both edges go from T2 → T1. There is no edge going back from T1 to T2, so the graph has no cycle. This means Schedule B is conflict serializable — it is equivalent to the serial schedule T2 → T1.
For the other options (A, C, D), when you build their precedence graphs, you'll find edges going in both directions between T1 and T2 — forming a cycle — which means they cannot be transformed into any serial schedule and are therefore not conflict serializable.
A quick tip worth remembering — conflict serializability is a stronger condition than view serializability. Every conflict serializable schedule is view serializable, but not the other way around. So when GATE asks about conflict serializability specifically, always go with the precedence graph approach, it's the most reliable and fastest method.
Similar Questions
Total Unique Visitors