Distributed Concurrency Control
Distributed Concurrency Control
Distributed Concurrency Control
Systems
Autumn, 2008
Chapter 11
Distributed
Concurrency
Control
operations
Oij(x) and Okl(x)
accessing the same data item x
are in conflict if one of them is a
write.
Conflicts
1. T Ui1 i
n
2. pT Ui1 pi
3. For any two conflicting operations Oij x
and Okl x in T , either Oij x pT Okl x
or Okl x pT Oij x
Distributed Database Systems
Example:
2. ei , e j , ei p e j iff ei p e j
3. ei ,
1.
if e j and e j p ei then e j
The last condition requires that for any element
in , all its predecessors in have to be in .
Distributed Database Systems
10
is used to deal
with
conflicting operations
only, or
incomplete schedule
caused by failures
Distributed Database Systems
11
Example
Three
transactions
12
Example
A complete schedule
13
14
15
S={W2(x),R1(x),W1(x),R3(x),W2(y),R3(y),R2(z),C2,C1,R3(z),C3}
16
Note:
concurrent execution is
the interleaved
execution of
transactions. It is
different from parallel
execution.
Distributed Database Systems
17
18
a non-replicated distributed
database, if each local schedule is
serializable, their union (the global
schedule) is also serializable as long
as local serialization orders are
identical.
For replicated distributed database,
the issue is complicated. The system
has to synchronize updates of nreplicas by using replica protocol.
Distributed Database Systems
19
To be continued