Transactions questions

Q27

GATE CS 2012 CSTransactionsMCQ2 marks−2/3 if wrong
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 T1T_1 and T2T_2 for concurrent execution leads to
Show answer without attempting

Answer: B

0/10 correct0 marks

Related topics in Databases