GATE / CS ARCHIVE

SUBJECT COLLECTION

Database Management Systems · Transactions & Concurrency Control

26 questions, newest first

GATE CSE has asked 26 questions on Transactions & Concurrency Control (Database Management Systems) from 1999 to 2026, in 22 of the 46 papers; the most recent is in GATE CSE 2026 Set 2. In the last five years it carried 1.2 marks per 100-mark paper on average, against 1.2 since 2003. Since 2014 the questions have been 14 MCQ, 4 MSQ and 1 NAT. 2 groups of questions here are solved the same way; “One per method” keeps the newest of each.

Browse topics
1 mark · MCQ
Report issue

Recognizing conflicting transaction operations

Transactions & Concurrency Control

Question 20, GATE 2026: Two distinct concurrent transactions T1 and T2 both access object A. Which access pattern avoids a conflict on A? A both only read; B T1 reads,T2 writes; C T1 writes,T2 reads; D both write.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Givens and goal

Two distinct concurrent transactions T1 and T2 both access object A. Which access pattern avoids a conflict on A? A both only read; B T1 reads,T2 writes; C T1 writes,T2 reads; D both write.

Approach

Apply the same-object, different-transaction, at-least-one-write definition.

Step-by-step solution

1. Two operations conflict when they are from different transactions, access the same data item, and at least one is a write. The first two conditions are already given here.
2. Two reads do not change the object. Swapping their order does not change either observed value, so read-read is the nonconflicting pair.
3. In read-write or write-read, swapping order can change the value read. In write-write, it can change which written value remains. Hence B, C, and D all contain a conflict.
4. Therefore all accesses by both transactions to A must be reads, giving A. This local absence of conflict on A does not establish that the complete transactions have no conflicts on other objects.

Original paper, page 17 · Answer key

1 mark · MSQ
Report issue

Transactions & Concurrency Control

Question 27, GATE 2025: Two joint holders simultaneously transfer ₹10000 each from account A to B. Both transactions read A's initial balance as ₹11000 and are allowed to finish. B receives two ₹10000 credits, but A is debited only once and ends at ₹1000. Which ACID properties are certainly violated?
Options: A. atomicity; B. consistency; C. isolation; D. durability.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: B, C

A typical interleaving is: T1 reads A=11000; T2 reads A=11000; each computes 11000−10000=1000; T1 writes A=1000 and T2 overwrites it with the same value. Both credits to B survive. This is a lost update.

Isolation fails because the result is not equivalent to executing the two valid transfers serially. After the first transfer, a serial second transaction would observe A=1000, not the original 11000; it could be rejected for insufficient funds or, if overdraft were permitted, debit to −9000. Neither serial behavior produces the reported one-debit/two-credit result.

Consistency also fails: A decreases by only 10000 while B increases by 20000, so the transfer has created 10000 of aggregate balance rather than conserving it. Atomicity need not fail: both transactions may have executed all their own read/write steps and committed, with the race occurring between otherwise complete transactions. Durability is about retaining committed results despite later failures, and no such loss after a failure is described. Thus only B and C are certain.

Original paper, page 22 · Answer key

2 marks · MSQ
Report issue

Transactions & Concurrency Control

Question 53, GATE 2025: R_i(V) and W_i(V) denote transaction i reading/writing item V; C_i is its commit. Select all conflict-serializable schedules.
A. R1(X),W2(X),W1(Y),W2(Y),R1(X),W1(X),C2,C1.
B. W2(X),R1(X),W2(Y),W1(Y),R1(X),C2,W1(X),C1.
C. R1(X),W1(Y),W2(X),W2(Y),R1(X),W1(X),C1,C2.
D. W2(X),R1(X),W1(Y),W2(Y),R1(X),C2,W1(X),C1.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: B

Step through it (4 schedules)

Construct a precedence graph with vertices T1,T2. Two operations conflict when they are in different transactions, access the same item, and at least one is a write. An earlier conflicting operation from Ti followed by one from Tj creates edge Ti→Tj. The schedule is conflict-serializable exactly when this graph is acyclic.

In A, the first R1(X) precedes W2(X), giving T1→T2. The later R1(X), and also W1(X), follow W2(X), giving T2→T1. There is a cycle. C has the same two conflicting directions on X, so it also fails.

In B, W2(X) precedes both reads and the write of X by T1. On Y, W2(Y) precedes W1(Y). Thus all intertransaction conflicts point T2→T1; there is no reverse edge. This is conflict-equivalent to serial order T2 followed by T1.

In D, the X conflicts point T2→T1, but W1(Y) precedes W2(Y), adding T1→T2 and creating a cycle. Commit positions do not remove conflicts or make a cyclic precedence graph acyclic. Select B only. Conflict serializability is a property distinct from whether an interleaving satisfies a particular recovery or locking protocol.

Original paper, page 41 · Answer key

2 marks · MSQ
Report issue

Build the transaction precedence graph

Transactions & Concurrency Control

Question 46, GATE 2024: The schedule is r1(z); w1(z); r2(x); r3(y); w3(y); r2(y); w2(x); w2(y), where subscripts name transactions. Which serial schedules are conflict equivalent? A T1 T2 T3; B T1 T3 T2; C T3 T2 T1; D T3 T1 T2.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: B, C, D

Step through it (10 steps)

Approach: Only operations from different transactions on the same data item, with at least one write, impose conflict-order constraints.
1. Transaction T1 touches only z. Neither T2 nor T3 uses z, so T1 has no conflicts with the others and may appear anywhere in a serial order.
2. Only T2 accesses x, so x creates no intertransaction constraint.
3. On y, T3's read and write precede T2's read and write. Conflicting pairs include w3(y) before r2(y), w3(y) before w2(y), and r3(y) before w2(y). Each demands the same precedence edge T3→T2.
4. A conflict-equivalent serial order must therefore put T3 before T2, with T1 free. The valid orders are T1 T3 T2, T3 T2 T1, and T3 T1 T2.
Answer: B, C and D. Option A reverses the y-conflict order. Merely knowing that the precedence graph is acyclic establishes serializability; enumerating its topological orders identifies the actual choices.

Original paper, page 29 · Answer key

1 mark · MCQ
Report issue

Persistence after a transaction commits

Transactions & Concurrency Control

Question 19, GATE 2024: A DBMS has told the user a transaction succeeded. Its effect must survive a crash even if all changed data pages have not reached disk. Which ACID property is this? A durability; B atomicity; C consistency; D isolation.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Approach: Identify which guarantee applies after successful commit.

1. Derivation. Durability guarantees that the effect of an acknowledged committed transaction survives a crash, typically through durable logging and recovery even if data pages have not yet been flushed. Atomicity is all-or-nothing execution, consistency concerns integrity constraints, and isolation concerns interference. Answer A.

2. Explanation and checks. Durability need not mean that every modified database page is already stored in its final disk location. A sufficiently durable commit record and log can permit recovery to redo committed changes after restart. Atomicity instead prevents partial effects of an unsuccessful transaction; isolation controls interactions among simultaneous transactions. Consistency concerns preservation of the database constraints when transactions execute correctly. The decisive words here are successful completion and persistence after a crash.

Original paper, page 14 · Answer key

1 mark · MSQ
Report issue

Growing and shrinking phases in 2PL

Transactions & Concurrency Control

Question 27, GATE 2024: Which statements about two-phase locking are true? A it permits only serializable schedules; B every operation locks just before and releases immediately after; C after the first lock release a transaction can acquire no new lock; D deadlock can occur.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: A, C, D

Approach: Apply the no-new-locks-after-release rule and distinguish serializability from progress.

1. Derivation. Two-phase locking first acquires locks and then, after the first release, only releases locks. The no-new-locks shrinking-phase rule proves C. Ordering transactions by their lock points proves conflict serializability, hence A. It does not release every lock immediately after each operation, and deadlock is possible: T1 holds X and waits for Y while T2 holds Y and waits for X. Thus A, C, D.

2. Explanation and checks. The growing phase permits acquisition but no release; the shrinking phase permits release but no acquisition. The instant at which a transaction acquires its final lock is its lock point; ordering transactions by such points is consistent with every conflicting dependency, giving a serial order. Holding X while waiting for Y and holding Y while waiting for X obey the growing-phase rule, so 2PL can still deadlock. Releasing each lock immediately, as B claims, would prevent later acquisitions and is not the general protocol.

Original paper, page 19 · Answer key

2 marks · MCQ
Report issue

Transactions & Concurrency Control

Question 39, GATE 2022: With Ri(z),Wi(z) denoting transaction i's reads/writes, schedule S is R4(x),R2(x),R3(x),R1(y),W1(y),W2(x),W3(y),R4(y). Choose a conflict-equivalent serial order: A 1,3,4,2; B 1,4,3,2; C 4,1,3,2; D 3,1,4,2.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Step through it (10 steps)

Conflicts on x give T4→T2 and T3→T2. Conflicts on y give T1→T3, T1→T4 and T3→T4. Their topological order is T1, T3, T4, T2, option A. Read-read pairs add no edges.

The precedence graph can be drawn as T1→T3→T4→T2, with additional T1→T4 and T3→T2 edges. Each edge enforces the same relative ordering of conflicting operations in a serial schedule. Since this chain orders all four transactions, the topological order is unique.

Original paper, page 25 · Answer key

2 marks · MCQ
Report issue

Transactions & Concurrency Control

Question 32, GATE 2021: Let ri(z),wi(z) denote reads/writes by transaction Ti. S1=r1(x),r1(y),r2(x),r2(y),w2(y),w1(x). S2=r1(x),r2(x),r2(y),w2(y),r1(y),w1(x). Which schedules are conflict-serializable? A S1 only; B S2 only; C both; D neither.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Step through it (2 schedules)

In S1, r1(y) before w2(y) gives T1→T2, while r2(x) before w1(x) gives T2→T1, creating a cycle. In S2, w2(y) before r1(y) and r2(x) before w1(x) both give only T2→T1. Therefore S1 is not conflict-serializable while S2 is, equivalent to T2 thenT1. Answer B.

Only different transactions accessing the same item, with at least one write, create precedence edges. Reads of x by both transactions do not conflict. In S1, y imposes T1 before T2 whereas x imposes T2 before T1, making a directed cycle. Moving r1(y) after w2(y) in S2 reverses the y constraint; all constraints now agree. An acyclic precedence graph is the necessary and sufficient test for conflict serializability.

Original paper, page 28 · Answer key

2 marks · MCQ
Report issue

Transactions & Concurrency Control

Question 32, GATE 2021: Schedule R1(Y),R1(X),R2(Z),R1(Y),W1(X),R2(Z),W2(Y),R3(X),W3(Z). P: conflict-serializable. Q: if T3 commits before T1 finishes, schedule is recoverable. A both; B only P; C only Q; D neither.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Step through it (2 schedules)

On Y, R1(Y) precedes W2(Y), giving T1→T2. On X, W1(X) precedes R3(X), giving T1→T3. On Z, R2(Z) precedes W3(Z), giving T2→T3. This acyclic graph has serial orderT1, T2, T3, so P is true. T3 reads X written by T1; committing T3 before T1 finishes violates recoverability. Hence Q is false and B holds.

Conflicts require the same data item, distinct transactions, and at least one write. Repeated reads of Z do not introduce a reverse edge. Serializability and recoverability are distinct: an acyclic precedence graph controls equivalent ordering of operations, whereas a reads-from dependency requires the writer to commit before its reader commits.

Original paper, page 73 · Answer key

2 marks · MCQ
Report issue

Transactions & Concurrency Control

Question 37, GATE 2020: Read the following schedule equivalents left to right; Ri(X),Wi(X) belong to transaction i. Both commits follow the listed operations in order C1,C2. Original: R1(A),R2(B),W2(B),R1(C),R2(D),W1(D),W2(C),W1(B),C1,C2. Which is conflict equivalent?
A R2(B),W2(B),R2(D),R1(A),R1(C),W1(D),W1(B),W2(C),C1,C2.
B R1(A),R1(C),W1(D),W1(B),R2(B),W2(B),R2(D),W2(C),C1,C2.
C R1(A),R1(C),W1(D),R2(B),W2(B),R2(D),W1(B),W2(C),C1,C2.
D R2(B),W2(B),R2(D),W2(C),R1(A),R1(C),W1(D),W1(B),C1,C2.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Step through it (5 schedules)

Worked explanation

Two operations conflict exactly when they belong to different transactions, access the same item, and at least one writes. There is no cross-transaction access to A. On B, both R2(B) and W2(B) precede W1(B). On D, R2(D) precedes W1(D). On C, R1(C) precedes W2(C). Those four pairwise orders are the complete test, independent of where unrelated reads move. A preserves all four and each transaction’s internal order. B reverses the B and D orders; C reverses only the D order among these; D reverses C. The precedence graph contains both T2→T1 and T1→T2, so the original is not conflict-serializable, but it can still have a conflict-equivalent nonserial schedule. Do not confuse these two questions.

Derivation and answer

The original intertransaction conflict orders are R2(B)<W1(B), W2(B)<W1(B), R2(D)<W1(D), and R1(C)<W2(C). OptionA preserves all four. B reverses the B andD conflicts; C reverses theD conflict; D reverses theC conflict. Thus A.

Original paper, page 12 · Answer key

1 mark · MCQ
Report issue

Serializability under strict 2PL and Thomas’s rule

Transactions & Concurrency Control

Question 11, GATE 2019: Assess two claims: I strict two-phase locking generates conflict-serializable and recoverable schedules; II timestamp ordering with Thomas's Write Rule can generate view-serializable schedules that are not conflict-serializable. Choices: A I only; B II only; C both; D neither.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Method: separate the ordering guarantee of locking from the weaker observational guarantee allowed by ignoring obsolete writes.

1. In two-phase locking, a transaction first acquires locks and then releases them; it cannot acquire a new lock after releasing one. Ordering transactions by their lock points yields an order consistent with their conflicting operations. Hence 2PL gives conflict serializability.
2. Strict 2PL additionally retains exclusive locks until commit or abort. A second transaction cannot read a value written by the first before that writer commits, so it cannot commit while depending on an uncommitted writer. This prevents cascading dirty reads and implies recoverability. Thus I is true.
3. Thomas's Write Rule modifies timestamp ordering: if a proposed write is older than an already recorded write timestamp, and the relevant read-timestamp check does not require abort, that obsolete write can be ignored. It need not replace the newer value.
4. Ignoring such a write can preserve every transaction's observed reads and the appropriate final writes even where the logical ordering of conflicting write requests cannot be rearranged by conflict-equivalent swaps. View serializability preserves those observations and final writers, whereas conflict serializability imposes the stronger pairwise-operation ordering condition. Thus Thomas's rule can admit view-serializable schedules beyond conflict serializability, making II true.

Result: C, both statements. Recoverability and serializability are distinct properties; the first follows here from strict locking, not merely from conflict serializability alone.

Original paper, page 6 · Answer key

2 marks · NAT
Report issue

Transactions & Concurrency Control

Question 44, GATE 2017: Transactions are T1:r1(X),w1(X),r1(Y),w1(Y) and T2:r2(Y),w2(Y),r2(Z),w2(Z). Here r and w denote read and write operations. How many order-preserving interleavings of the eight operations are conflict serializable?
Tap to enlarge
Answer & solution

Official answer: 54.0

Our answer: 54

1. Each schedule is an interleaving of four operations from each transaction, so there are C(8,4)=70 candidates. Only Y is shared; read/write or write/write pairs on Y create precedence-graph edges. A schedule is serializable precisely when it does not create edges in both directions.

2. For order T1→T2, w1(Y) must precede r2(Y). Since these are respectively the last T1 and first T2 operations, this requires the single serial schedule 11112222, where digits identify transactions.

3. For order T2→T1, w2(Y) must precede r1(Y): the second 2 must occur before the third 1. Count its complement, third 1 before second 2. If the third 1 occurs at position 3, the prefix is 111 and the last 1 has 5 possible positions. If it occurs at position 4, the first three positions contain two 1s and one 2 in 3 arrangements, and the final 1 has 4 positions. The complement has 5+12=17 schedules, so this serial order has 70-17=53.

4. The two acyclic cases are disjoint, yielding 1+53=54. This counts conflict serializability, not only the two fully serial schedules. Independent enumeration of all 70 order-preserving interleavings confirms the count.

Original paper, page 18 · Answer key

1 mark · MCQ
Report issue

Transactions & Concurrency Control

Question 22, GATE 2016: Which is NOT an ACID transaction property? A: Atomicity. B: Consistency. C: Isolation. D: Deadlock-freedom.
Tap to enlarge
Your answer
Answer & solution

Official answer: D

ACID expands to Atomicity, Consistency, Isolation and Durability. Deadlock freedom is a concurrency/liveness property, not an ACID component. Thus D.

Atomicity means all-or-nothing effects; consistency preserves the database's declared constraints; isolation controls interactions among concurrent transactions; durability preserves committed results. A locking implementation can satisfy these properties while occasionally encountering a deadlock, provided it detects and resolves that deadlock by aborting a transaction. Thus deadlock-freedom is a separate liveness guarantee rather than the missing fourth letter of ACID, which is durability.

Original paper, page 10 · Answer key

2 marks · MCQ
Report issue

Transactions & Concurrency Control

Question 51, GATE 2016: A transaction accessing objects O1,...,Ok first obtains exclusive locks on all of them in increasing memory-address order, then performs its operations, then releases all locks. The same protocol is followed by every transaction. What is guaranteed? A:serializability and deadlock-freedom. B:neither. C:serializability only. D:deadlock-freedom only.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Acquiring all exclusive locks before releasing any is two-phase locking, ensuring conflict serializability. Every transaction acquires locks in the same increasing object-address order. A circular wait would force a strict sequence of increasing addresses to return to its starting address, impossible. The protocol is therefore also deadlock-free, A.

The growing phase contains every lock acquisition, and the shrinking phase contains only releases, so this is stronger than ordinary two-phase locking and ensures conflict serializability. The common global address order prevents cycles in the wait-for graph: following a chain of waits requires strictly increasing lock addresses. Serializability alone would not prevent deadlock in arbitrary two-phase locking, so both parts of the argument are needed. Locking exclusively for reads is conservative but does not invalidate either guarantee.

Original paper, page 19 · Answer key

1 mark · MCQ
Report issue

Transactions & Concurrency Control

Question 22, GATE 2016: Build a schedule’s precedence graph with transactions as vertices and conflicts as directed edges. If the schedule is “serializable,” which vertex order guarantees a serial schedule? A topological; B depth-first; C breadth-first; D increasing transaction index. Explain the intended meaning of serializable.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Our answer: A under conflict-serializability interpretation

An acyclic precedence graph admits a topological order, and placing transactions in that order respects every conflicting pair, yielding a conflict-equivalent serial schedule. Thus A. The word serializable must mean conflict-serializable here: view-serializable schedules can have cyclic conflict graphs (for example blind writes w1(X), w2(X), w1(X)), so a topological order need not exist under that broader meaning.

An edge Ti→Tj says a conflicting operation of Ti precedes one of Tj and that order must be preserved. A topological sort respects every such edge; ordinary traversal orders need not. For example an edge T2→T1 rules out increasing index order. Graph acyclicity is both necessary and sufficient for conflict serializability, not for every broader serializability notion.

Original paper, page 31 · Answer key

1 mark · MCQ
Report issue

Transactions & Concurrency Control

Question 31, GATE 2015: Transaction transfers 50 from x to y: read(x); x:=x−50; write(x); read(y); y:=y+50; write(y). Preserving x+y is which ACID property? A atomicity; B consistency; C isolation; D durability.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Preserving the invariant x+y across the transaction is consistency, B. Atomicity is all-or-nothing execution, isolation concerns concurrent visibility, and durability concerns persistence after commit.

The declared invariant defines which database states are valid. Subtracting 50 from one account and adding 50 to the other preserves the invariant x+y, so this is consistency. Atomicity would ensure both changes occur or neither does. Isolation concerns interference between concurrent transactions, and durability concerns survival after commit. The invariant is not itself a claim about failure recovery or scheduling.

Original paper, page 36 · Answer key

2 marks · MCQ
Report issue

Transactions & Concurrency Control

Question 29, GATE 2014: On one item x, which schedule is conflict serializable? Subscripts identify transactions. A: r₁(x);r₂(x);w₁(x);r₃(x);w₂(x). B: r₂(x);r₁(x);w₂(x);r₃(x);w₁(x). C: r₃(x);r₂(x);r₁(x);w₂(x);w₁(x). D: r₂(x);w₂(x);r₃(x);r₁(x);w₁(x).
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Step through it (4 schedules)

1. Method and setup. Build a precedence graph with one vertex per transaction. Add an edge for time-ordered accesses by different transactions to x when at least one is a write; two reads alone create no conflict. The schedule is conflict serializable exactly when this graph is acyclic.

2. Work through the result and its assumptions. A and B each contain conflicting edges 1→2 and 2→1. C likewise has 1→2 from r1 before w2 and 2→1 from r2 before w1. D has edges 2→3, 2→1, 3→1 and no cycle, with serial order T2, T3, T1. Thus D.

Original paper, page 14 · Answer key

2 marks · MCQ
Report issue

Transactions & Concurrency Control

Question 29, GATE 2014: Schedule S, in chronological order: T2 reads X; T3 writes X and commits; T1 writes X and commits; T2 writes Y, reads Z, and commits; T4 reads X, reads Y, and commits. Classify S. A conflict-serializable, not recoverable; B not conflict-serializable, recoverable; C both; D neither.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Step through it (13 steps)

1. Set up the reasoning. Construct a precedence graph for conflicting operations on the same item, and separately inspect the commit order of transactions whose values are read. Serializability and recoverability are different tests.

2. Derive the result. Conflicts on X impose T2→T3→T1→T4, and Y adds T2→T4; the graph is acyclic. T2 reads initial X/Z; T4 reads X from already committed T1 and Y from already committed T2. Thus the schedule is both conflict-serializable and recoverable, C.

3. Check the interpretation. The graph order T2,T3,T1,T4 respects every conflict, including direct T2→T1 and T2→T4 edges. T4 reads only committed results, while T2 reads initial values, so there is no commit-before-writer recovery violation.

Original paper, page 36 · Answer key

2 marks · MCQ
Report issue

Transactions & Concurrency Control

Question 29, GATE 2014: Transactions are T1:r1(X),r1(Z),w1(X),w1(Z); T2:r2(Y),r2(Z),w2(Z); T3:r3(Y),r3(X),w3(Y). S1=r1(X),r3(Y),r3(X),r2(Y),r2(Z),w3(Y),w2(Z),r1(Z),w1(X),w1(Z). S2=r1(X),r3(Y),r2(Y),r3(X),r1(Z),r2(Z),w3(Y),w1(X),w2(Z),w1(Z). Which schedules are conflict-serializable? A only S1; B only S2; C both; D neither.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Step through it (2 schedules)

Step 1: Construct a precedence graph: add Ti→Tj when conflicting operations from different transactions access the same item, at least one is a write, and Ti's operation occurs first. Read/read pairs create no edge. Step 2: In S1, Y gives T2→T3, X gives T3→T1, and Z gives T2→T1. The graph is acyclic, with serial order T2,T3,T1. Step 3: In S2, r1(Z) precedes w2(Z), giving T1→T2; r2(Z) and w2(Z) precede w1(Z), giving T2→T1. This two-way cycle suffices to reject conflict serializability. Thus only S1 is conflict-serializable, A.

Original paper, page 59 · Answer key

2 marks · MCQ
Report issue

Conflict cycles in interleaved transactions

Transactions & Concurrency Control

Question 27, GATE 2012: 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
        (A) a serializable schedule
        (B) a schedule that is not conflict serializable
        (C) a conflict serializable schedule
        (D) a schedule for which a precedence graph cannot be drawn
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Conflicts arise on P between T1’s read and T2’s write, and on Q between T2’s read and T1’s write. If w1(Q) precedes r2(Q), then all of T1’s listed operations precede T2’s first operation, giving serial order T1, T2. Similarly, w2(P) before r1(P) forces serial order T2, T1. Therefore every genuinely nonserial interleaving has r1(P)<w2(P) and r2(Q)<w1(Q), giving both T1→T2 and T2→T1 in the precedence graph. The cycle proves it is not conflict serializable, B. The question’s qualification nonserial is necessary.

Check: The initial values affect the arithmetic outcomes but not the conflict edges, which depend on read/write order. Each transaction’s first read is before its last write; interleaving forces both cross-read-before-write relations, producing a directed two-cycle.

Original paper, page 6 · Answer key

1 mark · MCQ
Report issue

Serializability without deadlock

Transactions & Concurrency Control

Question 20, GATE 2010: Which concurrency-control protocols ensure both conflict serializability and freedom from deadlock? I: two-phase locking. II: timestamp ordering.
Options: (A) I only; (B) II only; (C) Both I and II; (D) Neither I nor II.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Two-phase locking guarantees conflict serializability but can create a cycle of transactions waiting for locks, so I does not guarantee deadlock freedom. Basic timestamp ordering enforces conflicts in timestamp order and rejects/aborts violating operations rather than making transactions wait on locks. It is conflict serializable and deadlock-free, although retries can still starve a transaction. Thus II only, B.

A simple 2PL deadlock is T1 holding lock X while requesting Y and T2 holding Y while requesting X; neither needs to violate the two-phase rule. Timestamp ordering instead disallows an operation inconsistent with the fixed transaction order. Deadlock freedom does not imply starvation freedom: repeated abort/restart of one transaction is still possible.

Original paper, page 5

2 marks · MCQ
Report issue

Conflict-serializable schedule

Transactions & Concurrency Control

Question 42, GATE 2010: Transactions T1,T2,T3 execute this schedule, in time order: r1(X), r2(Y), r3(Y), w2(Y), w1(X), w3(X), r2(X), w2(X). Which serial order is equivalent to the schedule?
Options: (A) T1→T3→T2; (B) T2→T1→T3; (C) T2→T3→T1; (D) T3→T1→T2.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

Step through it (10 steps)

In time order the schedule is r1(X), r2(Y), r3(Y), w2(Y), w1(X), w3(X), r2(X), w2(X). Conflicts on X impose T1→T3, T1→T2 and T3→T2; r3(Y) before w2(Y) also imposes T3→T2. There is no reverse edge. Its unique topological ordering is T1→T3→T2, option A.

Two operations conflict only if they belong to different transactions, access the same item, and at least one is a write. Reads r2(Y) and r3(Y) do not themselves create an edge. However r3(Y) before w2(Y) creates T3→T2. A topological ordering of the resulting acyclic graph gives a conflict-equivalent serial execution; source-code transaction numbering alone does not determine that order.

Original paper, page 10

2 marks · MCQ
Report issue

Conflict serializability of four schedules

Transactions & Concurrency Control

Question 43, GATE 2009: T1=R1x, W1x, W1y; T2=R2x, R2y, W2y. S1=R1x, R2x, R2y, W1x, W1y, W2y; S2=R1x, R2x, R2y, W1x, W2y, W1y; S3=R1x, W1x, R2x, W1y, R2y, W2y; S4=R2x, R2y, R1x, W1x, W1y, W2y. Which are conflict-serializable? A S1/S2; B S2/S3; C S3 only; D S4 only.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Step through it (4 schedules)

S1 has T2→T1 from r2(x) before w1(x), but T1→T2 from w1(y) before w2(y), so it cycles. S2 has only T2→T1: both its reads and final write of y precede T1’s conflicting writes. S3 has only T1→T2, as w1(x) and w1(y) precede T2’s accesses. S4 cycles for the same opposing x and y directions as S1. Therefore S2 and S3 are conflict-serializable, B.

Build one vertex per transaction and add an edge when an earlier operation conflicts with a later operation of the other transaction on the same item, with at least one write. Reads of different items or two reads do not conflict. S2 has only 2→1, so it is equivalent to serial T2, T1; S3 has only 1→2. S1/S4 each contain both directions and therefore a directed cycle. Acyclicity, not whether operations are interleaved, determines conflict serializability.

Original paper, page 10

2 marks · MCQ
Report issue

Conflict serializability of two schedules

Transactions & Concurrency Control

Question 64, GATE 2007: For two transactions, consider schedules S1: r1(X);r1(Y);r2(X);r2(Y);w2(Y);w1(X) and S2: r1(X);r2(X);r2(Y);w2(Y);r1(Y);w1(X). Which are conflict serializable?
Options:
(A) Both
(B) S1 only
(C) S2 only
(D) Neither
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Step through it (2 schedules)

1. Approach. Create a precedence edge only between different transactions on the same item when at least one access is a write. Read–read pairs do not conflict. A cycle is exactly the obstruction to conflict serializability.

2. Derivation and interpretation. In S1, r1(Y) precedes w2(Y), producing T1 -> T2, while r2(X) precedes w1(X), producing T2 -> T1. The cycle prevents conflict serializability. In S2, w2(Y) precedes r1(Y) and r2(X) precedes w1(X), both giving T2 -> T1; there is no reverse edge. S2 is equivalent to serial order T2,T1. Thus C.

Original paper, page 16

2 marks · MCQ
Report issue

Serializability of a three-transaction schedule

Transactions & Concurrency Control

Question 87, GATE 2003: Three transactions act on D1,D2,D3. In chronological order the printed schedule is:
R2(D3), R2(D2), W2(D2), R3(D2), R3(D3), R1(D1), W1(D1), W3(D2), W3(D3), R2(D1), R1(D2), W1(D2), W2(D1).
Ri(D) and Wi(D) denote transaction Ti reading/writing D. Which is correct?
A. Serializable as T2,T3,T1
B. Serializable as T2,T1,T3
C. Serializable as T3,T2,T1
D. Not serializable
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

Step through it (15 steps)

1. On D1, T1 writes before T2 reads and writes, forcing edge T1→T2 in the conflict graph.
2. On D2, T2 writes before T3 reads/writes, forcing T2→T3; T3 writes before T1 reads/writes, forcing T3→T1. These edges already form T1→T2→T3→T1.
3. A directed cycle means no serial ordering can preserve all conflicts, so the schedule is not conflict-serializable.
4. Even view equivalence cannot rescue it: T2's D2 read is initial, T3 reads T2's D2 write, T1 reads T3's D2 write, and T2 reads T1's D1 write. Preserving these reads requires T2<T3<T1<T2, impossible. Therefore D holds even under the broader view-serializability interpretation.

Solution: On D1, T1 writes before T2 reads/writes, imposing T1→T2. On D2, T2 writes before T3 reads/writes, and T3 writes before T1 reads/writes, imposing T2→T3→T1. This cycle rules out conflict serializability, so D. It also rules out view serializability here: T2 reads the initial D2 value, T3 reads T2's D2 value, T1 reads T3's D2 value, and T2 reads T1's D1 value. Any view-equivalent serial order would need T2 before T3 before T1 before T2, which is impossible.

Original paper, page 13

2 marks · MSQ
Report issue

Serializability of an interleaving

Transactions & Concurrency Control

Question 2.6, GATE 1999: Schedule: r1(A),r2(B),w1(A),r2(A),w2(A),w2(B),r1(B),w1(B). Is it serializable and/or possible under two-phase locking?
Tap to enlarge
Select all that apply
Answer & solution

Answer: D: neither (no official key was published)

Step through it (10 steps)

The A conflicts put transaction 1 before transaction 2: w1(A) precedes r2(A) and w2(A). The B conflicts put transaction 2 before transaction 1: w2(B) precedes r1(B) and w1(B). Hence the precedence graph has a directed cycle. It is not conflict serializable; even view equivalence fails because T2 reads A from T1 while T1 reads B from T2, requiring opposite serial orders. Two-phase locking guarantees conflict serializability, so it cannot produce this completed schedule. Thus D.

Original paper, page 4