Availability Guide for Application Design

Data Protection and Recovery
Availability Guide for Application Design525637-004
4-5
Transaction Coordination
protected queue. These server processes might be on one network node or they might
be scattered on many nodes throughout the network.
Each transaction must have its own identity if it is to be the owner of locks and be
coordinated as an isolated entity. A transaction identifier is used for this purpose. When
a requester or client process initiates a transaction, the system assigns a unique
transaction identifier to the process. If the client process then involves one or more
Figure 4-1. Transaction Concurrency
BEGIN T1
Reads Balance of $50
New Balance = $50 + $500
Writes Balance of $550
END T1
BEGIN T2
Reads Balance of $50
New Balance = $50 +
$100
Writes Balance of $150
END T2
Bal = $50
Bal = $550
Bal = $150
CHECKING
Without Concurrency
Control:
BEGIN T1
Reads Balance of $50
(Gets Lock)
New Balance = $50 +
$500
Writes Balance of $550
END T1
(Releases Lock)
BEGIN T2
Reads Balance of $50
(Locked Out)
Waits
Waits
(Gets Lock)
Access Balance of $550
New Balance = $550 +
$100
Writes Balance of $650
END T2
(Releases Lock)
Bal = $50
Bal = $550
Bal = $650
CHECKING
With Concurrency
Control:
VST301.vdd