Skip to content
Official PYQ · 2019

GATE CS 2019 Q11 — Transactions and Concurrency Control

Explain with AI

Consider the following two statements about database transaction schedules:

  1. Strict two-phase locking protocol generates conflict serializable schedules that are also recoverable.
  2. Timestamp-ordering concurrency control protocol with Thomas’ Write Rule can generate view serializable schedules that are not conflict serializable

Which of the above statements is/are TRUE?

Choose one option
View worked solution

Answer: C

Let us analyze both statements individually:

Statement I: Strict 2PL generates conflict serializable and recoverable schedules

  • Conflict Serializability: Since Strict 2PL is a variant of the Two-Phase Locking (2PL) protocol, it inherits the property that any schedule generated by it is guaranteed to be conflict serializable.
  • Recoverability: In Strict 2PL, a transaction cannot release any of its exclusive (write) locks until it commits or aborts. This ensures that no other transaction can read or write any data modified by an uncommitted transaction, thereby preventing dirty reads. Consequently, the schedules generated are strict, which is a stronger subclass of recoverable schedules.

Thus, Statement I is TRUE.

Statement II: Timestamp Ordering with Thomas' Write Rule

  • The basic Timestamp Ordering (TO) protocol ensures conflict serializability. However, Thomas' Write Rule relaxes this protocol by ignoring obsolete write operations (blind writes).
  • Consider two transactions T1T_1 and T2T_2 with timestamps TS(T1)<TS(T2)TS(T_1) < TS(T_2). Suppose the schedule of operations is:
     W2(A)W_2(A) followed by W1(A)W_1(A)
  • Under basic TO, the write request W1(A)W_1(A) is rejected because TS(T1)<W-timestamp(A)TS(T_1) < W\text{-}timestamp(A) (which is TS(T2)TS(T_2)).
  • Under Thomas' Write Rule, W1(A)W_1(A) is simply ignored (skipped) because it is an obsolete write. The effective execution is equivalent to the serial schedule T1→T2T_1 \to T_2.
  • This schedule is view serializable (equivalent to the serial execution T1→T2T_1 \to T_2), but it is not conflict serializable because of the out-of-order write-write conflict (W2(A)W_2(A) occurs before W1(A)W_1(A)).

Thus, Statement II is TRUE.

Since both statements are true, the correct option is C.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Transactions and Concurrency Control questions