Question
Consider a schedule of transactions and given below.
Here, stands for "Read(X)" and stands for "Write(X)". Which one of the following schedules is conflict equivalent to the above schedule?
Official answer and solution
- Official answer
- A
- From
- Official GATE 2020 answer key
Solution
List all conflicting pairs of operations in the given schedule and match their order with the options.
Two operations in a schedule are in conflict if they belong to different transactions, access the same data item, and at least one is a write.
In the given schedule:
- Data item B: performs then . Later, performs . Conflicting pairs: and (order: ).
- Data item D: performs . Later, performs . Conflicting pair: (order: ).
- Data item C: performs . Later, performs . Conflicting pair: (order: ).
Examine Option A:
- executes before executes . Thus, , , and are all preserved in the direction .
- executes before executes . Thus, is preserved in the direction .
- Since every conflicting pair is executed in the exact same relative order, Option A is conflict equivalent to the given schedule.
A
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2020 Computer Science and Information Technology (CS)
- Question
- 47 of 65, printed as CS Q.37
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.