Consider the following read-write schedule over three transactions , and , where the subscripts in the schedule indicate transaction IDs:
Which of the following transaction schedules is/are conflict equivalent to ?
View worked solution
Answer: B;C;D
To find which serial schedules are conflict equivalent to , we construct the precedence graph (conflict graph) by identifying conflicting operations between different transactions.
Two operations conflict if they belong to different transactions, access the same data item, and at least one of them is a write operation:
- On : Only accesses (). Thus, there are no conflicts involving between different transactions.
- On : Only accesses (). Thus, there are no conflicts involving between different transactions.
- On : Both and access . The conflicting operations are:
- and
- and
Since has no conflicting operations with any other transaction, there are no precedence edges involving . The only dependency in the precedence graph is:
Any conflict-equivalent serial schedule must preserve this dependency, meaning must execute before . The position of can be anywhere. This gives the following valid serial schedules:
- (Option B)
- (Option C)
- (Option D)
Free practice · Your answers on this page are not saved.
