What is conflict schedule? Explain with example.

This answer is restricted. Please login to view the answer of this question.

Login Now

Conflict serializability orders any conflicting operations in the same way as some serial execution. A pair of operations is said to conflict if they operate on the same data item and one of them is a write operation.

That means

  • Readi(x) readj(x) – non conflict   read-read operation
  • Readi(x) writej(x) – conflict         read-write operation.
  • Writei(x) readj(x) – conflic      t write-read operation.
  • Writei(x) writej(x) – conflict      write-write operation.

Where I and j denote two different transactions Ti and Tj.

Example

Let’s see an example based on the following schedule.

Transaction 1 Transaction 2
R1(A) W2(B)
W1(A)
R2(A)
R1(B) W2(A)

In the above schedule, we can notice that:

  • W1(A) and R2(A) are part of different transactions.
  • Both apply to the same data item, i.e., A.
  • W1(A) is a write operation.

W1(A) and R2(A) are conflicting operations as they satisfy all the above conditions.

Similarly, W1(A) and W2(A) are conflicting operations as they are part of different transactions working on the same data item, and one of them is the write operation.

W1(A) and W2(B) are non-conflicting operations as they work on different data items and thus do not satisfy all the given conditions.

R1(A) and R2(A) are non-conflicting operations as none of them is a write operation and thus does not satisfy the third condition.

W1(A) and R1(A) are non-conflicting as they belong to the same transactions and thus do not satisfy the first condition.

If you found any type of error on the answer then please mention on the comment or report an answer or submit your new answer.
Leave your Answer:

Click here to submit your answer.

Discussion
0 Comments
  Loading . . .