Transaction: GATE CS Previous Year Questions

Transaction · Databases

38 questions · asked in 20 of 27 years (2000–2026)

MCQ 32 · MSQ 5 · NAT 11-mark 19 · 2-mark 19

2000Questions per year2026

Questions 26–30 of 38

Q26GATE 20122 marksMCQ−0.67 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 T1 and T2 for concurrent execution leads to

Q27GATE 20102 marksMCQ−0.67 if wrong
Consider the following schedule for transactions T1, T2 and T3:
T1 T2 T3 Read ( X ) Read ( Y ) Read ( Y ) Write ( Y ) Write ( X ) Write ( X ) Read ( X ) Write ( X )
Which one of the schedules below is the correct serialization of the above?

Q28GATE 20101 markMCQ−0.33 if wrong
Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock?
I. 2-phase locking
II. Time-stamp ordering

Q29GATE 20092 marksMCQ−0.67 if wrong
Consider two transactions T1 and T2, and four schedules S1, S2, S3, S4 of T1 and T2 as given below:

T1:R1[x]W1[x]W1[y]T_{1}:R_{1}[x]W_{1}[x]W_{1}[y]
T2:R2[x]R2[y]W2[y]T_{2}:R_{2}[x]R_{2}[y]W_{2}[y]
S1:R1[x]R2[x]R2[y]W1[x]W1[y]W2[y]S_{1}:R_{1}[x]R_{2}[x]R_{2}[y]W_{1}[x]W_{1}[y]W_{2}[y]
S2:R1[x]R2[x]R2[y]W1[x]W2[y]W1[y]S_{2}:R_{1}[x]R_{2}[x]R_{2}[y]W_{1}[x]W_{2}[y]W_{1}[y]
S3:R1[x]W1[x]R2[x]W1[y]R2[y]W2[y]S_{3}:R_{1}[x]W_{1}[x]R_{2}[x]W_{1}[y]R_{2}[y]W_{2}[y]
S4:R2[x]R2[y]R1[x]W1[x]W1[y]W2[y]S_{4}:R_{2}[x]R_{2}[y]R_{1}[x]W_{1}[x]W_{1}[y]W_{2}[y]

Which of the above schedules are conflict-serializable?

Q30GATE 20082 marksMCQ−0.67 if wrong
Consider the following three schedules of transactions T1, T2 and T3.
[Notation: In the following NYO represents the action Y (R for read, W for write) performed by transaction N on object O.]

(S1)2RA2WA3RC2WB3WA3WC1RA1RB1WA1WB(S2)3RC2RA2WA2WB3WA1RA1RB1WA1WB3WC(S3)2RA3RC3WA2WA2WB3WC1RA1RB1WA1WB\begin{array}{lllllllllll} \hline(S 1) & 2 R A & 2 W A & 3 R C & 2 W B & 3 W A & 3 W C & 1 R A & 1 R B & 1 W A & 1 W B \\ \hline(S 2) & 3 R C & 2 R A & 2 W A & 2 W B & 3 W A & 1 R A & 1 R B & 1 W A & 1 W B & 3 W C \\ \hline(S 3) & 2 R A & 3 R C & 3 W A & 2 W A & 2 W B & 3 W C & 1 R A & 1 R B & 1 W A & 1 W B \\ \hline \end{array}

Which of the following statements is TRUE?

Keep practising

Topics in Databases

All CS topics ›