Thursday, May 27, 2010

Exercise_Week 8

Concurrency and transactions

Transaction is an action or series of actions, carried out by user or application, which accesses or changes contents of database.

Concurrent execution of user programs is essential for good database management system (DBMS) performance.

Because disk accesses are frequent, and relatively slow, it is important to keep the CPU humming by working on several user programs concurrently.

A user’s program may carry out many operations on the data retrieved from the database, but the DBMS is only concerned about what data is read/write from/to the database.

A transaction is the DBMS abstract view of a user program: a sequence of reads and writes.

When multiple users access a database simultaneously, their data operations have to be coordinated in order to prevent incorrect results and to preserve the consistency of the shared data. This activity is called concurrency control and should provide each concurrent user with the illusion that he is referencing a dedicated database. The classical transaction concept defines a transaction as the unit of concurrency control, that is, the DBMS has to guarantee isolated execution for an entire transaction. This implies that its results as derived in a multi-programming environment should be the same as if obtained in a serial execution schedule. Other important transaction properties are atomicity, consistency, and durability. In a DBMS, the component responsible for achieving these properties is transaction management which includes concurrency control as a major function.

Concurrency control and recovery are among the most important functions provided by a DBMS.

Users do not need to worry about concurrency.

System automatically inserts lock/unlock requests and schedules actions of different Xacts in such a way as to ensure that the resulting execution is equivalent to executing the Xacts one after the other in an order.

Reference:

  • Beeri, C., Bernstein, E.A., and Goodman, N., A model for concurrency in nested transaction systems, Journal oftheACM, 36(1):230-269.
  • Bernstein, P.A. and Goodman, N. Concurrency control in distributed database systems. ACM Computing Surveys, 13(2):185-221.

  • Bernstein, E.A., Hadzilacos, N., and Goodman, N. Concurrency Control and Recovery in Database Systems, Addison-Wesley: Reading, Pennsylvania.

1 comment:

  1. This blog entry describes that concurrency is a property of systems in which several
    computations are executing simultaneously, and potentially interacting with each other.
    The computations may be executing on multiple cores in the same chip, preemptively time-shared
    threads on the same processor, or executed on physically separated processors.
    This is very useful blog entry. Well done Kunal.

    ReplyDelete