GATE / CS ARCHIVE

GATE CSE 2019 / QUESTION 11

Serializability under strict 2PL and Thomas’s rule

Database Management Systems · Transactions & Concurrency Control · Full GATE CSE 2019 paper

GATE 2019, Q11 1 mark · MCQ
Report issue

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