P=Q=0 initially. T₁ executes read(P); read(Q); if P==0 then Q:=Q+1; write(Q). T₂ executes read(Q); read(P); if Q==0 then P:=P+1; write(P). Any nonserial interleaving leads to
Correct answer: (B) a schedule not conflict-serializable
Explanation
A nonserial overlap lets T₁’s read of P precede T₂’s write of P and T₂’s read of Q precede T₁’s write of Q. These conflicts create edges T₁→T₂ and T₂→T₁, a cycle, so the schedule is not conflict-serializable, B. A precedence graph can still be drawn; cyclicity is the issue.
More Transactions and Concurrency Control questions
GATE 2010 CS (CS1) Q30– Which protocols ensure both conflict serializability and freedom from deadlock? I:…
GATE 2010 CS (CS1) Q52– Find the equivalent serial order for this schedule, listed from first operation to last:
GATE 2015 CS (CS2) Q31– A transaction transfers money between accounts x,y: The requirement that x+y remain…
GATE 2015 CS (CS2) Q39– A simple-checkpoint recovery log contains: A crash occurs now. Choose the undo and redo…
GATE 2015 CS (CS3) Q51– A partial schedule is: Time T1 T2 --- --- --- 1 read(A) 2 write(A) 3 read(C) 4 write(C) 5…
GATE 2021 CS (CS2) Q42– Schedule S is R2(Y),R1(X),R3(Z),R1(Y),W1(X),R2(Z),W2(Y),R3(X),W3(Z). P: S is…