Consider the following two statements about database transaction schedules:
- Strict two-phase locking protocol generates conflict serializable schedules that are also recoverable.
- 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?
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 and with timestamps . Suppose the schedule of operations is:
followed by - Under basic TO, the write request is rejected because (which is ).
- Under Thomas' Write Rule, is simply ignored (skipped) because it is an obsolete write. The effective execution is equivalent to the serial schedule .
- This schedule is view serializable (equivalent to the serial execution ), but it is not conflict serializable because of the out-of-order write-write conflict ( occurs before ).
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.
