0% completed
Timestamp-based concurrency control is a technique used in databases to ensure that transactions are executed in a serializable order based on their timestamps. Each transaction is assigned a unique timestamp when it starts, which determines its logical order. Transactions must follow this order to prevent conflicts and ensure consistency.
Transaction Timestamp (TS):
Read Timestamp (RTS) and Write Timestamp (WTS):
The flowchart illustrates the process of timestamp-based ordering:
Transaction Begins:
Validation Phase:
Execution Phase:
Conflict Resolution:
Successful Execution:
Read Operation:
Write Operation:
No Deadlocks: As no locks are used, the system avoids deadlocks entirely.
Ensures Serializability: Transactions are processed logically in the order of their timestamps, maintaining consistency.
Simple Conflict Resolution: Conflicts are easily detected and resolved by aborting the conflicting transaction.
High Rollback Rates: Transactions with outdated timestamps may frequently fail and need to restart, leading to wasted resources.
Starvation: Older transactions might repeatedly get aborted if newer transactions conflict with them.
Overhead: Maintaining timestamps and checking read/write conditions add computational overhead.
.....
.....
.....