Hello Helloworld,
The short answer is that concurrency control is needed to improve
performance in a transaction processing system.
For a more complete answer, I will start with some background
explanations and then show how performance is proved if several
actions can be performed concurrently (and safely).
General characteristics of a transaction processing system is often
described by the term ACID meaning:
- Atomicity - a sequence of operations is done completely or not at
all
- Consistency - transactions leave the data base in a consistent
state
- Isolation - transactions act as if they are performed in isolation
(or serialized)
- Durability - completed transactions are resilient from failures
A basic solution to isolation is to serialize the transactions.
However, this requires one transaction to complete fully before
starting the next one - a significant hit on performance.
Concurrency control is used to achieve isolation by identifying
sequences of operations that can be done "safely". For example:
- two operations that read a value can be reordered
- one operation that reads a value and another that writes the same
value cannot be reordered
- two operations that write a value cannot be reordered
There are other conditions - say constraints - that can also affect
the ordering of operations.
Other papers basically say that the Concurrency Control module will
schedule the sequence of operations (reads, writes).
Looking at performance - serializing a sequence of transactions to
implement isolation will introduce a number of delays - on operations
that do not require the delays. For example,
T1: rA, wB
T2: rA, wC
T3: rA, rB, wD
T4: rA, wA
are four transactions submitted in order. Serialized, you get the
order
rA, wB, rA, wC, rA, rB, wD, rA, wA
but with concurrency control, you can do something like
rA, wB
rA, wC
rA, rB, wD
rA, wA
which reduces the total time signficantly. Of course, with a real
system there may be other optimizations or constraints. For example, A
should be read once and be used for all the transactions. There may
also be constraints on how many operations can be done and the tasks
to do in the case of failure.
References:
http://www.cs.duke.edu/~junyang/courses/cps216-2001-fall/lectures/07-cc-notes.pdf
Class notes describing transaction processing systems and a number
of methods to implement concurrency control.
http://www.utdallas.edu/~ilyen/course/aos.notes.final/trans_talk.pdf
http://www.utdallas.edu/~ilyen/course/aos.notes.final/trans_note.pdf
A presentation (trans_note) with speech notes (trans_talk)
describing transaction processing, on a single system and distributed
system.
http://www.csse.monash.edu.au/courseware/cse5501/mdcs-l-08/
Another set of course slides describing transaction processing and
methods of concurrency control.
http://www.altibase.com/english/product/transaction.htm
A product that can implement transaction processing on top of a more
traditional data base system. This describes some of the steps taken
to improve concurrency.
Search phrases include:
definition concurrency control transaction processing
--Maniac |