13 - Concurrency Control (Lecture Session-14) Chapters 18...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Concurrency Control (Lecture Session-14) Chapters 18 Mon, Feb 22, 2010 1 DLPD, BITS-Pilani. Prepared by Dr.R. Gururaj, Asst.Professor of CS Mon, Feb 22, 2010 DLPD, BITS-Pilani. Prepared by Dr.R. Gururaj, Asst.Professor of CS 2 Introduction to Concurrency control Serializabilty Conflict & view serializability Achieving concurrency control Contents Mon, Feb 22, 2010 DLPD, BITS-Pilani. Prepared by Dr.R. Gururaj, Asst.Professor of CS 3 Multiprogramming in modern systems increases the throughput drastically, as the resources are shared by more than one process. Similarly in a DBMS multiple transactions are executed concurrently. Here, for a transaction we consider data item as a resource because transactions process data by accessing them. When multiple transactions access data elements in a concurrent way, this may destroy the consistency of the database. The mechanisms that control the interaction among the concurrent transactions in order to avoid inconsistency in the database are known as concurrency control schemes . A transaction consists of series of instruction that include actions like reading data, modifying that and write the data back on to the disk. These instructions are executed in a specified order/sequence. Mon, Feb 22, 2010 DLPD, BITS-Pilani. Prepared by Dr.R. Gururaj, Asst.Professor of CS 4 The descriptions that specify the execution sequence of instructions in a set of transactions are called as schedules . Hence schedule can describe the execution sequence of more than one transaction. T 1 T 2 T 1 and T 2 are transaction Read (A) Reads data item A Write (B) Writes the data item B Read (A) A = A + 50 Read (B) B = B + A Write (B) Read (B) B = B + 75 Write (B) Here, in the above schedule the transactions T 1 & T 2 are executed in a serial manner i.e., first all the instructions of the transaction T 1 are executed, and then the instructions of T 2 are executed. Hence the above schedule is known as serial schedule . Mon, Feb 22, 2010 DLPD, BITS-Pilani. Prepared by Dr.R. Gururaj, Asst.Professor of CS 5 In a serial schedule, instructions belonging to one single transaction appear together. A serial schedule does not exploit the concurrency. Hence, it is less efficient. If the transactions are executed concurrently then the resources can be utilized more efficiently hence more throughput is achieved. Mon, Feb 22, 2010 DLPD, BITS-Pilani. Prepared by Dr.R. Gururaj, Asst.Professor of CS 6 A serial schedule always results in correct database state that reflect the real world situations....
View Full Document

Page1 / 26

13 - Concurrency Control (Lecture Session-14) Chapters 18...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online