SlideShare uma empresa Scribd logo
1 de 22
8/26/2016
1
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
Over view Of Presentation
Distributed Concurrency Control.
Distributed Concurrency control Algorithms.
Structure Of Distributed transection.
Distributed Two phase locking(2PL).
Wound wait(WW).
Basic timestamp Ordering(BTO).
Distributed Optimistic(OPT).
8/26/2016
2
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
Distributed
 A distributed database is a single logical database
that is spread physically across computers in
multiple locations that are connected by data
communication links.
 Distributed database is a kind of virtual database
whose component parts are physically stored in a
number of distinct real databases at a number of
distinct locations
8/26/2016
3
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
Concurrency
 A situation in which two or more persons access the
same record simultaneously is called
Concurrency.
 Concurrency control involves the synchronization of
accesses to the distributed database , such that the
integrity of the database is maintained.
8/26/2016
4
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
Concurrency
 The concurrency control problem in a distributed
context is somewhat different than in a centralized
framework.
 One not only has to worry about the integrity of a
single database, but also about the consistency of
multiple copies of the database.
 The condition that requires all the values of multiple
copies of every data item to converge to the same
value is called Mutual consistency.
8/26/2016
5
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
Distributed Concurrency
Control Algorithm
 we consider some of the distributed concurrency
control algorithms. We summarize the salient
aspects of these four algorithms in this section.
 In order to do this, we must first explain the
structure that we have assumed for distributed
transactions.
 Before discussing the algorithms, we need to get an
idea about the distributed transactions.
8/26/2016
6
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
Structure Of Distributed
Transection(cont.)
 A distributed transaction is a transaction
that runs in multiple processes, usually on
several machines.
 Each process works for the transaction.
 Distributed transaction processing systems
are designed to facilitate transactions that
span heterogeneous, transaction-aware
resource managers in a distributed
environment .
8/26/2016
7
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
Structure Of Distributed Transection
(cont.)
 The execution of a distributed transaction requires
coordination between a global transaction
management system and all the local resource
managers of all the involved systems.
 The resource manager and transaction processing
monitor are the two primary elements of any
distributed transactional system.
 Distributed transactions, like local transactions,
must observe the ACID properties. However,
maintenance of these properties is very
complicated for distributed transactions because a
failure can occur in any process
8/26/2016
8
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
Structure Of Distributed Transection
(cont.)
 If such a failure occurs, each process must undo any
work that has already been done on behalf of the
transaction.
 A distributed transaction processing system maintains
the ACID properties in distributed transactions by using
two features:
 Recoverable processes: Recoverable processes log
their actions and therefore can restore earlier states if a
failure occurs.
 A commit protocol: A commit protocol allows
multiple processes to coordinate the committing or
aborting of a transaction. The most common commit
protocol is the two-phase commit protocol.
8/26/2016
9
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
Distributed Two Phase
Locking(2PL)
 In order to ensure serializability of parallel executed
transactions elaborated different methods of
concurrency control.
 One of these methods is locking method. There are
different forms of locking method.
 Two phase locking protocol is one of the basic
concurrency control protocols in distributed
database systems.
 The main approach of this protocol is “read any,
write all”. 8/26/2016
10
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
Distributed Two Phase
Locking
 Transactions set read locks on items that they read,
and they convert their read locks to write locks on
items that need to be updated.
 To read an item, it suffices to set a read lock on any
copy of the item, so the local copy is locked; to
update an item, write locks are required on all
copies.
 Write locks are obtained as the transaction
executes, with the transaction blocking on a write
request until all of the copies of the item to be
updated have been successfully locked
8/26/2016
11
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
Distributed Two Phase
Locking(cont.)
 The 2PL Protocol oversees locks by determining when
transactions can acquire and release locks.
 The 2PL protocol forces each transaction to make a
lock or unlock request in two steps:
 Growing Phase: A transaction may obtain locks but may
not release any locks.
 Shrinking Phase: A transaction may release locks but not
obtain any new lock.
 The transaction first enters into the Growing Phase,
makes requests for required locks, then gets into the
Shrinking phase where it releases all locks and cannot
make any more requests 8/26/2016
12
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
Wound wait
 The second algorithm is the distributed wound-wait
locking algorithm.
 It follows the same approach as the 2 PL protocol. The
difference lies in the fact that it differs from 2PL in its
handling of the deadlock problem: unlike 2PL protocol,
rather than maintaining waits-for information and then
checking for local and global deadlocks, deadlocks are
prevented via the use of timestamps in this algorithm.
8/26/2016
13
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
Example Of Wound Wait
Example-:Wound wait algorithm
T1 is allowed to
T(T1)>t(T2) Wait
T(T1<t(T2) Abort and rolled back
8/26/2016
14
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
Wound wait(ww)
 Each transaction is numbered according to its initial
startup time, and younger transactions are
prevented from making older ones wait.
 If an older transaction requests a lock, and if the
request would lead to the older transaction waiting
for a younger transaction, the younger transaction
is “wounded” – it is restarted unless it is already in
the second phase of its commit protocol.
 Younger transactions can wait for older transactions
so that the possibility of deadlocks is eliminated [2].
8/26/2016
15
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
16
BASIC TIMESTAMP ORDENING (BTO)
 A timestamp is a unique identifier created by DDBMS to identify
a transaction.
 BTO associates timestamps with all recently accessed
data items and requires that conflicting data accesses by
transactions be performed in timestamp order .
 Typically, timestamp values are assigned in the order in which
the transactions are submitted to the system.
The idea for this scheme is to order the transactions based on
their timestamps.
 A schedule in which the transactions participate
is then serialize able, and the equivalent serial schedule has
the transactions in order of their timestamp values. This is called
timestamp ordering (TO).
8/26/2016
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
17
BASIC TRANSITION ORDENING(cont.)
 When a read request is received for an item, it is permitted if the
timestamp of the requester exceeds the item’s write timestamp.
 When a write request is received, it is permitted if the requester’s
timestamp exceeds the read timestamp of the item; in the event
that the timestamp of the requester is less than the write
timestamp of the item, the update is simply ignored.
 For replicated data, the “read any, write all” approach is used, so
a read request may be sent to any copy while a write request
must be sent to all copies.
 Integration of the algorithm with two phase commit is
accomplished as follows:
Writers keep their updates in a private workspace until commit
time. 8/26/2016
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
18 DISTRIBUTED OPTIMISTIC (OPT)
 The fourth algorithm is the distributed, timestamp-based,
optimistic concurrency control algorithm. which operates by
exchanging certification information during the commit protocol.
 For each data item, a read timestamp and a write timestamp
are maintained. Transactions may read and update data items
freely, storing any updates into a local workspace until commit
time.
 For each read, the transaction must remember the version
identifier (i.e., write timestamp) associated with the item
when it was read.
8/26/2016
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
19
DISTRIBUTED OPTIMISTIC (cont.)
 Then, when all of the transaction’s cohorts have completed their
work, and have reported back to the master, the transaction is
assigned a globally unique timestamp.
 This time stamp is sent to each cohort in the “prepare to
commit” message ,and it is used to locally certify all of its reads and
writes as follows [2]:
 A read request is certified if-:
(i) The version that was read is still the current version of the item,
and
(ii) No write with a newer timestamp has already been locally
certified.
 A write request is certified if-:
(i) No later reads have been certified and subsequently committed,
and
(ii) No later reads have been locally certified already [2]. 8/26/2016
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
20
CONCLUSIONS
 The distributed database system that is considered to be more
reliable than centralized database system.
 We also describe the concurrency control algorithms-:
distributed 2PL, wound-wait, basic timestamp
ordering and distributed optimistic algorithm.
 It is really important for database to have the ACID properties
to perform.
8/26/2016
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
21
REFRENCES
PRINCIPLES OF DISTRIBUTED SYSTEM
by:
M. Tamer Ozsu and Patric Valduriez
8/26/2016
DISTRIBUTED DATABASE MENAGEMENT SYSTEM
22
8/26/2016

Mais conteúdo relacionado

Mais procurados

Query Decomposition and data localization
Query Decomposition and data localization Query Decomposition and data localization
Query Decomposition and data localization Hafiz faiz
 
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...Gyanmanjari Institute Of Technology
 
Overview of Concurrency Control & Recovery in Distributed Databases
Overview of Concurrency Control & Recovery in Distributed DatabasesOverview of Concurrency Control & Recovery in Distributed Databases
Overview of Concurrency Control & Recovery in Distributed DatabasesMeghaj Mallick
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memoryAshish Kumar
 
16. Concurrency Control in DBMS
16. Concurrency Control in DBMS16. Concurrency Control in DBMS
16. Concurrency Control in DBMSkoolkampus
 
Introduction to Distributed System
Introduction to Distributed SystemIntroduction to Distributed System
Introduction to Distributed SystemSunita Sahu
 
Distributed datababase Transaction and concurrency control
Distributed datababase Transaction and concurrency controlDistributed datababase Transaction and concurrency control
Distributed datababase Transaction and concurrency controlbalamurugan.k Kalibalamurugan
 
Query processing in Distributed Database System
Query processing in Distributed Database SystemQuery processing in Distributed Database System
Query processing in Distributed Database SystemMeghaj Mallick
 
13. Query Processing in DBMS
13. Query Processing in DBMS13. Query Processing in DBMS
13. Query Processing in DBMSkoolkampus
 
Introduction to distributed database
Introduction to distributed databaseIntroduction to distributed database
Introduction to distributed databaseSonia Panesar
 
Distributed Database Management System
Distributed Database Management SystemDistributed Database Management System
Distributed Database Management SystemAAKANKSHA JAIN
 
Chapter 11 - File System Implementation
Chapter 11 - File System ImplementationChapter 11 - File System Implementation
Chapter 11 - File System ImplementationWayne Jones Jnr
 
11. Storage and File Structure in DBMS
11. Storage and File Structure in DBMS11. Storage and File Structure in DBMS
11. Storage and File Structure in DBMSkoolkampus
 

Mais procurados (20)

Query Decomposition and data localization
Query Decomposition and data localization Query Decomposition and data localization
Query Decomposition and data localization
 
Distributed DBMS - Unit 3 - Distributed DBMS Architecture
Distributed DBMS - Unit 3 - Distributed DBMS ArchitectureDistributed DBMS - Unit 3 - Distributed DBMS Architecture
Distributed DBMS - Unit 3 - Distributed DBMS Architecture
 
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
 
Overview of Concurrency Control & Recovery in Distributed Databases
Overview of Concurrency Control & Recovery in Distributed DatabasesOverview of Concurrency Control & Recovery in Distributed Databases
Overview of Concurrency Control & Recovery in Distributed Databases
 
Parallel Database
Parallel DatabaseParallel Database
Parallel Database
 
Lec 7 query processing
Lec 7 query processingLec 7 query processing
Lec 7 query processing
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
 
Ddbms1
Ddbms1Ddbms1
Ddbms1
 
16. Concurrency Control in DBMS
16. Concurrency Control in DBMS16. Concurrency Control in DBMS
16. Concurrency Control in DBMS
 
Introduction to Distributed System
Introduction to Distributed SystemIntroduction to Distributed System
Introduction to Distributed System
 
Distributed datababase Transaction and concurrency control
Distributed datababase Transaction and concurrency controlDistributed datababase Transaction and concurrency control
Distributed datababase Transaction and concurrency control
 
Distributed database
Distributed databaseDistributed database
Distributed database
 
Query processing in Distributed Database System
Query processing in Distributed Database SystemQuery processing in Distributed Database System
Query processing in Distributed Database System
 
13. Query Processing in DBMS
13. Query Processing in DBMS13. Query Processing in DBMS
13. Query Processing in DBMS
 
Introduction to distributed database
Introduction to distributed databaseIntroduction to distributed database
Introduction to distributed database
 
Database System Architectures
Database System ArchitecturesDatabase System Architectures
Database System Architectures
 
Distributed Database Management System
Distributed Database Management SystemDistributed Database Management System
Distributed Database Management System
 
Chapter 11 - File System Implementation
Chapter 11 - File System ImplementationChapter 11 - File System Implementation
Chapter 11 - File System Implementation
 
11. Storage and File Structure in DBMS
11. Storage and File Structure in DBMS11. Storage and File Structure in DBMS
11. Storage and File Structure in DBMS
 
Distributed DBMS - Unit 3 - Distributed DBMS Architecture
Distributed DBMS - Unit 3 - Distributed DBMS ArchitectureDistributed DBMS - Unit 3 - Distributed DBMS Architecture
Distributed DBMS - Unit 3 - Distributed DBMS Architecture
 

Destaque

Validation based protocol
Validation based protocolValidation based protocol
Validation based protocolBBDITM LUCKNOW
 
Optimistic Algorithm and Concurrency Control Algorithm
Optimistic Algorithm and Concurrency Control AlgorithmOptimistic Algorithm and Concurrency Control Algorithm
Optimistic Algorithm and Concurrency Control AlgorithmShounak Katyayan
 
Locking unit 1 topic 3
Locking unit 1 topic 3Locking unit 1 topic 3
Locking unit 1 topic 3avniS
 
DDoS Attack on DNS using infected IoT Devices
DDoS Attack on DNS using infected IoT DevicesDDoS Attack on DNS using infected IoT Devices
DDoS Attack on DNS using infected IoT DevicesSeungjoo Kim
 
Transaction and concurrency control
Transaction and concurrency controlTransaction and concurrency control
Transaction and concurrency controlAnil Shrestha
 
Concurrency (Distributed computing)
Concurrency (Distributed computing)Concurrency (Distributed computing)
Concurrency (Distributed computing)Sri Prasanna
 
Validation Protocol
Validation ProtocolValidation Protocol
Validation ProtocolSagar Savale
 
intelligent street light system using gsm ppt
intelligent street light system using gsm pptintelligent street light system using gsm ppt
intelligent street light system using gsm pptdarshangowda679
 
IOT and smart city in India
IOT and smart city in India IOT and smart city in India
IOT and smart city in India Soumya Gupta
 
Iot for smart city
Iot for smart cityIot for smart city
Iot for smart citysanalkumar k
 
DBMS-chap 2-Concurrency Control
DBMS-chap 2-Concurrency ControlDBMS-chap 2-Concurrency Control
DBMS-chap 2-Concurrency ControlMukesh Tekwani
 
Databases: Concurrency Control
Databases: Concurrency ControlDatabases: Concurrency Control
Databases: Concurrency ControlDamian T. Gordon
 
4. concurrency control
4. concurrency control4. concurrency control
4. concurrency controlAbDul ThaYyal
 

Destaque (18)

Validation based protocol
Validation based protocolValidation based protocol
Validation based protocol
 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
 
Main synopsis
Main synopsisMain synopsis
Main synopsis
 
Optimistic Algorithm and Concurrency Control Algorithm
Optimistic Algorithm and Concurrency Control AlgorithmOptimistic Algorithm and Concurrency Control Algorithm
Optimistic Algorithm and Concurrency Control Algorithm
 
Locking unit 1 topic 3
Locking unit 1 topic 3Locking unit 1 topic 3
Locking unit 1 topic 3
 
Tesina Sobri
Tesina SobriTesina Sobri
Tesina Sobri
 
DDoS Attack on DNS using infected IoT Devices
DDoS Attack on DNS using infected IoT DevicesDDoS Attack on DNS using infected IoT Devices
DDoS Attack on DNS using infected IoT Devices
 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
 
Transaction and concurrency control
Transaction and concurrency controlTransaction and concurrency control
Transaction and concurrency control
 
Concurrency (Distributed computing)
Concurrency (Distributed computing)Concurrency (Distributed computing)
Concurrency (Distributed computing)
 
CS6601 DISTRIBUTED SYSTEMS
CS6601 DISTRIBUTED SYSTEMSCS6601 DISTRIBUTED SYSTEMS
CS6601 DISTRIBUTED SYSTEMS
 
Validation Protocol
Validation ProtocolValidation Protocol
Validation Protocol
 
intelligent street light system using gsm ppt
intelligent street light system using gsm pptintelligent street light system using gsm ppt
intelligent street light system using gsm ppt
 
IOT and smart city in India
IOT and smart city in India IOT and smart city in India
IOT and smart city in India
 
Iot for smart city
Iot for smart cityIot for smart city
Iot for smart city
 
DBMS-chap 2-Concurrency Control
DBMS-chap 2-Concurrency ControlDBMS-chap 2-Concurrency Control
DBMS-chap 2-Concurrency Control
 
Databases: Concurrency Control
Databases: Concurrency ControlDatabases: Concurrency Control
Databases: Concurrency Control
 
4. concurrency control
4. concurrency control4. concurrency control
4. concurrency control
 

Semelhante a Distributed Database Concurrency Control Algorithms

On deferred constraints in distributed database systems
On deferred constraints in distributed database systemsOn deferred constraints in distributed database systems
On deferred constraints in distributed database systemsijma
 
DBF-Lecture11-Chapter12.pptDatabase Principles Fundam.docx
DBF-Lecture11-Chapter12.pptDatabase Principles Fundam.docxDBF-Lecture11-Chapter12.pptDatabase Principles Fundam.docx
DBF-Lecture11-Chapter12.pptDatabase Principles Fundam.docxrandyburney60861
 
Vol 4 No 1 - August 2013
Vol 4 No 1 - August 2013Vol 4 No 1 - August 2013
Vol 4 No 1 - August 2013ijcsbi
 
Transaction management
Transaction managementTransaction management
Transaction managementArchanaMani2
 
IRJET- Study of Blockchain and its Concepts
IRJET-  	  Study of Blockchain and its ConceptsIRJET-  	  Study of Blockchain and its Concepts
IRJET- Study of Blockchain and its ConceptsIRJET Journal
 
60141457-Oracle-Golden-Gate-Presentation.ppt
60141457-Oracle-Golden-Gate-Presentation.ppt60141457-Oracle-Golden-Gate-Presentation.ppt
60141457-Oracle-Golden-Gate-Presentation.pptpadalamail
 
Operating system Interview Questions
Operating system Interview QuestionsOperating system Interview Questions
Operating system Interview QuestionsKuntal Bhowmick
 
Real time eventual consistency
Real time eventual consistencyReal time eventual consistency
Real time eventual consistencyijfcstjournal
 
Whitepaper TRANSCONNECT - EN | SQL Projekt AG
Whitepaper TRANSCONNECT - EN | SQL Projekt AG Whitepaper TRANSCONNECT - EN | SQL Projekt AG
Whitepaper TRANSCONNECT - EN | SQL Projekt AG SQL Projekt AG
 
concurrency control.ppt
concurrency control.pptconcurrency control.ppt
concurrency control.pptBikalAdhikari4
 
Glap a global loopback anomaly prevention mechanism for multi level distribu...
Glap  a global loopback anomaly prevention mechanism for multi level distribu...Glap  a global loopback anomaly prevention mechanism for multi level distribu...
Glap a global loopback anomaly prevention mechanism for multi level distribu...ijdms
 
Blockchain Technology Review and Its Scope
Blockchain Technology Review and Its ScopeBlockchain Technology Review and Its Scope
Blockchain Technology Review and Its ScopeIRJET Journal
 
Secure Mining of Association Rules in Horizontally Distributed Databases
Secure Mining of Association Rules in Horizontally Distributed DatabasesSecure Mining of Association Rules in Horizontally Distributed Databases
Secure Mining of Association Rules in Horizontally Distributed DatabasesIJSRD
 
Fair and trustworthy: Lock-free enhanced tendermint blockchain algorithm
Fair and trustworthy: Lock-free enhanced tendermint blockchain algorithmFair and trustworthy: Lock-free enhanced tendermint blockchain algorithm
Fair and trustworthy: Lock-free enhanced tendermint blockchain algorithmTELKOMNIKA JOURNAL
 

Semelhante a Distributed Database Concurrency Control Algorithms (20)

On deferred constraints in distributed database systems
On deferred constraints in distributed database systemsOn deferred constraints in distributed database systems
On deferred constraints in distributed database systems
 
DBF-Lecture11-Chapter12.pptDatabase Principles Fundam.docx
DBF-Lecture11-Chapter12.pptDatabase Principles Fundam.docxDBF-Lecture11-Chapter12.pptDatabase Principles Fundam.docx
DBF-Lecture11-Chapter12.pptDatabase Principles Fundam.docx
 
Vol 4 No 1 - August 2013
Vol 4 No 1 - August 2013Vol 4 No 1 - August 2013
Vol 4 No 1 - August 2013
 
Dbms voc 5 unit
Dbms voc 5 unitDbms voc 5 unit
Dbms voc 5 unit
 
Transaction management
Transaction managementTransaction management
Transaction management
 
chp13.pdf
chp13.pdfchp13.pdf
chp13.pdf
 
IRJET- Study of Blockchain and its Concepts
IRJET-  	  Study of Blockchain and its ConceptsIRJET-  	  Study of Blockchain and its Concepts
IRJET- Study of Blockchain and its Concepts
 
60141457-Oracle-Golden-Gate-Presentation.ppt
60141457-Oracle-Golden-Gate-Presentation.ppt60141457-Oracle-Golden-Gate-Presentation.ppt
60141457-Oracle-Golden-Gate-Presentation.ppt
 
Operating system Interview Questions
Operating system Interview QuestionsOperating system Interview Questions
Operating system Interview Questions
 
Real time eventual consistency
Real time eventual consistencyReal time eventual consistency
Real time eventual consistency
 
Whitepaper TRANSCONNECT - EN | SQL Projekt AG
Whitepaper TRANSCONNECT - EN | SQL Projekt AG Whitepaper TRANSCONNECT - EN | SQL Projekt AG
Whitepaper TRANSCONNECT - EN | SQL Projekt AG
 
Vani dbms
Vani dbmsVani dbms
Vani dbms
 
concurrency control.ppt
concurrency control.pptconcurrency control.ppt
concurrency control.ppt
 
Glap a global loopback anomaly prevention mechanism for multi level distribu...
Glap  a global loopback anomaly prevention mechanism for multi level distribu...Glap  a global loopback anomaly prevention mechanism for multi level distribu...
Glap a global loopback anomaly prevention mechanism for multi level distribu...
 
Blockchain Technology Review and Its Scope
Blockchain Technology Review and Its ScopeBlockchain Technology Review and Its Scope
Blockchain Technology Review and Its Scope
 
Secure Mining of Association Rules in Horizontally Distributed Databases
Secure Mining of Association Rules in Horizontally Distributed DatabasesSecure Mining of Association Rules in Horizontally Distributed Databases
Secure Mining of Association Rules in Horizontally Distributed Databases
 
UNIT II.pptx
UNIT II.pptxUNIT II.pptx
UNIT II.pptx
 
Fair and trustworthy: Lock-free enhanced tendermint blockchain algorithm
Fair and trustworthy: Lock-free enhanced tendermint blockchain algorithmFair and trustworthy: Lock-free enhanced tendermint blockchain algorithm
Fair and trustworthy: Lock-free enhanced tendermint blockchain algorithm
 
Concurrent control
Concurrent controlConcurrent control
Concurrent control
 
F017213747
F017213747F017213747
F017213747
 

Último

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 

Último (20)

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 

Distributed Database Concurrency Control Algorithms

  • 2. Over view Of Presentation Distributed Concurrency Control. Distributed Concurrency control Algorithms. Structure Of Distributed transection. Distributed Two phase locking(2PL). Wound wait(WW). Basic timestamp Ordering(BTO). Distributed Optimistic(OPT). 8/26/2016 2 DISTRIBUTED DATABASE MENAGEMENT SYSTEM
  • 3. Distributed  A distributed database is a single logical database that is spread physically across computers in multiple locations that are connected by data communication links.  Distributed database is a kind of virtual database whose component parts are physically stored in a number of distinct real databases at a number of distinct locations 8/26/2016 3 DISTRIBUTED DATABASE MENAGEMENT SYSTEM
  • 4. Concurrency  A situation in which two or more persons access the same record simultaneously is called Concurrency.  Concurrency control involves the synchronization of accesses to the distributed database , such that the integrity of the database is maintained. 8/26/2016 4 DISTRIBUTED DATABASE MENAGEMENT SYSTEM
  • 5. Concurrency  The concurrency control problem in a distributed context is somewhat different than in a centralized framework.  One not only has to worry about the integrity of a single database, but also about the consistency of multiple copies of the database.  The condition that requires all the values of multiple copies of every data item to converge to the same value is called Mutual consistency. 8/26/2016 5 DISTRIBUTED DATABASE MENAGEMENT SYSTEM
  • 6. Distributed Concurrency Control Algorithm  we consider some of the distributed concurrency control algorithms. We summarize the salient aspects of these four algorithms in this section.  In order to do this, we must first explain the structure that we have assumed for distributed transactions.  Before discussing the algorithms, we need to get an idea about the distributed transactions. 8/26/2016 6 DISTRIBUTED DATABASE MENAGEMENT SYSTEM
  • 7. Structure Of Distributed Transection(cont.)  A distributed transaction is a transaction that runs in multiple processes, usually on several machines.  Each process works for the transaction.  Distributed transaction processing systems are designed to facilitate transactions that span heterogeneous, transaction-aware resource managers in a distributed environment . 8/26/2016 7 DISTRIBUTED DATABASE MENAGEMENT SYSTEM
  • 8. Structure Of Distributed Transection (cont.)  The execution of a distributed transaction requires coordination between a global transaction management system and all the local resource managers of all the involved systems.  The resource manager and transaction processing monitor are the two primary elements of any distributed transactional system.  Distributed transactions, like local transactions, must observe the ACID properties. However, maintenance of these properties is very complicated for distributed transactions because a failure can occur in any process 8/26/2016 8 DISTRIBUTED DATABASE MENAGEMENT SYSTEM
  • 9. Structure Of Distributed Transection (cont.)  If such a failure occurs, each process must undo any work that has already been done on behalf of the transaction.  A distributed transaction processing system maintains the ACID properties in distributed transactions by using two features:  Recoverable processes: Recoverable processes log their actions and therefore can restore earlier states if a failure occurs.  A commit protocol: A commit protocol allows multiple processes to coordinate the committing or aborting of a transaction. The most common commit protocol is the two-phase commit protocol. 8/26/2016 9 DISTRIBUTED DATABASE MENAGEMENT SYSTEM
  • 10. Distributed Two Phase Locking(2PL)  In order to ensure serializability of parallel executed transactions elaborated different methods of concurrency control.  One of these methods is locking method. There are different forms of locking method.  Two phase locking protocol is one of the basic concurrency control protocols in distributed database systems.  The main approach of this protocol is “read any, write all”. 8/26/2016 10 DISTRIBUTED DATABASE MENAGEMENT SYSTEM
  • 11. Distributed Two Phase Locking  Transactions set read locks on items that they read, and they convert their read locks to write locks on items that need to be updated.  To read an item, it suffices to set a read lock on any copy of the item, so the local copy is locked; to update an item, write locks are required on all copies.  Write locks are obtained as the transaction executes, with the transaction blocking on a write request until all of the copies of the item to be updated have been successfully locked 8/26/2016 11 DISTRIBUTED DATABASE MENAGEMENT SYSTEM
  • 12. Distributed Two Phase Locking(cont.)  The 2PL Protocol oversees locks by determining when transactions can acquire and release locks.  The 2PL protocol forces each transaction to make a lock or unlock request in two steps:  Growing Phase: A transaction may obtain locks but may not release any locks.  Shrinking Phase: A transaction may release locks but not obtain any new lock.  The transaction first enters into the Growing Phase, makes requests for required locks, then gets into the Shrinking phase where it releases all locks and cannot make any more requests 8/26/2016 12 DISTRIBUTED DATABASE MENAGEMENT SYSTEM
  • 13. Wound wait  The second algorithm is the distributed wound-wait locking algorithm.  It follows the same approach as the 2 PL protocol. The difference lies in the fact that it differs from 2PL in its handling of the deadlock problem: unlike 2PL protocol, rather than maintaining waits-for information and then checking for local and global deadlocks, deadlocks are prevented via the use of timestamps in this algorithm. 8/26/2016 13 DISTRIBUTED DATABASE MENAGEMENT SYSTEM
  • 14. Example Of Wound Wait Example-:Wound wait algorithm T1 is allowed to T(T1)>t(T2) Wait T(T1<t(T2) Abort and rolled back 8/26/2016 14 DISTRIBUTED DATABASE MENAGEMENT SYSTEM
  • 15. Wound wait(ww)  Each transaction is numbered according to its initial startup time, and younger transactions are prevented from making older ones wait.  If an older transaction requests a lock, and if the request would lead to the older transaction waiting for a younger transaction, the younger transaction is “wounded” – it is restarted unless it is already in the second phase of its commit protocol.  Younger transactions can wait for older transactions so that the possibility of deadlocks is eliminated [2]. 8/26/2016 15 DISTRIBUTED DATABASE MENAGEMENT SYSTEM
  • 16. DISTRIBUTED DATABASE MENAGEMENT SYSTEM 16 BASIC TIMESTAMP ORDENING (BTO)  A timestamp is a unique identifier created by DDBMS to identify a transaction.  BTO associates timestamps with all recently accessed data items and requires that conflicting data accesses by transactions be performed in timestamp order .  Typically, timestamp values are assigned in the order in which the transactions are submitted to the system. The idea for this scheme is to order the transactions based on their timestamps.  A schedule in which the transactions participate is then serialize able, and the equivalent serial schedule has the transactions in order of their timestamp values. This is called timestamp ordering (TO). 8/26/2016
  • 17. DISTRIBUTED DATABASE MENAGEMENT SYSTEM 17 BASIC TRANSITION ORDENING(cont.)  When a read request is received for an item, it is permitted if the timestamp of the requester exceeds the item’s write timestamp.  When a write request is received, it is permitted if the requester’s timestamp exceeds the read timestamp of the item; in the event that the timestamp of the requester is less than the write timestamp of the item, the update is simply ignored.  For replicated data, the “read any, write all” approach is used, so a read request may be sent to any copy while a write request must be sent to all copies.  Integration of the algorithm with two phase commit is accomplished as follows: Writers keep their updates in a private workspace until commit time. 8/26/2016
  • 18. DISTRIBUTED DATABASE MENAGEMENT SYSTEM 18 DISTRIBUTED OPTIMISTIC (OPT)  The fourth algorithm is the distributed, timestamp-based, optimistic concurrency control algorithm. which operates by exchanging certification information during the commit protocol.  For each data item, a read timestamp and a write timestamp are maintained. Transactions may read and update data items freely, storing any updates into a local workspace until commit time.  For each read, the transaction must remember the version identifier (i.e., write timestamp) associated with the item when it was read. 8/26/2016
  • 19. DISTRIBUTED DATABASE MENAGEMENT SYSTEM 19 DISTRIBUTED OPTIMISTIC (cont.)  Then, when all of the transaction’s cohorts have completed their work, and have reported back to the master, the transaction is assigned a globally unique timestamp.  This time stamp is sent to each cohort in the “prepare to commit” message ,and it is used to locally certify all of its reads and writes as follows [2]:  A read request is certified if-: (i) The version that was read is still the current version of the item, and (ii) No write with a newer timestamp has already been locally certified.  A write request is certified if-: (i) No later reads have been certified and subsequently committed, and (ii) No later reads have been locally certified already [2]. 8/26/2016
  • 20. DISTRIBUTED DATABASE MENAGEMENT SYSTEM 20 CONCLUSIONS  The distributed database system that is considered to be more reliable than centralized database system.  We also describe the concurrency control algorithms-: distributed 2PL, wound-wait, basic timestamp ordering and distributed optimistic algorithm.  It is really important for database to have the ACID properties to perform. 8/26/2016
  • 21. DISTRIBUTED DATABASE MENAGEMENT SYSTEM 21 REFRENCES PRINCIPLES OF DISTRIBUTED SYSTEM by: M. Tamer Ozsu and Patric Valduriez 8/26/2016
  • 22. DISTRIBUTED DATABASE MENAGEMENT SYSTEM 22 8/26/2016