Google Answers Logo
View Question
 
Q: Database questions -concurrency control ( Answered 4 out of 5 stars,   0 Comments )
Question  
Subject: Database questions -concurrency control
Category: Computers > Software
Asked by: helloworld-ga
List Price: $10.00
Posted: 27 Jul 2003 00:49 PDT
Expires: 26 Aug 2003 00:49 PDT
Question ID: 235576
why concurrency control is needed in transaction processing systems?
Answer  
Subject: Re: Database questions -concurrency control
Answered By: maniac-ga on 27 Jul 2003 15:43 PDT
Rated:4 out of 5 stars
 
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
helloworld-ga rated this answer:4 out of 5 stars

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy