Multiversition Cuncurrency Control
Multiversition Cuncurrency Control
control techniques
•In this method, several versions X1, X2, ..., Xk of each data item X are maintained.
• For each version, the value of version Xi and the following two timestamps are kept:
1. read_TS(Xi). The read timestamp of Xi is the largest of all the timestamps of
transactions that have successfully read version Xi.
2. write_TS(Xi). The write timestamp of Xi is the timestamp of the transaction
that wrote the value of version
• Whenever a transaction T is allowed to execute a write_item(X) operation, a new
version Xk+1 of item X is created, with both the write_TS(Xk+1) and the
read_TS(Xk+1) set to TS(T)
•Correspondingly, when a transaction T is allowed to read the value of version Xi, the
value of read_TS(Xi) is set to the larger of the current read_TS(Xi) and TS(T).
•To ensure serializability, the following rules are used:
1. If transaction T issues a write_item(X) operation, and version i of X has the
highest write_TS(Xi) of all versions of X that is also less than or equal to TS(T),
and read_TS(Xi) > TS(T), then abort and roll back transaction T; otherwise,
create a new version Xj of X with read_TS(Xj) = write_TS(Xj) = TS(T).
In this multiple-mode locking scheme, there are three locking modes for an
item: read, write, and certify
Hence, the state of LOCK(X) for an item X can be one of read-locked,
writelocked, certify-locked, or unlocked
We can describe the relationship between read and write locks in the
standard scheme by means of the lock compatibility table shown in Figure
•An entry of Yes means that if a transaction T holds the type of lock specified in
the column header on item X and if transaction T_ requests the type of lock
specified in the row header on the same item X, then T_can obtain the lock
because the locking nodes are compatible.