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 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.
Attention reader! Don’t stop learning now. Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.
Learn all GATE CS concepts with Free Live Classes on our youtube channel.