Main difference between Timestamp protocol and Thomos write rule in DBMS

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:
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):

  1. 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.
  2. If TS[Ti]<W-TS(Q), then Ti is attempting to write an absolute value of Q .hence this write operation can be ignored.
  3. 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.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.


JAVA Developer || Competitive Programmer || Software Developer|| HackerRank 6 stars

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.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.


Article Tags :
Practice Tags :