Concurrency control is the activity of coordinating the actions of processes that operate in parallel, access shared data, and therefore potentially interfere with each other. Recovery is the activity of ensuring that software and hardware failures do not corrupt persistent data. Concurrency control and recovery problems arise in the design of hardware, operating systems, real time systems, communications systems, and database systems, among others (Bernstein, 1987).
EXAMPLE: Suppose George is withdrawing $100 from a joint bank account at one ATM, and concurrently his wife Linda is depositing $100 into the account at another ATM. After completion of both transactions, the bank account should be unchanged. However, consider what might happen with the common account information manipulated by both transactions:
• George’s transaction read the account
• Linda’s transaction read the account balance
• George’s transaction subtract $100 and replace the balance
• Linda’s transaction adds $100 and replaces the balance
The end result is that the balance ends up $100 too large. Concurrency control will help us to solve such problems.
Reference
Bernstein, P. A. (1987). Concurrency Control and Recovery in Database Systems. Addison-Wesley. Menlo Park, California.