Multiversion Timestamp Ordering

Multiversion Timestamp Ordering (MVTO) is a concurrency control technique that maintains multiple versions of each data item. Each version has a unique timestamp, and transactions access the appropriate version based on their own timestamp, preventing conflicts and deadlocks.

Components

Each version Xi of a data item maintains

  • Value The data content of that version.
  • Read_TS(Xi) Largest timestamp of any transaction that successfully read Xi.
  • Write_TS(Xi) Timestamp of the transaction that created Xi.

How MVTO Works

Assign Timestamp Read/Write? Find version, update Read_TS Create version or abort Commit / Abort Read Write

Serializability Rules

Rule 1 (Read) If transaction T reads X, find version Xi where Write_TS(Xi) ≤ TS(T). Return Xi's value and update Read_TS(Xi) = max(Read_TS(Xi), TS(T)).

Rule 2 (Write) If transaction T writes X

  • If TS(T) < Read_TS(X) → abort T (a newer transaction already read it).
  • If TS(T) = Write_TS(X) → overwrite the contents.
  • If TS(T) > Write_TS(X) → create a new version.

Example

T1 (timestamp=5) and T2 (timestamp=10) operating on data item X ?

Step Operation Result
1 T1: Read(X) Reads X0, Read_TS(X0)=5
2 T1: Write(X) Creates X1, Write_TS(X1)=5
3 T2: Read(X) Reads X1, Read_TS(X1)=10
4 T2: Write(X) Creates X2, Write_TS(X2)=10
5 T1: Read(X) Reads X1 (appropriate version for TS=5)
6 T1: Write(X) Abort T1 T2 already read X1 (Read_TS=10 > TS(T1)=5)

Advantages and Disadvantages

Advantages Disadvantages
High concurrency Storage overhead (multiple versions)
No deadlocks Increased computational complexity
Data consistency guaranteed Garbage collection needed for old versions
Supports long-running transactions Cascading aborts possible

Conclusion

MVTO maintains multiple timestamped versions of data items so transactions access the version appropriate for their timestamp. This avoids unnecessary aborts and reduces contention, but requires additional storage and garbage collection for obsolete versions.

Updated on: 2026-03-14T22:10:37+05:30

3K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements