Timestamp ordering questions look verbal, but most are bookkeeping problems. The decisive work is to update read_TS(X) and write_TS(X) in operation order, while keeping timestamp ordering separate from the wait-die and wound-wait deadlock-prevention schemes.
Once the table is visible, the wording becomes far less intimidating.
Choose an option before reading each explanation, because every explanation assumes you have already committed to a letter. Where a question turns on bookkeeping, the trace under it carries read_TS(X) and write_TS(X) operation by operation, so you can check your own table against it rather than only the final answer. For the topics that sit either side of concurrency control, start from CS Fundamentals.
Timestamp ordering rules to write before solving
Let TS(Ti) be transaction Ti's timestamp.
Operation | Reject or ignore condition | Action when allowed |
|---|---|---|
| Abort if | Read, then set |
| Abort if | Write, then set |
| Abort if | Otherwise write and update |
Calibrate the table with TS(T1)=5, TS(T2)=10, TS(T3)=15, and both timestamps of X initially 0. W2(X) succeeds, so write_TS(X)=10. Next, R1(X) fails because 5 < 10, and T1 rolls back. Then W3(X) succeeds because 15 is below neither item timestamp, so write_TS(X)=15.
For W2(X); W1(X) with no intervening read, basic ordering aborts T1 because 5 < write_TS(X)=10. Thomas' rule ignores W1(X) as obsolete. Also remember: wait-die lets an older requester wait and aborts a younger requester. Wound-wait lets an older requester abort a younger holder, while a younger requester waits.
On every write, test read_TS strictly before write_TS in that order, and update item timestamps only after accepting the operation.
Timestamp ordering MCQs 1-3: protocol recognition and guarantees
Question 1
Which concurrency control protocol uses timestamp ordering?
A. Two-phase locking
B. Timestamp-based protocol
C. Validation-based protocol
D. Snapshot isolation
Answer: B. Timestamp-based protocol.
Timestamp-based protocols order transactions. Others use locks, validation, or snapshots.
Question 2
Which of the following concurrency control protocol ensures both conflict serializability and free from deadlock?
A. Time stamp ordering
B. 2 Phase locking
C. Both (a) and (b)
D. None of the above
Answer: A. Time stamp ordering.
Timestamp ordering rolls back violations and forms no circular lock waits. Basic 2PL can deadlock.
Question 3
Which concurrency control protocol prevents deadlock and ensures serializability?
A. 2PL
B. Optimistic locking protocol
C. Timestamp ordering protocol
D. Strict 2PL
E. Shared locking protocol
Answer: C. Timestamp ordering protocol.
Timestamp order controls conflicts; violations roll back, giving serializability without deadlock.
Timestamp ordering MCQs 4-6: 2PL comparison, variants and wait-die
Question 4
Which of the following concurrency control protocols ensure(s) both conflict serializability and freedom from deadlock?
Statements:
I. 2-phase locking (2PL)
II. Timestamp ordering
A. I only
B. II only
C. Both I and II
D. Neither I nor II
Answer: B. II only.
2PL permits deadlock. Timestamp ordering rejects out-of-order operations, so only Statement II has both properties.
Question 5
Which of the following is NOT a variant of time stamp-based method of concurrency control in database management system?
A. Total time stamp ordering
B. Partial time stamp ordering
C. Multi version time stamp ordering
D. Multilevel time stamp ordering
Answer: D. Multilevel time stamp ordering.
Timestamps impose a total order on transactions, and partial and multiversion timestamp ordering are both named schemes built on that order. Multilevel belongs to locking granularity, not to the timestamp family, so option D is the invented one.
Question 6
When transaction Ti requests a data item currently held by Tj, Ti is allowed to wait only if it has a timestamp smaller than that of Tj (that is Ti is order than Tj). Otherwise, Ti is rolled back (dies). This is
A. Wait and die
B. Wait and Wound
C. Wound and Wait
D. none of the above
Answer: A. Wait and die.
The stem's “order” means older. Wait-die lets an older requester wait; a younger one dies.
Timestamp ordering MCQs 7-9: wait-die order and a basic timestamp trace
Question 7
Consider the following statements based on the wait_die scheme for deadlock prevention:
S1: Older transaction may wait for younger one to release data item (older means smaller timestamp).
S2: Older transaction may force rollback of younger transaction may wait for older ones.
Identify which of the above statement(s) is/are correct?
A. Only S1 true
B. Only S2 true
C. Both S1 and S2 are true
D. Both S1 and S2 are false
Answer: A. Only S1 true.
S1 is exactly wait-die: the requester with the smaller timestamp is the older one, and it is allowed to wait. S2 reaches for the wound-wait rule instead, where an older transaction forces a younger holder to roll back, so it is not a wait-die property. Only S1 holds.
Question 8
Let us say transaction T1 has timestamp 5, transaction T2 has timestamp 10, and transaction T3 has timestamp 15. All transactions follow Wait-die deadlock prevention strategy. T1 and T3 need a data item which is held by T2. In what order do the transactions get executed?
A. T1-T2-T3
B. T2-T3-T1
C. T2-T1-T3
D. T3-T2-T1
Answer: C. T2-T1-T3.
Older T1 waits for T2. Younger T3 dies and restarts. Thus T2 finishes first, T1 follows, and T3 completes last: T2-T1-T3.
Question 9
Let us assume that transaction T1 has arrived before transaction T2. Consider the schedule:
S = r1(A); r2(B); w2(A); w1(B)Which of the following is true?
A. Allowed under basic timestamp protocol.
B. Not allowed under basic timestamp protocols because T1 is rolled back
C. Not allowed under basic timestamp protocols because T2 is rolled back
D. None of these
Answer: B. Not allowed under basic timestamp protocols because T1 is rolled back.
Use TS(T1)=1, TS(T2)=2, with item timestamps initially 0. Then r1(A) sets read_TS(A)=1, and r2(B) sets read_TS(B)=2. The allowed w2(A) sets write_TS(A)=2. At w1(B), 1 < read_TS(B)=2, so T1 rolls back on the first write test.
Timestamp ordering MCQs 10-12: versions, Thomas' rule and wound-wait
Question 10
Which of the following timestamp ordering protocols allow(s) the following schedule?
T: W₁(A); W₃(A); R₂(A); W₄(A);
Timestamps: T₁: 5, T₂: 10, T₃: 15, T₄: 20
A. Thomas' Write Rule
B. Multiversion Timestamp Protocol
C. Basic Timestamp
D. All of these
Answer: B. Multiversion Timestamp Protocol.
W₁(A) creates version 5; W₃(A) creates version 15. Basic ordering rejects R₂(A) because 10 < write_TS(A)=15; Thomas changes stale writes, not reads. Multiversion ordering reads version 5, the newest not exceeding 10. W₄(A) creates version 20. Only B allows the schedule.
Question 11
Consider the following schedule for transaction T1, T2 and T3.
S: r1(x), r2(y), r3(y), w1(x), w3(x), r2(z), w1(x)Also assume that the time-stamp for the three transactions T1, T2 and T3 is 30, 10, and 20 respectively.
Which of the following statement is true with respect to above schedule?
A. The schedule is allowed under the basic time-stamp but not the Thomas write-stamp protocol
B. The schedule is not allowed under any of the basic time-stamp protocol as well as Thomas write.
C. The schedule is allowed under both basic time-stamp protocols as well as Thomas write.
D. The schedule is allowed under Thomas write time-stamp protocol but not basic time stamp protocol
Answer: B. The schedule is not allowed under any of the basic time-stamp protocol as well as Thomas write.
After r1(x), read_TS(x)=30; w1(x) sets write_TS(x)=30. At w3(x), 20 < read_TS(x)=30, so both protocols roll back T3. Thomas ignores writes obsolete by write_TS, not writes older than a completed read.
Question 12
In a database system, unique timestamps are assigned to each transaction using Lamport's logical clock. Let TS(T1) and TS(T2) be the timestamps of transactions T1 and T2 respectively. Besides, T1 holds a lock on the resource R, and T2 has requested a conflicting lock on the same resource R. The following algorithm is used to prevent deadlocks in the database system assuming that a killed transaction is restarted with the same timestamp.
if TS(T2) < TS(T1) then
T1 is killed
else T2 waits.Assume any transaction that is not killed terminates eventually. Which of the following is TRUE about the database system that uses the above algorithm to prevent deadlocks?
A. The database system is both deadlock-free and starvation-free.
B. The database system is deadlock-free, but not starvation-free.
C. The database system is starvation-free, but not deadlock-free.
D. The database system is neither deadlock-free nor starvation-free.
Answer: A. The database system is both deadlock-free and starvation-free.
This is wound-wait. Wait edges run only from younger requesters to older holders, so no cycle forms. A killed transaction keeps its timestamp and priority. With the stated termination assumption, it eventually proceeds, so starvation is excluded.
Traps exposed by these 12 timestamp questions
Trap or distinction | Questions that expose it |
|---|---|
Timestamp ordering versus locking | Q1-Q4 |
Recognised timestamp variants | Q5 |
Wait-die versus wound-wait | Q6-Q8 and Q12 |
Test | Q9 and Q11 |
Thomas ignores only an obsolete write | Q10 and Q11 |
Multiversion reads the newest eligible older version | Q10 |
Write every transaction timestamp, initialise item timestamps to 0 unless told otherwise, and move left to right. Update only after acceptance, mark the first violation, then compare the rule that differs.
Work through the Timestamp Ordering Protocols module for the lesson sequence behind these rules. Use DBMS Transaction MCQs for transaction practice and DBMS MCQs for full-subject practice.
Timestamp ordering protocols: the next practice step
Redo Q8, Q9, Q10, Q11, and Q12 without looking at the explanations. Together they test wait-die order, the basic timestamp table, multiversion reads, Thomas' limitation, and wound-wait guarantees. For a sequenced GATE DBMS route, continue with GATE Guidance by Sanchit Sir. For a broader semester-oriented CS route, use ZERO TO HERO.
Write every intermediate timestamp on paper instead of holding the schedule in memory during each timed retest.
The short version: basic timestamp ordering aborts out-of-order reads and writes. Thomas' rule changes only the obsolete-write case. Multiversion ordering can serve an older eligible version instead of rejecting a stale read.




