StreakPeaked· Practice

ExamsGATETechnical

Consider the following four schedules due to three transactions (indicated by the subscript) using read and write on a data item x, denoted by r(x) and w(x) respectively. Which one of them is conflict serializable?

  1. r1(x); r2(x); w1(x); r3(x); w2(x)
  2. r2(x); r1(x); w2(x); r3(x); w1(x)
  3. r3(x); r2(x); r1(x); w2(x); w1(x)
  4. r2(x); w2(x); r3(x); r1(x); w1(x)

Correct answer: r2(x); w2(x); r3(x); r1(x); w1(x)

Solution

The correct option is conflict serializable because it can be transformed into a serial schedule without violating the order of conflicting operations. In this case, the writes and reads are arranged such that the dependencies between transactions do not create cycles, allowing for a consistent execution order.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →