Documente Academic
Documente Profesional
Documente Cultură
Serializability
&
13.15
'
Conflict Serializability
&
13.16
'
&
13.17
'
T1
read(A)
write(A)
T2
read(A)
write(A)
&
read(B)
write(B)
read(B)
write(B)
13.18
'
View Serializability
&
3. For each data item Q, the transaction (if any) that performs
the final write(Q) operation in schedule S must perform the
final write(Q) operation in schedule S .
13.19
'
&
13.20
'
&
13.21
'
Recoverability
&
13.22
'
Recoverability (Cont.)
T10
read(A)
read(B)
write(A)
T11
T12
read(A)
write(A)
&
read(A)
13.23
'
Recoverability (Cont.)
&
13.24
'
Implementation of Isolation
&
13.25
'
&
Serializable default
Repeatable read
Read committed
Read uncommitted
13.26
'
Serializable default
Repeatable read only committed records to be read,
repeated reads of same record must return same value.
However, a transaction may not be serializable it may find
some records inserted by a transaction but not find others.
Read committed only committed records can be read, but
successive reads of a record may return different (but
committed) values.
Read uncommitted even uncommitted records may be
read.
&
13.27
'
&
X
T1
T2
Y
13.28
'
T2
read(X)
T3
T4
T5
read(Y)
read(Z)
read(V)
read(W)
write(W)
read(Y)
write(Y)
write(Z)
read(U)
&
read(Y)
write(Y)
read(Z)
write(Z)
read(U)
write(U)
13.29
'
T2
T1
T5
&
T3
T4
13.30
'
&
13.31
'
&
13.32
'
&
13.33
'
Lock-Based Protocols
Timestamp-Based Protocols
Validation-Based Protocols
Multiple Granularity
Multiversion Schemes
Deadlock Handling
&
14.1
'
Lock-Based Protocols
&
14.2
'
Lock-compatibility matrix
S
true
false
false
false
&
14.3
'
T2 : lock-S(A);
read(A);
unlock(A);
lock-S(B);
read(B);
unlock(B);
display(A + B).
Locking as above is not sufficient to guarantee serializability
if A and B get updated in-between the read of A and B , the
displayed sum would be wrong.
&
14.4
'
T3
lock-X(B)
read(B)
B := B 50
write(B)
T4
lock-S(A)
read(A)
lock-S(B)
lock-X(A)
Neither T3 nor T4 can make progress executing lock-S(B)
causes T4 to wait for T3 to release its lock on B , while executing
lock-X(A) causes T3 to wait for T4 to release its lock on A.
&
14.5
'
&
14.6
'
&
14.7
'
&
14.8
'
&
14.9