Time Stamping Protocols:
The timestamp protocols ensures that each transaction in the system has in advance a timestamp that has been associated with each transaction that is being helpful to the transaction to be executed in the system that time only.
It is most helpful in the case when large number of concurrent processes are running in the system simultaneously. So, it assign a unique timestamp to each transaction in the system with the help of ts counter.
ts counter is a counter that is used for time-stamping protocols. It increment its value by 1 when each commit operation has been occur in the system. If a transaction Ti has been assigned timestamp TS[Ti], and a new transaction enters in the system, then it must hold a condition that TS[Ti]<TS[Ti]
Thomas Write Rule:
It is the modified version of timestamp ordering protocol. Suppose that transaction Ti issues write(Q):
- If TS[Ti] < R-TS(Q), then the value of Q that Ti is producing was previously needed and it has been assumed that the value would never be produced.Hence the system rejects the write operation and rolls Ti back.
- If TS[Ti]<W-TS(Q), then Ti is attempting to write an absolute value of Q .hence this write operation can be ignored.
- Otherwise, the system executes the write operation and sets w-TS(Q) to TS(Ti).
Difference between Timestamp Protocol and Thomas write rule is:
The only difference between both of these lie between in the second rule that in timestamp ordering protocol, if Ti issues write (Q) and TS[Ti] < W-ts(Q), ti is rolled back. However, in Thomas writes rule if TS(Ti) =R timestamp(Q), the write operation can be ignored.
GeeksforGeeks has prepared a complete interview preparation course with premium videos, theory, practice problems, TA support and many more features. Please refer Placement 100 for details
- Thomas Write Rule in DBMS
- Difference between Stop and Wait protocol and Sliding Window protocol
- Introduction to TimeStamp and Deadlock Prevention Schemes in DBMS
- Difference between Serial Line Internet Protocol (SLIP) and Point-to-Point Protocol (PPP)
- Validation Based Protocol in DBMS
- Graph Based Concurrency Control Protocol in DBMS
- Lock Based Concurrency Control Protocol in DBMS
- Difference between File Transfer Protocol (FTP) and Secure File Transfer Protocol (SFTP)
- Difference between Stateless and Stateful Protocol
- Difference Between Go-Back-N and Selective Repeat Protocol
- Difference between Virtual Private Network (VPN) and Multi-Protocol Label Switching (MPLS)
- Difference between 1NF and 2NF in DBMS
- Difference between 2NF and 3NF in DBMS
- Difference between DDL and DML in DBMS
- Difference between 3NF and BCNF in DBMS
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.