GATE CS 2012 · Question 27 · Databases · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer

Consider the following transactions with data items P and Q initialized to zero:
T1 : read (P); read (Q); if P = 0 then Q := Q + 1 ; write (Q). T2 : read (Q); read (P); if Q = 0 then P := P + 1 ; write (P).
Any non-serial interleaving of T₁ and T₂ for concurrent execution leads to

  1. (A) a serializable schedule
  2. (B) a schedule that is not conflict serializable
  3. (C) a conflict serializable schedule
  4. (D) a schedule for which a precedence graph cannot be drawn
Answer

Answer (B)

Answer from the official GATE CS 2012 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes