11 Jan 2016

concurrency control and recovery in database systems

preface

In part, the requirement for correctness and reliability is the burden of the application programming staff … However, even the most carefully implemented application program is vulnerable to certain errors that are beyond its control. These potential errors arise from two sources: concurrency and failures.

Multiprogramming is essential for attaining high performance. Its effect is to allow many programs to interleave their executions. That is, they execute concwrently. When such programs interleave their accessesto the database, they can interfere. Avoiding this interference is called the concurrency control problem.

Systems that solve the concurrency control and recovery problems allow their users to assume that each of their programs executes atomically — as if no other programs were executing concurrently — and reliably — as if there were no failures. This abstraction of an atomic and reliable execution of a program is called a transaction.

1 the problem

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 …

study this problem using a model of database systems … the main component of this model is the transaction… the goal of concurrency control and recovery is to ensure that transactions execute atomically:

  1. access shared data without interfering
  2. if a transaction terminates abnormally, then all of its effects are made permanent; otherwise it has no effect at all
Database Systems
A database consists of a set of named data items. Each data item has a value.
messages
DBS must mediate each transaction’s operations that can affect other transactions. In our model, the only such oper- ations are accesses to shared data.

In general, a transaction is free to control its internal execution using any available mechanism. Only interactions between different transactions need to be controlled by the DBS.

Distributed Database System Architecture
a collection of sites connected by a communication network …
Each site is a centralized DBS, which stores a portion of the database.
each data item is stored at exactly one site
Each transaction consists of one or more processes that execute at one or more sites.