0% found this document useful (0 votes)
25 views10 pages

DBMS Presentation

Uploaded by

Arjun Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views10 pages

DBMS Presentation

Uploaded by

Arjun Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

“Concurrency Control”

Presented By: Submitted To:


ARJUN SINGH CHOUHAN (22EJCCS049) Dr. Sangita Choudhary
Associate Professor
CSE DEPARTMENT
Table of Contents

 Introduction
 Problems with Concurrent Execution
 Classification of Concurrency Control protocols
 Lock-based protocols
 Types of lock-based protocols
 Timestamp-based protocols
Introduction
• Concurrency control manages the transactions simultaneously
without letting them interfere with each another.
• The main objective of concurrency control is to allow many users
perform different operations at the same time.
• Using more than one transaction concurrently improves the
performance of system.
• If we are not able to perform the operations concurrently, then there
can be serious problems such as loss of data integrity and
consistency.
• Concurrency control increases the throughput because of handling
multiple transactions simultaneously.
• It reduces waiting time of transaction.
3
• For example:

4
Problems with Concurrent
Execution
• Lost Update Problems (W-W Conflict):
The problem occurs when two different
database transactions perform the
read/write operations on the same
database items in an interleaved manner
(i.e., concurrent execution) that makes
the values of the items incorrect hence
making the database inconsistent.

• Dirty Read Problems (W-R Conflict): The


dirty read problem occurs when one
transaction updates an item of the
database, and somehow the transaction
fails, and before the data gets rollback,
the updated database item is accessed by
another transaction. There comes the
Read-Write Conflict between both
transactions. 5
Classification of Concurrency
Protocols

The concurrency control protocols ensure the atomicity,


consistency, isolation and durability of the concurrent execution
of the database transactions. Therefore, these protocols are
categorized as:
• Lock-based protocols
• Timestamp-based protocols

6
Lock-based Protocols
• Lock is a mechanism which is important in a concurrent control.
• It controls concurrent access to a data item.
• It assures that one process should not retrieve or update a record
which another process is updating.
• If the locking is not done properly, then it will display the inconsistent
and corrupt data.
• It manages the order between the conflicting pairs among transactions
at the time of execution.
• For example, in traffic, there are signals which indicate stop and go.
When one signal is allowed to pass at a time, then other signals are
locked. Similarly, in database transaction only one transaction is
performed at a time and other transactions are locked.
7
Types of lock-based protocols

• Two phase locking • Strict two phase


protocol locking protocol

8
Timestamp-based Protocols
• Timestamp Based Protocol helps DBMS to identify the transactions.
• It is a unique identifier. Each transaction is issued a timestamp when
it enters into the system.
• Timestamp protocol determines the serializability order.
• It is most commonly used concurrency protocol.
• It uses either system time or logical counter as a timestamp.
• It starts working as soon as a transaction is created.

9
THANK YOU

10

You might also like