lecture 11 distributed transaction management. concurrency control the problem of synchronizing...

59
Lecture 11 Distributed Transaction Management

Upload: beverley-randall

Post on 12-Jan-2016

234 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Lecture 11

Distributed Transaction Management

Page 2: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Concurrency Control• The problem of synchronizing concurrent

transactions such that the consistency of the database is maintained while, at the same time, maximum degree of concurrency is achieved.

• Anomalies:– Lost updates

• The effects of some transactions are not reflected on the database.

– Inconsistent retrievals• A transaction, if it reads the same data item more than

once, should always read the same value.

Page 3: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Execution History (or Schedule)

• An order in which the operations of a set of transactions are executed.

• A history (schedule) can be defined as a partial order over the operations of a set of transactions.

H1={W2(x),R1(x), R3(x),W1(x),C1,W2(y),R3(y),R2(z),C2,R3(z),C3}

T1: Read(x) T2: Write(x) T3: Read(x)Write(x) Write(y) Read(y)Commit Read(z) Read(z)

Commit Commit

Page 4: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Formalization of History

A complete history over a set of transactions T={T1, …, Tn} is a partial order Hc(T) = {∑T, ≺H}

where

∑T = i ∑i , for i = 1, 2, …, n

≺H i ≺Ti , for i = 1, 2, …, n

For any two conflicting operations Oij, Okl ∑T,

either Oij ≺H Okl or Okl ≺H Oij

Page 5: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Example

• Consider the two transactions:

Page 6: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Example Cont.

• which can be specified as a DAG

Page 7: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

History as a List

• It is quite common to specify a history as a listing of the operations in ΣT , where their execution order is relative to their order in this list.

Page 8: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

History (or Schedule)

• A history is defined as a prefix of a complete history.

• A prefix of a partial order can be defined as follows.

• Given a partial order ,

is a prefix of P if:

Page 9: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

History (or Schedule) Cont.

• The first two conditions define P’ as a restriction of P on domain Σ’, whereby the

• ordering relations in P are maintained in P’• The last condition indicates that for any

element of Σ’ all its predecessors in Σ have to be included in Σ as well.

Page 10: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

History Vs. Complete History

• We can now deal with incomplete histories. • This is useful because:• From the perspective of the serializability

theory, we deal only with conflicting operations of transactions rather than with all operations.

• Furthermore, and perhaps more important, when we introduce failures, we need to be able to deal with incomplete histories, which is what a prefix enables us to do.

Page 11: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Example

• Consider the following three transactions:

Page 12: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Serial History

• All the actions of a transaction occur consecutively.• No interleaving of transaction operations.• If each transaction is consistent (obeys integrity

rules), then the database is guaranteed to be consistent at the end of executing a serial history.

T1: Read(x) T2: Write(x) T3: Read(x)Write(x) Write(y) Read(y)Commit Read(z) Read(z)

Commit Commit

Page 13: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Serializable History

• Transactions execute concurrently, but the net effect of the resulting history upon the database is equivalent to some serial history.

• Equivalent with respect to what?– Conflict equivalence: the relative order of execution of

the conflicting operations belonging to unaborted transactions in two histories are the same.

– Conflicting operations: two incompatible operations (e.g., Read and Write) conflict if they both access the same data item.• Incompatible operations of each transaction is assumed to

conflict; do not change their execution orders.• If two operations from two different transactions conflict, the

corresponding transactions are also said to conflict.

Page 14: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Serializable History

The following are not conflict equivalent

Hs={W2(x),W2(y),R2(z),R1(x),W1(x),R3(x),R3(y),R3(z)}

H1={W2(x),R1(x), R3(x),W1(x),W2(y),R3(y),R2(z),R3(z)}

The following are conflict equivalent; therefore H2 is

serializable.

Hs={W2(x),W2(y),R2(z),R1(x),W1(x),R3(x),R3(y),R3(z)}

H2={W2(x),R1(x),W1(x),R3(x),W2(y),R3(y),R2(z),R3(z)}

T1: Read(x) T2: Write(x) T3: Read(x)Write(x) Write(y) Read(y)Commit Read(z) Read(z)

Commit Commit

Page 15: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Serializability in Distributed DBMS

• Serializability theory extends in a straightforward manner to the non-replicated (or partitioned) distributed databases.

• The history of transaction execution at each site is called a local history.

• If the database is not replicated and each local history is serializable, their union (called the global history) is also serializable as long as local serialization orders are identical.

Page 16: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Example

• Consider two bank accounts, x (stored at Site 1) and y (stored at Site 2), and the following two transactions where T1 transfers $100 from x to y, while T2 simply reads the balances of x and y:

Page 17: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Example Cont.

• Obviously, both of these transactions need to run at both sites.

• Consider the following two histories that may be generated locally at the two sites (Hi is the history at Site i):

Page 18: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Example Cont.

• Both of these histories are serializable; indeed, they are serial.

• Therefore, each represents a correct execution order.

• Furthermore, the serialization order for both are the same T1 → T2.

• Therefore, the global history that is obtained is also serializable with the serialization order T1 → T2.

Page 19: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Example Cont.

• However, if the histories generated at the two sites are as follows, there is a problem:

• Although each local history is still serializable, the serialization orders are different: H’1 serializes T1 before T2 while H’2 serializes T2 before T1.

• Therefore, there can be no global history that is serializable.

Page 20: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Concurrency Control Algorithms

• Pessimistic– Two-Phase Locking-based (2PL)

• Centralized (primary site) 2PL• Primary copy 2PL• Distributed 2PL

– Timestamp Ordering (TO)• Basic TO• Multiversion TO• Conservative TO

– Hybrid• Optimistic

– Locking-based– Timestamp ordering-based

Page 21: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Locking-Based Algorithms

• Transactions indicate their intentions by requesting locks from the scheduler (called lock manager).

• Locks are either read lock (rl) [also called shared lock] or write lock (wl) [also called exclusive lock]

• Read locks and write locks conflict (because Read and Write operations are incompatible

rl wl

rl yes no

wl no no• Locking works nicely to allow concurrent

processing of transactions.

Page 22: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Locking Problem

• The locking algorithm as described above will not, unfortunately, properly synchronize transaction executions.

• This is because to generate serializable histories, the locking and releasing operations of transactions also need to be coordinated.

• We demonstrate this by an example.

Page 23: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Example

• Consider the following two transactions:

• The following is a valid history that a lock manager employing the locking algorithm may generate:

Page 24: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Example Cont.

• where lri (z) indicates the release of the lock on z that transaction Ti holds.

• Note that H is not a serializable history. • For example, if prior to the execution of these

transactions, the values of x and y are 50 and 20, respectively, one would expect their values following execution to be, respectively, either 102 and 38 if T1 executes before T2, or 101 and 39 if T2 executes before T1.

• However, the result of executing H would give x and y the values 102 and 39.

• Obviously, H is not serializable.

Page 25: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Discussion

• The problem with history H in Example is the following. • The locking algorithm releases the locks that are held by a

transaction (say, Ti ) as soon as the associated database command (read or write) is executed, and that lock unit (say x) no longer needs to be accessed.

• However, the transaction itself is locking other items (say, y), after it releases its lock on x.

• Even though this may seem to be advantageous from the viewpoint of increased concurrency, it permits transactions to interfere with one another, resulting in the loss of isolation and atomicity.

• Hence the argument for two-phase locking (2PL).

Page 26: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Two-Phase Locking (2PL)

• The two-phase locking rule simply states that no transaction should request a lock after it releases one of its locks.

• Alternatively, a transaction should not release a lock until it is certain that it will not request another lock.

• 2PL algorithms execute transactions in two phases.

Page 27: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Two-Phase Locking (2PL)

• Each transaction has a growing phase, where it obtains locks and accesses data items, and a shrinking phase, during which it releases locks

• The lock point is the moment when the transaction has achieved all its locks but has not yet started to release any of them.

• Thus the lock point determines the end of the growing phase and the beginning of the shrinking phase of a transaction.

• It has been proven that any history generated by a concurrency control algorithm that obeys the 2PL rule is serializable

Page 28: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Two-Phase Locking (2PL)

A Transaction locks an object before using it. When an object is locked by another transaction,

the requesting transaction must wait. When a transaction releases a lock, it may not

request another lock.Obtain lock

Release lock

Lock point

Phase 1 Phase 2

BEGIN END

No.

of

lock

s

Page 29: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

2PL Problems

• 2PL indicates that the lock manager releases locks as soon as access to that data item has been completed.

• This permits other transactions awaiting access to go ahead and lock it, thereby increasing the degree of concurrency.

• However, this is difficult to implement since the lock manager has to know that the transaction has obtained all its locks and will not need to lock another data item.

• The lock manager also needs to know that the transaction no longer needs to access the data item in question, so that the lock can be released.

Page 30: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

2PL Problems Cont.

• Finally, if the transaction aborts after it releases a lock, it may cause other transactions that may have accessed the unlocked data item to abort as well.

• This is known as cascading aborts.

Page 31: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Strict 2PL

• These problems may be overcome by strict two-phase locking, which releases all the locks together when the transaction terminates (commits or aborts).

Page 32: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Strict 2PL

Hold locks until the end.

Obtain lock

Release lock

BEGIN ENDTransactionduration

period ofdata itemuse

No.

of

lock

s

Page 33: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

2PL Issue

• We should note that even though a 2PL algorithm enforces conflict serializability, it does not allow all histories that are conflict serializable.

• Consider the following history• H is not allowed by 2PL algorithm since T1 would

need to obtain a write lock on y after it releases its write lock on x.

• However, this history is serializable in the order

T3 → T1 → T2.

The order of locking can be exploited to design locking algorithms that allow histories such as these

Page 34: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

2PL Issue Cont.

• The main idea is to observe that in serializability theory, the order of serialization of conflicting operations is as important as detecting the conflict in the first place and this can be exploited in defining locking modes.

• Consequently, in addition to read (shared) and write (exclusive) locks, a third lock mode is defined: ordered shared.

Page 35: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Centralized 2PL

• There is only one 2PL scheduler in the distributed system.

• Lock requests are issued to the central scheduler.Data Processors at participating sites Coordinating TM Central Site LM

Lock Request

Lock Granted

Operation

End of Operation

Release Locks

Page 36: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Distributed 2PL

• 2PL schedulers are placed at each site. Each scheduler handles lock requests for data at that site.

• A transaction may read any of the replicated copies of item x, by obtaining a read lock on one of the copies of x. Writing into x requires obtaining write locks for all copies of x.

Page 37: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Distributed 2PL Execution

Coordinating TM Participating LMs Participating DPs

Lock RequestOperation

End of Operation

Release Locks

Page 38: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Timestamp Ordering

Transaction (Ti) is assigned a globally unique timestamp ts(Ti).

Transaction manager attaches the timestamp to all operations issued by the transaction.

Each data item is assigned a write timestamp (wts) and a read timestamp (rts):– rts(x) = largest timestamp of any read on x– wts(x) = largest timestamp of any read on x

Conflicting operations are resolved by timestamp order.

Basic T/O:for Ri(x) for Wi(x)if ts(Ti) < wts(x) if ts(Ti) < rts(x) and ts(Ti) < wts(x) then reject Ri(x) then reject Wi(x)else accept Ri(x) else accept Wi(x)

rts(x) ts(Ti) wts(x) ts(Ti)

Page 39: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Conservative Timestamp Ordering

• Basic timestamp ordering tries to execute an operation as soon as it receives it– progressive– too many restarts since there is no delaying

• Conservative timestamping delays each operation until there is an assurance that it will not be restarted

• Assurance?– No other operation with a smaller timestamp can

arrive at the scheduler– Note that the delay may result in the formation of

deadlocks

Page 40: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Multiversion Timestamp Ordering

• Do not modify the values in the database, create new values.

• A Ri(x) is translated into a read on one version of x. – Find a version of x (say xv) such that ts(xv) is the

largest timestamp less than ts(Ti).

• A Wi(x) is translated into Wi(xw) and accepted if the scheduler has not yet processed any Rj(xr) such that

ts(Ti) < ts(xr) < ts(Tj)

Page 41: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Optimistic Concurrency Control Algorithms

Pessimistic execution

Optimistic execution

Validate Read Compute Write

ValidateRead Compute Write

Page 42: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Optimistic Concurrency Control Algorithms

• Transaction execution model: divide into subtransactions each of which execute at a site

– Tij: transaction Ti that executes at site j

• Transactions run independently at each site until they reach the end of their read phases

• All subtransactions are assigned a timestamp at the end of their read phase

• Validation test performed during validation phase. If one fails, all rejected.

Page 43: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Optimistic CC Validation Test

If all transactions Tk where ts(Tk) < ts(Tij) have completed their write phase before Tij has started its read phase, then validation succeeds– Transaction executions in serial order

TkR V W

R V WTij

Page 44: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Optimistic CC Validation Test

If there is any transaction Tk such that ts(Tk)<ts(Tij) and which completes its write phase while Tij is in its read phase, then validation succeeds if WS(Tk) RS(Tij) = Ø

– Read and write phases overlap, but Tij does not read data items written by Tk

R V WTkR V W

Tij

Page 45: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Optimistic CC Validation Test

If there is any transaction Tk such that

ts(Tk)< ts(Tij) and which completes its read

phase before Tij completes its read phase,

then validation succeeds if WS(Tk) RS(Tij) = Ø and WS(Tk) WS(Tij) = Ø

– They overlap, but don't access any common data items.

R V WTkR V W

Tij

Page 46: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Deadlock

• A transaction is deadlocked if it is blocked and will remain blocked until there is intervention.

• Locking-based CC algorithms may cause deadlocks.

• TO-based algorithms that involve waiting may cause deadlocks.

• Wait-for graph

– If transaction Ti waits for another transaction Tj to

release a lock on an entity, then Ti → Tj in WFG.

TiTj

Page 47: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Local versus Global WFG

Assume T1 and T2 run at site 1, T3 and T4 run at site 2. Also assume T3 waits for a lock held by T4 which waits for a lock held by T1 which waits for a lock held by T2 which, in turn, waits for a lock held by T3.

Local WFG

Global WFG

T1

Site 1 Site 2

T2

T4

T3

T1

T2

T4

T3

Page 48: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Deadlock Management

• Ignore– Let the application programmer deal with it, or restart the system

• Prevention– Guaranteeing that deadlocks can never occur in the first place.

Check transaction when it is initiated. Requires no run time support.

• Avoidance– Detecting potential deadlocks in advance and taking action to

insure that deadlock will not occur. Requires run time support.

• Detection and Recovery– Allowing deadlocks to form and then finding and breaking them.

As in the avoidance scheme, this requires run time support.

Page 49: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Deadlock Prevention

• All resources which may be needed by a transaction must be predeclared.– The system must guarantee that none of the resources will be

needed by an ongoing transaction.– Resources must only be reserved, but not necessarily allocated a

priori– Unsuitability of the scheme in database environment– Suitable for systems that have no provisions for undoing processes.

• Evaluation:– Reduced concurrency due to preallocation– Evaluating whether an allocation is safe leads to added overhead.– Difficult to determine (partial order)+ No transaction rollback or restart is involved.

Page 50: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Deadlock Avoidance

• Transactions are not required to request resources a priori.

• Transactions are allowed to proceed unless a requested resource is unavailable.

• In case of conflict, transactions may be allowed to wait for a fixed time interval.

• Order either the data items or the sites and always request locks in that order.

• More attractive than prevention in a database environment.

Page 51: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Deadlock Avoidance –Wait-Die Algorithm

If Ti requests a lock on a data item which is already locked by Tj, then Ti is permitted to wait iff ts(Ti)<ts(Tj). If ts(Ti)>ts(Tj), then Ti is aborted and restarted with the same timestamp.

– if ts(Ti)<ts(Tj) then Ti waits else Ti dies

– non-preemptive: Ti never preempts Tj

– prefers younger transactions

Page 52: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Deadlock Avoidance –Wound-Wait Algorithm

If Ti requests a lock on a data item which is already locked by Tj , then Ti is permitted to wait iff ts(Ti)>ts(Tj). If ts(Ti)<ts(Tj), then Tj is aborted and the lock is granted to Ti.

– if ts(Ti)<ts(Tj) then Tj is wounded else Ti waits

– preemptive: Ti preempts Tj if it is younger

– prefers older transactions

Page 53: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Deadlock Detection

• Transactions are allowed to wait freely.

• Wait-for graphs and cycles.

• Topologies for deadlock detection algorithms– Centralized

– Distributed

– Hierarchical

Page 54: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Centralized Deadlock Detection

• One site is designated as the deadlock detector for the system. Each scheduler periodically sends its local WFG to the central site which merges them to a global WFG to determine cycles.

• How often to transmit?– Too often higher communication cost but lower delays ⇒

due to undetected deadlocks– Too late higher delays due to deadlocks, but lower ⇒

communication cost

• Would be a reasonable choice if the concurrency control algorithm is also centralized.

• Proposed for Distributed INGRES

Page 55: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Build a hierarchy of detectors

Hierarchical Deadlock Detection

Site 1 Site 2 Site 3 Site 4

DD21 DD22 DD23 DD24

DD11 DD14

DD0x

Page 56: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Distributed Deadlock Detection

• Sites cooperate in detection of deadlocks.• One example:

– The local WFGs are formed at each site and passed on to other sites. Each local WFG is modified as follows: Since each site receives the potential deadlock cycles from other

sites, these edges are added to the local WFGs The edges in the local WFG which show that local transactions

are waiting for transactions at other sites are joined with edges in the local WFGs which show that remote transactions are waiting for local ones.

– Each local deadlock detector:• looks for a cycle that does not involve the external edge. If it

exists, there is a local deadlock which can be handled locally.• looks for a cycle involving the external edge. If it exists, it

indicates a potential global deadlock. Pass on the information to the next site.

Page 57: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

“Relaxed” Concurrency Control

• Non-serializable histories– E.g., ordered shared locks– Semantics of transactions can be used

• Look at semantic compatibility of operations rather than simply looking at reads and writes

• Nested distributed transactions– Closed nested transactions– Open nested transactions– Multilevel transactions

Page 58: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Multilevel TransactionsConsider two transactions

T1: Withdraw(o,x) T2: Withdraw(o,y)Deposit(p,x) Deposit(p,y)

Page 59: Lecture 11 Distributed Transaction Management. Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the

Questions These slides are fromPrinciples of Distributed Database Systems M. Tamer Özsu • Patrick ValduriezSpringer (2011).