2PL Protocol
2PL Protocol
Sa: r1(X); w1(X); r1(Y); w1(Y); r2(X); w2(Y) Sb: r2(X); w2(Y); r1(X); w1(X); r1(Y); w1(Y)
Conflicting Operations in a Schedule:-
Two operations in a schedule are said to conflict if they satisfy all three of the following
conditions:
• They belong to different transactions
• They access the same item X
• At least one of the operations is a write_item(X).
Type of Conflicts:-
read-write conflict, write-write conflict
A schedule S of n transactions
is serializable if it is equivalent to some serial schedule of the same n
transactions.
1.Undo: using a log record sets the data item specified in log record to old value.
2.Redo: using a log record sets the data item specified in log record to new value.
Types of Recovery Techniques in DBMS