Chapter 11 Concurrency Control
11.1_ Overview of Concurrency Control
Transaction is the basic unit of
concurrency control. Data inconsistencies caused by concurrent operations include loss of modification, non-repeatable read, and read "stained" data
11.2_Blocked
Two blocking protocols: exclusive lock (write lock) and shared lock (read lock)
three-level protocol:
- The first-level lockout protocol: The
transaction must first add a write lock to the data before modifying the data, and it will not be released until the transaction ends
- Second-
level lockout protocol Add a transaction on the basis of the first-level lockout protocol. A read lock must be added to it before the data is read, and it can be released after reading.
- Three-
level lockout protocol Add a transaction on the basis of the first-level lockout protocol. Before reading the data, you must first add a read lock to it, and release it after the transaction ends.