Each transaction in a system is assigned a unique timestamp when it is initiated. This timestamp acts as a logical clock that helps in determining the order of transaction execution. The system follows these rules:
If a transaction has a lower timestamp, it gets priority and is executed before transactions with higher timestamps. If a transaction accesses a data item that has been modified by a newer transaction, the older transaction is rolled back and restarted with a new timestamp. By following these rules, the system ensures that transactions are executed in a manner consistent with their timestamps, preserving the serializability of the schedule.