1
GATE CSE 2007
MCQ (Single Correct Answer)
+2
-0.6
Consider the following two transactions: T1 and T2.
T1: read (A);                  T2: read (B);
    read (B);                      read (A);
    if A = 0 then B ← B + 1;       if B ≠ 0 then A ← A - 1;
    write (B);                     write (A);
Which of the following schemes, using shared and exclusive locks, satisfy the requirements for strict two phase locking for the above transactions?
A
S1 : lockS(A); 	        S2 : lockS(B);
     read (A);               read (B);
     lockS(B);               lockS(A);
     read (B);               read (A);
     if A = 0                if B ≠ 0
     then B ← B + 1;        then A ← A - 1;
     write (B);              write (A);
     commit;                 commit;
     unlock (A);             unlock (B);
     unlock (B);             unlock (A);
B
S1 : lockX(A);          S2 : lockX(B);
     read (A);               read (B);
     lockX(B);               lockX(A);
     read (B);               read (A);
     if A = 0                if B ≠ 0
     then B ← B + 1;        then A ← A - 1;
     write (B);              write (A);
     unlock (A);             unlock (A);
     commit;                 commit;
     unlock (B);             unlock (A);
C
S1 : lockS(A);           S2 : lockS(B);
     read (A);                read (B);
     lockX(B);                lockX(A);
     read (B);                read (A);
     if A = 0                 if B ≠ 0
     then B ← B + 1;         then A ← A - 1;
     write (B);               write (A);
     unlock (A);              unlock (B);
     commit;                  commit;
     unlock (B);              unlock (A);
D
S1 : lockS(A);           S2 : lockS(B);
     read (A);                read (B);
     lockX(B);                lockX(A);
     read (B);                read (A);
     if A = 0                 if B ≠ 0
    then B ← B + 1;        then A ← A - 1;
     write (B);               write (A);                                                                                                     
     unlock (A);              unlock (A);
     unlock (B);              unlock (B);
     commit;                  commit;
2
GATE CSE 2004
MCQ (Single Correct Answer)
+2
-0.6
Consider the following schedule S of transactions T1 and T2: GATE CSE 2004 Database Management System - Transactions and Concurrency Question 23 English Which of the following is TRUE about the schedule S?
A
S is serializable only as T1,T2
B
S is serializable only as T2,T1
C
S is serializable both as T1, T2 and T2, T2
D
S is not serializable either as T1 or as T2
3
GATE CSE 2003
MCQ (Single Correct Answer)
+2
-0.6
Consider three data items D1, D2, and D3, and the following execution schedule of transactions T1, T2, and T3. In the diagram, R(D) and W(D) denote the actions reading and writing the data item D respectively. GATE CSE 2003 Database Management System - Transactions and Concurrency Question 24 English

Which of the following statements is correct?

A
The schedule is serializable as T2; T3; T1
B
The schedule is serializable as T2; T1; T3
C
The schedule is serializable as T3; T2; T1
D
The schedule is not serializable
4
GATE CSE 1999
MCQ (Single Correct Answer)
+2
-0.6
For the schedule given below, which of the following is correct: GATE CSE 1999 Database Management System - Transactions and Concurrency Question 25 English
A
This schedule is serialized and can occur in a scheme using 2PL protocol
B
This schedule is serializable but cannot occur in a scheme using 2PL protocol
C
This schedule is not serializable but can occur in a scheme using 2PL protocol
D
This schedule is not serializable and cannot occur in a scheme using 2PL protocol.
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12