IAE Academy

IN THE CS SYLLABUS

Transactions and concurrency control

A transaction is a unit of work that must run as if it were alone and either complete fully or leave no trace. This topic covers how to decide whether an interleaved schedule is safe (conflict and view serializability, recoverability), how locks, timestamps and validation enforce safety, which anomalies each SQL isolation level allows, and how a log restores the database after a crash. You should be able to test schedules, count serial orders, trace 2PL, timestamp ordering, wait-die and wound-wait, and decide what to undo or redo.

9 previous-year questions · 9 solved · 6 practice questions

Transactions, ACID and conventions

A transaction is a sequence of read and write operations on database items that the user treats as one logical unit. Convention used on this page: transactions are T1, T2, ...; r1(A) is a read of item A by T1, w1(A) a write; c1 is commit and a1 is abort; a schedule is read left to right, one operation per step. When timestamps are used, a smaller timestamp means an older transaction.

Property

Meaning

Mainly ensured by

Atomicity

All operations of a transaction take effect, or none do

Recovery manager (log, undo)

Consistency

A transaction moves the database from one consistent state to another, if run alone

Programmer and integrity constraints

Isolation

Concurrent transactions behave as if run one after another

Concurrency control (locks, timestamps)

Durability

Once committed, changes survive a crash

Recovery manager (log, redo)

State

What it means

Active

Executing its operations

Partially committed

Last operation done, commit not yet made permanent

Committed

Effects are permanent

Failed

Normal execution cannot continue

Aborted

Rolled back; database restored to the state before the transaction

The possible transitions are Active to Partially committed to Committed, and Active or Partially committed to Failed to Aborted. A committed transaction is never rolled back. Its effects can only be reversed by running a separate compensating transaction.

EXAM TIP

Atomicity and durability belong to recovery; isolation belongs to concurrency control. A question asking which component guarantees a property is testing this split.

Schedules and conflict serializability

A schedule interleaves the operations of several transactions while keeping the order inside each transaction. A schedule is serial if the transactions run one after another with no interleaving. It is serializable if its effect equals that of some serial schedule.

NUMBER OF POSSIBLE SCHEDULES (INTERLEAVINGS)

For k transactions with n1, ..., nk operations each, keeping each transaction's own order and counting only the order of operations, not their legality. Non-serial schedules = this number minus k!. Example: two transactions with 2 and 3 operations give 5!/(2! 3!) = 10 schedules, of which 2 are serial and 8 non-serial.

NUMBER OF SERIAL SCHEDULES OF K TRANSACTIONS

Every ordering of whole transactions is one serial schedule.

Two operations are conflicting if they belong to different transactions, act on the same item, and at least one is a write. So the conflicting pairs are read-write, write-read and write-write. Two schedules are conflict equivalent if they contain the same operations and every pair of conflicting operations occurs in the same order in both. Equivalently, one can be turned into the other by repeatedly swapping adjacent non-conflicting operations of different transactions. A schedule is conflict serializable if it is conflict equivalent to a serial schedule.

Test for conflict serializability (precedence graph)

  1. Draw one node for each transaction. If the schedule contains aborts, apply the test to its committed transactions only.

  2. For each pair of conflicting operations where Ti's operation comes first and Tj's comes later, draw an edge Ti to Tj.

  3. If the graph has a cycle, the schedule is not conflict serializable.

  4. If it is acyclic, it is conflict serializable; any topological order of the nodes is an equivalent serial schedule.

  5. The number of conflict-equivalent serial schedules equals the number of topological orders of the graph.

  6. This test runs in polynomial time (cycle detection).

Step

T1

T2

T3

1

r1(A)

2

r2(B)

3

w3(A)

4

w3(B)

5

w1(C)

WORKED EXAMPLE

Schedule S (table above), read left to right: r1(A), r2(B), w3(A), w3(B), w1(C). Is S conflict serializable? How many conflict-equivalent serial schedules does it have?

Solution
  1. Conflicting pairs: r1(A) before w3(A) gives T1 to T3. r2(B) before w3(B) gives T2 to T3. w1(C) conflicts with nothing.

  2. Edges: T1 to T3 and T2 to T3. There is no cycle.

  3. Topological orders: T3 must be last, and T1, T2 may be in either order: T1 T2 T3 and T2 T1 T3.

Answer: S is conflict serializable, with 2 equivalent serial schedules.

View serializability is weaker. Two schedules are view equivalent if (1) each transaction reads the initial value of an item in both or in neither, (2) each read reads from the same writing transaction in both, and (3) the final write on each item is by the same transaction. A schedule is view serializable if it is view equivalent to a serial schedule. Every conflict serializable schedule is view serializable, but not conversely. A view serializable schedule that is not conflict serializable must contain blind writes, that is, writes with no earlier read of that item by the same transaction. Testing view serializability is NP-complete.

Step

T1

T2

T3

1

r1(A)

2

w2(A)

3

w1(A)

4

w3(A)

WORKED EXAMPLE

Schedule S (table above): r1(A), w2(A), w1(A), w3(A). Is S conflict serializable? Is it view serializable?

Solution
  1. r1(A) before w2(A) gives T1 to T2; w2(A) before w1(A) gives T2 to T1. This is a cycle, so S is not conflict serializable.

  2. In S, T1 reads the initial value of A, there are no other reads, and the final write on A is by T3.

  3. Serial T1 T2 T3: T1 reads the initial A and T3 writes last, so all three view conditions hold.

  4. The other serial orders fail: T3 must write last, and T2 before T1 would make T1 read from T2. The blind writes are w2(A) and w3(A).

Answer: S is not conflict serializable but is view serializable, view equivalent only to T1 T2 T3.

EXAM TIP

A cycle in the precedence graph only rules out conflict serializability. When a question asks about view serializability, look for blind writes before declaring a cyclic schedule not serializable at all.

Recoverability

Serializability ignores failures. If Tj reads from Ti (Tj reads an item last written by Ti), then a failure of Ti forces Tj to be undone as well. A chain of such forced aborts is a cascading rollback.

Class

Condition

Prevents

Recoverable

If Tj reads from Ti, then ci occurs before cj

Committing a transaction that read from one that later aborts

Cascadeless (ACA)

Tj reads an item only after the transaction that last wrote it has committed

Cascading aborts

Strict

No transaction reads or overwrites an item until the last transaction that wrote it has committed or aborted

Cascading aborts; also lets undo simply restore the old value (before-image)

The classes nest: strict is inside cascadeless, which is inside recoverable. Every serial schedule is strict. A schedule can be conflict serializable and still not recoverable, and the reverse also happens, because the two ideas are independent.

EXAM TIP

To place a schedule, check from the strongest class downward. Strict: no read or write of an item while its last writer has neither committed nor aborted. Cascadeless: no read of such an item. Recoverable: for every reads-from pair, the writer commits before the reader. Check every such operation and pair, not just the first one.

Lock-based concurrency control

A transaction asks for a shared lock (S, to read) or an exclusive lock (X, to write) before using an item and releases it later. A request that conflicts with a lock held by another transaction must wait.

Held (row) / Requested (column)

S

X

S

Granted

Wait

X

Wait

Wait

Two-phase locking (2PL): each transaction has a growing phase (acquires locks, releases none) and then a shrinking phase (releases locks, acquires none). The lock point is the step at which the transaction acquires its final lock, the end of its growing phase. A schedule produced by 2PL is conflict equivalent to the serial schedule that orders transactions by their lock points. If lock conversion is allowed, upgrading S to X is permitted only in the growing phase, and downgrading X to S only in the shrinking phase.

Protocol

Rule beyond basic 2PL

Gives

Basic 2PL

Growing then shrinking

Conflict serializability

Conservative (static) 2PL

Acquire every lock the transaction needs before its first operation

Conflict serializability and freedom from deadlock; needs the read and write sets in advance; not necessarily cascadeless

Strict 2PL

Hold all X locks until commit or abort

Conflict serializability and strict (hence cascadeless and recoverable) schedules

Rigorous 2PL

Hold all locks (S and X) until commit or abort

Conflict serializability, strict schedules, and serial order equal to commit order

What 2PL does not guarantee: freedom from deadlock (two transactions can each hold a lock the other needs; this holds for basic, strict and rigorous 2PL alike), and, for basic 2PL, neither recoverability nor freedom from cascading aborts. Every schedule allowed by 2PL is conflict serializable, but some conflict serializable schedules cannot be produced by 2PL.

Deadlock detection: build a wait-for graph with an edge Ti to Tj when Ti waits for a lock held by Tj. A cycle means deadlock; abort a victim to break it.

Deadlock prevention with timestamps (smaller timestamp means older). Ti requests an item locked by Tj in a conflicting mode:

Scheme

If Ti is older than Tj

If Ti is younger than Tj

Wait-die (non-preemptive)

Ti waits

Ti dies (aborts, restarts later with the same timestamp)

Wound-wait (preemptive)

Ti wounds Tj (Tj aborts and restarts with its original timestamp; Ti gets the lock)

Ti waits

EXAM TIP

Neither scheme can form a wait cycle: in wait-die only an older transaction waits for a younger one, and in wound-wait only a younger waits for an older. A restarted transaction keeps its original timestamp, so it eventually becomes the oldest and is not starved.

Multiple-granularity locking: items form a tree (database, file, page, record). Intention locks IS, IX and SIX are placed on ancestors before S or X is placed on a descendant, so that a lock on a coarse node can be checked quickly against locks lower down. To lock a node in S or IS, the transaction must hold its parent in IS or IX. To lock a node in X, IX or SIX, it must hold the parent in IX or SIX. Locks are taken from the root downward and released from the leaf upward.

Held (row) / Requested (column)

IS

IX

S

SIX

X

IS

Yes

Yes

Yes

Yes

No

IX

Yes

Yes

No

No

No

S

Yes

No

Yes

No

No

SIX

Yes

No

No

No

No

X

No

No

No

No

No

Timestamp ordering and validation

Each transaction T gets a timestamp when it starts. Each item Q keeps , the largest timestamp of any transaction that read it, and , the largest timestamp of any transaction that wrote it. Every schedule the protocol allows is conflict serializable, equivalent to the serial schedule in timestamp order. No transaction ever waits, so there is no deadlock, but a transaction that keeps being restarted can starve.

Basic timestamp-ordering rules

  1. T issues read(Q): if , a younger transaction already wrote Q, so T is aborted and restarted with a new timestamp. Otherwise execute the read and set to .

  2. T issues write(Q): if , a younger transaction already read Q, so T is aborted and restarted with a new timestamp.

  3. T issues write(Q): if , the write is late; in basic timestamp ordering T is aborted and restarted with a new timestamp.

  4. Otherwise execute the write and set to .

Thomas's write rule changes only the third case: if , the write is ignored (it would be overwritten anyway) and T continues. Every schedule it allows is view serializable, and it admits some schedules that are view serializable but not conflict serializable.

EXAM TIP

Basic timestamp ordering can produce schedules that are not recoverable or that cause cascading aborts, unless writes are held back until commit. 2PL and timestamp ordering are incomparable: each allows some schedules the other rejects.

Validation-based (optimistic) protocol: each transaction runs in three phases. In the read phase it executes and writes only to local copies. In the validation phase it is checked against transactions that validated before it. In the write phase, if it passed validation, its local copies are written to the database. The equivalent serial order is the order of validation. Transactions never wait, so there is no deadlock, and a transaction that fails validation is rolled back.

Anomalies and SQL isolation levels

Anomalies of concurrent execution

  1. Lost update: two transactions read the same item and both write it; one write overwrites the other, as if it never happened.

  2. Dirty read: a transaction reads a value written by another transaction that has not committed (and may abort).

  3. Non-repeatable read: a transaction reads an item twice and gets different values, because another transaction updated it and committed in between.

  4. Phantom: a transaction runs the same query twice and sees new rows, because another transaction inserted (or deleted) rows matching the condition and committed in between. Locking only existing items does not prevent this.

Isolation level (SQL standard)

Dirty read

Non-repeatable read

Phantom

READ UNCOMMITTED

Possible

Possible

Possible

READ COMMITTED

Not possible

Possible

Possible

REPEATABLE READ

Not possible

Not possible

Possible

SERIALIZABLE

Not possible

Not possible

Not possible

Log-based recovery

The log records, in order, <Ti start>, <Ti, X, old, new> for each update, and <Ti commit> or <Ti abort>. Write-ahead logging (WAL): the log record of an update must reach stable storage before the changed data page does. All of a transaction's log records, including its commit record, must be on stable storage before the commit is complete.

Modification scheme

When data on disk changes

Recovery needs

Deferred modification

Only after the transaction commits

Redo only (log needs only new values)

Immediate modification

Possibly before the transaction commits

Undo and redo (log needs old and new values)

Operation

Effect

Applied to (immediate modification)

Undo

Restore the old value, scanning the log backward

Transactions with no commit record at the crash

Redo

Reapply the new value, scanning the log forward

Transactions with a commit record at the crash

Undo and redo are idempotent: applying either one more than once gives the same result as applying it once. A checkpoint record <checkpoint L> lists the transactions active at that moment, after the log and all modified pages have been forced to disk, so redo need not look at the log before it. Convention for this page: immediate modification, strict schedules (so no transaction overwrote an uncommitted write), and a log with no abort records. A transaction that committed before the checkpoint is ignored; one that committed after the checkpoint (even if it started before) is redone; one with no commit record at the crash is undone. How abort records are treated varies by scheme; follow the question's statement when they appear.

Recovery procedure after a crash

  1. Find the last checkpoint and its list L of active transactions.

  2. Build the redo-list: transactions that have a commit record after the checkpoint.

  3. Build the undo-list: transactions in L or started after the checkpoint that have no commit record.

  4. Redo forward from the checkpoint, reapplying each update of a redo-list transaction.

  5. Undo backward from the end of the log, writing the old value for each update of an undo-list transaction. Keep going until the start record of every undo-list transaction has been found, even if it lies before the checkpoint.

  6. Under strict schedules the order of the redo and undo passes does not change the result.

EXAM TIP

Do not redo a transaction that committed before the last checkpoint, and do not undo a transaction that has a commit record, whatever its position relative to the checkpoint.

PREVIOUS-YEAR QUESTIONS

9 questions from the CS papers

Try each question first, then open the answer. We placed each question under a topic ourselves; the exam paper does not label topics.

See these papers in full: GATE CSE 2026 Set 2 · GATE CSE 2025 Set 1 · GATE CSE 2025 Set 2 · GATE CSE 2024 Set 1 · GATE CSE 2024 Set 2 · GATE CSE 2022 · GATE CSE 2020

GATE 2026 CS2 Q.20

GATE 2026 · CS2Q.20 · 1 mark · MCQ

Consider concurrent execution of two transactions and in a DBMS, both of which access a data object . For these two transactions to not conflict on , which one of the following statements must be true?

  1. (A)

    Both and only read

  2. (B)

    reads and writes

  3. (C)

    writes and reads

  4. (D)

    Both and write

Answer and solution
See the question in the paper
GATE 2026 CS2 Q.20: answer and solution

GATE 2025 CS1 Q.15

GATE 2025 · CS1Q.15 · 1 mark · MCQ

A schedule of three database transactions , , and is shown. and denote read and write of data item by transaction , . The transaction aborts at the end. Which other transaction(s) will be required to be rolled back?

  1. (A)

    Only

  2. (B)

    Only

  3. (C)

    Both and

  4. (D)

    Neither nor

Answer and solution
See the question in the paper
GATE 2025 CS1 Q.15: answer and solution

GATE 2025 CS2 Q.27

GATE 2025 · CS2Q.27 · 1 mark · MSQ

An audit of a banking transactions system has found that on an earlier occasion, two joint holders of account attempted simultaneous transfers of Rs. 10000 each from account to account . Both transactions read the same value, Rs. 11000, as the initial balance in and were allowed to go through. was credited Rs. 10000 twice. was debited only once and ended up with a balance of Rs. 1000.

Which of the following properties is/are certain to have been violated by the system?

  1. (A)

    Atomicity

  2. (B)

    Consistency

  3. (C)

    Isolation

  4. (D)

    Durability

Answer and solution
See the question in the paper
GATE 2025 CS2 Q.27: answer and solution

GATE 2025 CS2 Q.53

GATE 2025 · CS2Q.53 · 2 marks · MSQ

Consider the database transactions T1 and T2, and data items X and Y. Which of the schedule(s) is/are conflict serializable?

Transaction T1: R1(X), W1(Y), R1(X), W1(X), COMMIT(T1)
Transaction T2: W2(X), W2(Y), COMMIT(T2)

GATE 2025 CS2 question 53: Two boxes listing the transactions.Tap to open full size
Figure from the GATE 2025 CS2 paper. It is part of the question.
Figure description

Two boxes listing the transactions. Box 'Transaction T1' lists in order: R1(X), W1(Y), R1(X), W1(X), COMMIT(T1). Box 'Transaction T2' lists in order: W2(X), W2(Y), COMMIT(T2).

  1. (A)

    R1(X), W2(X), W1(Y), W2(Y), R1(X), W1(X), COMMIT(T2), COMMIT(T1)

  2. (B)

    W2(X), R1(X), W2(Y), W1(Y), R1(X), COMMIT(T2), W1(X), COMMIT(T1)

  3. (C)

    R1(X), W1(Y), W2(X), W2(Y), R1(X), W1(X), COMMIT(T1), COMMIT(T2)

  4. (D)

    W2(X), R1(X), W1(Y), W2(Y), R1(X), COMMIT(T2), W1(X), COMMIT(T1)

Answer and solution
GATE 2025 CS2 Q.53: answer and solution

GATE 2024 CS1 Q.46

GATE 2024 · CS1Q.46 · 2 marks · MSQ

Consider the following read-write schedule over three transactions , , and , where the subscripts in the schedule indicate transaction IDs:

Which of the following transaction schedules is/are conflict equivalent to ?

  1. (A)

  2. (B)

  3. (C)

  4. (D)

Answer and solution
See the question in the paper
GATE 2024 CS1 Q.46: answer and solution

GATE 2024 CS2 Q.27

GATE 2024 · CS2Q.27 · 1 mark · MSQ

Which of the following statements about the Two Phase Locking (2PL) protocol is/are TRUE?

  1. (A)

    2PL permits only serializable schedules

  2. (B)

    With 2PL, a transaction always locks the data item being read or written just before every operation and always releases the lock just after the operation

  3. (C)

    With 2PL, once a lock is released on any data item inside a transaction, no more locks on any data item can be obtained inside that transaction

  4. (D)

    A deadlock is possible with 2PL

Answer and solution
See the question in the paper
GATE 2024 CS2 Q.27: answer and solution

GATE 2022 CS Q.39

GATE 2022 · CSQ.39 · 2 marks · MCQ

Let and denote read and write operations on a data element by a transaction , respectively. Consider the schedule with four transactions.

Which one of the following serial schedules is conflict equivalent to ?

  1. (A)

  2. (B)

  3. (C)

  4. (D)

Answer and solution
See the question in the paper
GATE 2022 CS Q.39: answer and solution

GATE 2020 CS Q.37

GATE 2020 · CSQ.37 · 2 marks · MCQ

Consider a schedule of transactions and (columns are time slots, left to right):

Here, stands for "Read(X)" and stands for "Write(X)". Which one of the following schedules is conflict equivalent to the above schedule?

GATE 2020 CS question 37: The given schedule has two rows, T1 and T2, with time running left to right.Tap to open full size
Figure from the GATE 2020 CS paper. It is part of the question.
Figure description

The given schedule has two rows, T1 and T2, with time running left to right. T1: RA, then RC, then WD, then WB, then Commit. T2: RB, WB, RD, WC, then Commit at the far right. Interleaved order: RA(T1), RB(T2), WB(T2), RC(T1), RD(T2), WD(T1), WC(T2), WB(T1), Commit(T1), Commit(T2). Each option is a similar two-row table of slots.

  1. (A)

    Figure — T2 runs RB, WB, RD first (T1 empty). Then T1 runs RA, RC, WD, WB while T2 is idle. Then T2 runs WC, then T1 Commit, then T2 Commit.

  2. (B)

    Figure — T1 runs RA, RC, WD, WB first (T2 idle). Then T2 runs RB, WB, RD, WC. Then T1 Commit, then T2 Commit.

  3. (C)

    Figure — T1 runs RA, RC, WD, then T2 runs RB, WB, RD, then T1 runs WB, then T2 runs WC, then T1 Commit, then T2 Commit.

  4. (D)

    Figure — T2 runs RB, WB, RD, WC first (T1 idle). Then T1 runs RA, RC, WD, WB, Commit, then T2 Commit.

Answer and solution
GATE 2020 CS Q.37: answer and solution

PRACTICE

6 questions to test yourself

PRACTICE 12 marks · NAT

The precedence graph of a schedule over T1, T2, T3, T4 has exactly the edges T1 to T2, T1 to T3 and T3 to T4. How many conflict-equivalent serial schedules does the schedule have?

Answer and solution

Answer:

  1. T1 has no incoming edge, and every other transaction is reachable from it (T4 through T3), so T1 must come first.

  2. The rest are T2, T3 and T4, with the single constraint that T3 comes before T4: 3!/2 = 3 orders.

  3. Orders: T1 T2 T3 T4, T1 T3 T2 T4, T1 T3 T4 T2, which is 3.

PRACTICE 21 mark · MCQ

Under the wait-die scheme, transaction T9 (timestamp 9) requests a lock on an item currently locked by T5 (timestamp 5) in a conflicting mode. What happens?

  1. (A)

    T9 waits

  2. (B)

    T5 is aborted

  3. (C)

    T9 is aborted and restarted with its original timestamp

  4. (D)

    Both wait, causing a deadlock

Answer and solution

Answer: (C)

  1. T9 is younger than T5 since 9 > 5.

  2. In wait-die, a younger requester dies.

  3. It restarts with the same timestamp 9.

PRACTICE 32 marks · NAT

A system uses immediate database modification, strict schedules and this page's checkpoint convention: a transaction that committed before the last checkpoint is ignored, one that committed after it is redone, and one with no commit record is undone. Its log, in order (update records omitted): <T1 start>, <T1 commit>, <T2 start>, <T3 start>, <checkpoint {T2, T3}>, <T2 commit>, <T4 start>, <T3 commit>, <T5 start>, <T4 commit>, then a crash. How many transactions are on the redo-list plus the undo-list?

Answer and solution

Answer:

  1. T1 committed before the checkpoint: ignored.

  2. T2, T3 and T4 have commit records after the checkpoint: redo-list, which is 3.

  3. T5 started after the checkpoint and has no commit record: undo-list, which is 1.

  4. Total 3 + 1 = 4.

PRACTICE 41 mark · MCQ

Consider the schedule S (read left to right): r1(X), r2(X), w1(X), w2(X), c1, c2. Which statement is correct?

  1. (A)

    S is conflict equivalent to the serial schedule T1 then T2

  2. (B)

    S is conflict equivalent to the serial schedule T2 then T1

  3. (C)

    S is not conflict serializable

  4. (D)

    S is conflict equivalent to both serial schedules

Answer and solution

Answer: (C)

  1. r1(X) comes before w2(X): edge T1 to T2. w1(X) before w2(X) also gives T1 to T2.

  2. r2(X) comes before w1(X): edge T2 to T1.

  3. The graph has a cycle, so S is not conflict serializable.

PRACTICE 52 marks · MSQ

Consider the schedule S: w1(A), r2(A), c1, w2(A), c2. Which of the following are true?

  1. (A)

    S is recoverable

  2. (B)

    S is cascadeless

  3. (C)

    S is strict

  4. (D)

    S is conflict serializable

Answer and solution

Answer: (A), (D)

  1. T2 reads A from T1 and c1 comes before c2, so S is recoverable.

  2. r2(A) happens before c1 although T1 wrote A, so S is not cascadeless and therefore not strict.

  3. Conflicts: w1(A) before r2(A) and w1(A) before w2(A), both T1 to T2; no cycle, so S is conflict serializable.

PRACTICE 61 mark · MCQ

TS(T1) = 10 and TS(T2) = 20. Item Q starts with R-TS(Q) = W-TS(Q) = 0. The operations arrive in the order r1(Q), w2(Q), w1(Q). Which statement is correct about w1(Q)?

  1. (A)

    Under both basic timestamp ordering and Thomas's write rule, T1 is aborted

  2. (B)

    Under basic timestamp ordering T1 is aborted; under Thomas's write rule the write is ignored and T1 continues

  3. (C)

    Under both, the write is executed

  4. (D)

    Under basic timestamp ordering, T2 is aborted

Answer and solution

Answer: (B)

  1. r1(Q): 10 is not less than W-TS(Q) = 0, so the read runs; R-TS(Q) = 10.

  2. w2(Q): 20 is not less than R-TS(Q) = 10 or W-TS(Q) = 0, so the write runs; W-TS(Q) = 20.

  3. w1(Q): 10 is not less than R-TS(Q) = 10, but 10 < W-TS(Q) = 20, so the write is late.

  4. Basic timestamp ordering aborts T1. Under Thomas's write rule, R-TS(Q) = 10 ≤ 10 < 20, so the write is ignored and T1 continues.

OFFICIAL GATE 2027 SYLLABUS WORDING

Copied from the GATE 2027 syllabus; see all 2027 syllabi.

GATE CS

Transactions and concurrency control