Consider the following four schedules due to three transactions (indicated by the subscript) using read and write on a data item x, denoted by and respectively. Which one of them is conflict serializable?
View worked solution
Answer: D
A schedule is conflict serializable if its precedence (conflict) graph is acyclic. An edge exists in the precedence graph if there are operations in and in such that:
- appears before in the schedule.
- At least one of them is a write operation ().
Let's analyze the precedence graph for each option:
- Option A:
- is followed by
- is followed by
- This creates a cycle: . Thus, it is not conflict serializable.
- Option B:
- is followed by
- is followed by
- This creates a cycle: . Thus, it is not conflict serializable.
- Option C:
- is followed by
- is followed by
- This creates a cycle: . Thus, it is not conflict serializable.
- Option D:
- is followed by
- is followed by and
- is followed by
- The resulting precedence graph has edges: , , and .
- This graph is acyclic, with the equivalent serial order being .
Therefore, only the schedule in Option D is conflict serializable.
Free practice · Your answers on this page are not saved.
