Question:medium

Let $R(z)$ and $W(z)$ denote read and write operations on a data element $z$ by a transaction $T_i$, respectively. Consider the schedule $S$ with four transactions.
\[ S: R_1(x) R_2(x) R_3(y) W_1(y) W_2(x) W_3(y) R_4(y) \] Which one of the following serial schedules is conflict equivalent to $S$?

Show Hint

A conflict-equivalent schedule maintains the same order of dependent operations, ensuring the same execution semantics.
Updated On: Jan 30, 2026
  • $T_1 \rightarrow T_3 \rightarrow T_4 \rightarrow T_2$
  • $T_1 \rightarrow T_4 \rightarrow T_3 \rightarrow T_2$
  • $T_4 \rightarrow T_1 \rightarrow T_3 \rightarrow T_2$
  • $T_3 \rightarrow T_1 \rightarrow T_4 \rightarrow T_2$
Show Solution

The Correct Option is A

Solution and Explanation

To determine a conflict-equivalent (conflict-serializable) schedule, we identify all conflicting operation pairs (operations on the same data item where at least one is a write) and derive the corresponding precedence graph.

Step 1: Identify conflicting operations
- Operations on different data items do not conflict.
- Read–read operations on the same data item do not conflict.
- Read–write or write–write operations on the same data item do conflict.

From the given schedule: - \( R_3(y) \) precedes \( W_1(y) \), so there is a dependency \( T_3 \rightarrow T_1 \).
- \( W_1(y) \) precedes \( W_3(y) \), giving a dependency \( T_1 \rightarrow T_3 \).
- Operations involving \( x \) introduce an ordering constraint that places \( T_1 \) before \( T_2 \).
- The operation \( R_4(y) \) occurs after all writes on \( y \), so \( T_4 \) must appear after \( T_1 \) and \( T_3 \).

Step 2: Construct a serial order
Taking all dependencies into account, a serial schedule that preserves the relative order of all conflicting operations is: \[ T_1 \rightarrow T_3 \rightarrow T_4 \rightarrow T_2 \] This order satisfies all precedence constraints and produces the same effect as the given schedule.

Final Answer:
(A)
Was this answer helpful?
0