Open In App

GATE | GATE-CS-2014-(Set-2) | Question 65

Like Article
Like
Save
Share
Report

Consider the following schedule S of transactions T1, T2, T3, T4:

GATECS2014Q29


Which one of the following statements is CORRECT?

(A) S is conflict-serializable but not recoverable
(B) S is not conflict-serializable but is recoverable
(C) S is both conflict-serializable and recoverable
(D) S is neither conflict-serializable nor is it recoverable


Answer: (C)

Explanation: To check for conflict-serializable, we need to make a precedence graph, if the graph contains a cycle, then it’s not conflict serializable, else it is.

Here, for the precedence graph there will be only two directed edges, one from T2 -> T3 ( Read- Write Conflict), and another from T2 -> T1( Read- Write Conflict), hence no cycle, so the schedule is conflict serializable.

Now to check for Recoverable, we need to check for a dirty-read operation( Write by Transaction Ti, followed by Read by Transaction Tj but before Ti commits) between any pair of operations. If no dirty-read then recoverable schedule, if a dirty read is there then we need to check for commit operations.

Here no dirty read operation ( as T3 and T1 commits before T4 reads the Write(X) of T3 and T1 , and T2 commits before T4 reads the Write(Y) of T2 ). Therefore the schedule is recoverable.

Hence, Option C.


Quiz of this Question


Last Updated : 15 Oct, 2019
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads