TMF Introduction (G06.24+)
TMF Overview
HP NonStop Transaction Management Facility (TMF) Introduction—522414-001
1-7
Transaction Concurrency
TMF provides concurrency control by managing locks on data accessed and updated
in a TMF transaction. The locks isolate transactions from one another so that each
transaction appears to be operating alone on the database. This allows database
access by many users. Figure 1-5 illustrates concurrency control.
Figure 1-5. Concurrency Control
BEGIN T1
Get current balance ($50)
Deposit $500
T1 locks the account
END T1
Balance
$50
BEGIN T2
Get current balance ($50)
•
•
•
Deposit $100
NEWBAL=$50+$500
Writes NEWBAL of $550
$550
T1 releases the lock
T2 locks the account
•
•
•
NEWBAL=$550 +$100
Writes NEWBAL of $650
$650
Deposit $100
Account is locked; T2 must
wait
T2 releases the lock
END T2
CHECKING
VST050.vsd