DBMS Notes

Conflicts In Timestamp Protocol

Sometimes there may be Read-Write conflicts in timestamp ordering protocol. Let explain, Suppose T1 is older and T2 is younger transaction.

Case 01:

  • If older transaction (T1) wants to perform read or write operation before the read or write operation of older transaction (T2) on same data. Then there will be the no conflicts.

Diagram as given below.

Note: Although Read-write, Write-Write and Write- read are conflicts but never problematic in timestamp because older transaction has higher priority and always execute first than younger.

Case 02:

  • If younger transaction (T2) wants to perform read or write operation before the read or write operation of T1 on same data. Then there will be the following conflicts
    • Read-write conflicts
    • Write-Write conflicts
    • Write- read conflicts.

Let explain all above conflicts one by one

I. Read-Write Conflict: Dirty Read Problem

Suppose younger-T2 read the value of “A” first and older-T1 abort or fail in later on. Then it is dirty read problem.

II. Write-Read Conflict: Kind of dirty read Problem

When the younger-T2 Write the value of data “A” first, and older-T1 read the the same data and committed. But in later on the younger-T2 abort or fail. Then it is also a kind of dirty read problem.

III. Write-Write Conflict: Update Lost Problem

When the younger-T2 Write the value of data “A” first, and older-T1 write the the same data and committed. But in later on the younger-T2 abort or fail. Then it cause lost update problem.

Conclusion: if younger transaction reads or write the data (i.e. “A”) first and older transaction wants to write or read operation on same data in later on then there must be a conflict. But keep in mind Read-read conflict does not exist in any case.

Help Other’s By Sharing…

Contact Us

Burewala, Vehari, Punjab, Pakistan

cstaleem1@gmail.com

Website: CStaleem.com

Pin It on Pinterest