0% found this document useful (0 votes)
29 views

Timestamp Ordering Protocol: Cont. Basic Timestamp (TO) Algorithm Methods To Implement The Schemes

The document discusses timestamp ordering protocol which determines the order in which transactions are executed based on timestamps. It assigns each transaction a timestamp based on either the system clock or a logical counter. The timestamp protocol maintains the last read and write timestamps for each data item. It validates read and write operations by checking if the transaction timestamp is greater than the last write or read timestamp of the data item. Transactions with lower timestamps than the last accessed timestamp of a data item will be rejected.

Uploaded by

Tech Guru
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Timestamp Ordering Protocol: Cont. Basic Timestamp (TO) Algorithm Methods To Implement The Schemes

The document discusses timestamp ordering protocol which determines the order in which transactions are executed based on timestamps. It assigns each transaction a timestamp based on either the system clock or a logical counter. The timestamp protocol maintains the last read and write timestamps for each data item. It validates read and write operations by checking if the transaction timestamp is greater than the last write or read timestamp of the data item. Transactions with lower timestamps than the last accessed timestamp of a data item will be rejected.

Uploaded by

Tech Guru
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Timestamp Ordering Protocol

 Tag
 It determines the order in which the INSTRUCTION are to be execute
 It is denoted as Ts(Ti)
 Ts stands for timestamp
 Where Ti stands for Name of the instruction
 A transaction issues a request for a timestamp is allocated for this transaction

 The timestamp ordering protocol also maintains the timestamp of last 'read' and 'write'
operation on a data.

Cont.
Basic timestamp (TO) Algorithm
Methods to implement the schemes
 System Clock
 Logical counter (It increment after a new timestamp has been assign)

T1 Ts(T1) at 6:00pm
.
.
.
.
T1 Ts(T1) at 6:o5 pm
TS(1) <Ts(2)
6:00 <6:05
Same logical counter for
C1<C2

Values
 W-timestamp(Q)
 R-timestamp(Q)
 Validations on data items
W-timestamp(Q):

for successfully any data item Q, W-timestamp(Q) denotes the largest timestamp for any
transaction that execute write(Q)

W-timestamp(Q)

for successfully any data item Q, R-timestamp(Q) denotes the largest timestamp for any transaction
that execute write(Q)

1. Check the following condition whenever a transaction Ti issues a Read (X) operation:

o If Ts(Ti) < W(Q) then the operation is rejected.


o If TS(Ti)>_ W(Q) then the operation is executed.
o Timestamps of all the data items are updated.

2. Check the following condition whenever a transaction Ti issues a Write(X) operation:

o If TS(Ti) < R_TS(X) then the operation is rejected.


o If TS(Ti) < W_TS(X) then the operation is rejected and Ti is rolled back otherwise the operation is
executed.

You might also like