SlideShare a Scribd company logo
Management of
distributed transactions
Nileshwari Desai
A 216
Outline
โ€ข Introduction
โ€ข Framework
โ€ข Supporting atomicity
โ€ข Concurrency control
โ€ข Summarization
Introduction
๏ถ The management of distributed transactions
require dealing with several problems which
are strictly interconnected, like-
a. Reliability
b. Concurrency control
c. Efficient utilization of the resources of the
whole system.
Framework for transaction
management
1. Properties of transactions
2. Goals of transaction management
3. Distributed transactions
1. Properties of transactions
โ€ข Atomicity
โ€ข Durability
โ€ข Serializability
โ€ข Isolation
2. Goals of transaction management
โ€ข CPU and main memory utilization
โ€ข Control messages
โ€ข Response time
โ€ข Availability
Lets summarize!
โ€ข The goal of transaction management in a
distributed database is to control the execution
of transactions so that:
1. Transactions have atomicity, durability,
serializability and isolation properties.
2. Their cost in terms of main memory, CPU and
number of transmitted control messages and
their response time are minimized.
3. The availability of the system is maximized.
3. Distributed transactions
โ€ข Agent: An agent is a local process which
performs some actions on behalf of an
application.
An updating transaction
Updating a master tape is fault tolerant: If a run fails for any reason, all the tape
could be rewound and the job restarted with no harm done.
Basic Transaction Primitives
Primitive Description
BEGIN_TRANSACTION Make the start of a transaction
END_TRANSACTION
Terminate the transaction and try to
commit
ABORT_TRANSACTION
Kill the transaction and restore the old
values
READ Read data from a file, a table
WRITE Write data to a file, a table
Transaction execution
Nested versus distributed transaction
Flat and nested transactions
T
S
1
T22
T21
T12
T11
T2
T1
T
S
3
S
2
S
2
S
6
S
5
S
4
S
1
S
3
(a) Distributed flat (b) Distributed nested
S
7
S
0
A circle (Si) denotes a
server, and a
square (Tj)
represents a
sub-
transaction.
๏ถ Flat transaction send out requests to different servers and each request is
completed before client goes to the next one.
๏ถ Nested transaction allows sub-transactions at the same level to execute
concurrently.
Supporting atomicity of distributed
transactions
โ€ข Recovery in centralized databases
โ€ข Communication failures in distributed
databases.
โ€ข Recovery of distributed transactions.
โ€ข The 2-Phase-commitment protocol
1-phase atomic commit protocol
โ€ข A transaction comes to an end when the client requests
that a transaction be committed or aborted.
โ€ข Simple way is: coordinator to communicate the commit
or abort request to all of the participants in the
transaction and to keep on repeating the request until all
of them have acknowledged that they had carried it out.
โ€ข Inadequate because when the client requests a commit, it
does not allow a server to make a unilateral decision to
abort a transaction. E.g. deadlock avoidance may force a
transaction to abort at a server when locking is used. So
any server may fail or abort and client is not aware.
2-phase commit protocol
โ€ข Allow any participant to abort its part of a
transaction. Due to atomicity, the whole transaction
must also be aborted.
โ€ข In the first phase, each participant votes for the
transaction to be committed or aborted. Once voted
to commit, not allowed to abort it. So before votes to
commit, it must ensure that it will eventually be able
to carry out its part, even if it fails and is replaced.
โ€ข A participant is said to be in a prepared state if it
will eventually be able to commit it. So each
participant needs to save the altered objects in the
permanent storage device together with its status-
prepared.
2-phase commit protocol
โ€ข In the second phase, every participant in the
transaction carries out the joint decision. If any one
participant votes to abort, the decision must be to
abort. If all the participants vote to commit, then the
decision is to commit the transaction.
โ€ข The problem is to ensure that all of the participants
vote and that they all reach the same decision. It is
an example of consensus. It is simple if no error
occurs. However, it should work when servers fail,
message lost or servers are temporarily unable to
communicate with one another.
2-phase commit protocol
โ€ข If the client requests abort, or if the transaction is
aborted by one of the participants, the coordinator
informs the participants immediately.
โ€ข It is when the client asks the coordinator to commit
the transaction that two-phase commit protocol
comes into use.
โ€ข In the first phase, the coordinator asks all the
participants if they are prepared to commit; and in
the second, it tells them to commit or abort the
transaction.
Operations for 2-phase commit
protocol
โ€ข canCommit?(trans)-> Yes / No
โ–ซ Call from coordinator to participant to ask whether it can commit a transaction.
Participant replies with its vote.
โ€ข doCommit(trans)
โ–ซ Call from coordinator to participant to tell participant to commit its part of a
transaction.
โ€ข doAbort(trans)
โ–ซ Call from coordinator to participant to tell participant to abort its part of a
transaction.
โ€ข haveCommitted(trans, participant)
โ–ซ Call from participant to coordinator to confirm that it has committed the
transaction.
โ€ข getDecision(trans) -> Yes / No
โ–ซ Call from participant to coordinator to ask for the decision on a transaction after it
has voted Yes but has still had no reply after some delay. Used to recover from
server crash or delayed messages.
Communication in 2-phase commit
protocol
canCommit?
Yes
doCommit
haveCommitted
Coordinator
1
3
(waiting for votes)
committed
done
prepared to commit
step
Participant
2
4
(uncertain)
prepared to commit
committed
statusstepstatus
Concurrency control for distributed
transactions
โ€ข Concurrency control based on locking in
centralized databases.
โ€ข Concurrency control based on locking in
distributed databases.
Concurrency control in distributed
transactions
โ€ข Concurrency control for distributed
transactions: each server applies local
concurrency control to its own objects, which
ensure transactions serializability locally.
โ€ข However, the members of a collection of servers
of distributed transactions are jointly
responsible for ensuring that they are performed
in a serially equivalent manner. Thus global
serializability is required.
locks
โ€ข Lock manager at each server decide whether to
grant a lock or make the requesting transaction wait.
โ€ข However, it cannot release any locks until it knows
that the transaction has been committed or aborted
at all the servers involved in the transaction.
โ€ข A lock managers in different servers set their locks
independently of one another. It is possible that
different servers may impose different orderings on
transactions.
Timestamp ordering concurrency
control
โ€ข In a single server transaction, the coordinator issues
a unique timestamp to each transaction when it
starts. Serial equivalence is enforced by committing
the versions of objects in the order of the
timestamps of transactions that accessed them.
โ€ข In distributed transactions, we require that each
coordinator issue globally unique time stamps. The
coordinators must agree as to the ordering of their
timestamps. <local timestamp, server-id>, the
agreed ordering of pairs of timestamps is based on a
comparison in which the server-id is less significant.
โ€ข The timestamp is passed to each server whose
objects perform an operation in the transaction.
Timestamp ordering concurrency
control
โ€ข To achieve the same ordering at all the servers, The
servers of distributed transactions are jointly
responsible for ensuring that they are performed in
a serially equivalent manner. E.g. If T commits after
U at server X, T must commits after U at server Y.
โ€ข Conflicts are resolved as each operation is
performed. If the resolution of a conflict requires a
transaction to be aborted, the coordinator will be
informed and it will abort the transaction at all the
participants.
locking
T U
Write(A) at X locks A
Write(B) at Y locks B
Read(B) at Y waits for U
Read(A) at X waits for T
****************************************************
**************
T before U in one server X and U before T in server Y.
These different ordering can lead to cyclic
dependencies between transactions and a distributed
deadlock situation arises.
Distributed deadlock
โ€ข Deadlocks can arise within a single server when
locking is used for concurrency control. Servers
must either prevent or detect and resolve
deadlocks.
โ€ข Using timeout to resolve deadlock is a clumsy
approach. Why? Another way is to detect
deadlock by detecting cycles in a wait for graph.
Distributed transaction managers must ensure that all transactions have the
atomicity, durability, seriability and isolation properties. In most systems, this is
obtained by implementing on top of existing local transaction managers the 2-phase-
commitment protocol for reliability,2-phase-locking for concurrency control, and
timeouts for deadlock detection.
The 2-phase-commitment protocol ensures that the subtransactions of the same
transaction will either all commit or all abort, in spite of the possible failures. 2-phase-
commitment is resilient to any failure in which no log information is lost. The 2-
phase-locking mechanism requires that all subtransactions acquire locks in the
growing phase and release locks in the shrinking phase. Timeout mechanisms for
deadlock detection simply abort those transactions which are in wait, possibly for a
deadlock.
Several computation and communication structures are possible for distributed
transaction managers. The computation can use processes permanently assigned to
transactions, or servers dynamically bound to them. Processes can have a centralized
structure, in which one agent activates all other agents, or a hierarchical structure, in
which each agent can in turn activate other agents. The communication can use
sessions or datagrams. The communication structure of the commitment protocol can
be centralized, hierarchical, linear, or distributed.
Any questions???
Ad

More Related Content

What's hot (20)

Database , 12 Reliability
Database , 12 ReliabilityDatabase , 12 Reliability
Database , 12 Reliability
Ali Usman
ย 
Distributed DBMS - Unit 6 - Query Processing
Distributed DBMS - Unit 6 - Query ProcessingDistributed DBMS - Unit 6 - Query Processing
Distributed DBMS - Unit 6 - Query Processing
Gyanmanjari Institute Of Technology
ย 
Distributed concurrency control
Distributed concurrency controlDistributed concurrency control
Distributed concurrency control
Binte fatima
ย 
Query processing in Distributed Database System
Query processing in Distributed Database SystemQuery processing in Distributed Database System
Query processing in Distributed Database System
Meghaj Mallick
ย 
Distributed DBMS - Unit 5 - Semantic Data Control
Distributed DBMS - Unit 5 - Semantic Data ControlDistributed DBMS - Unit 5 - Semantic Data Control
Distributed DBMS - Unit 5 - Semantic Data Control
Gyanmanjari Institute Of Technology
ย 
Distributed design alternatives
Distributed design alternativesDistributed design alternatives
Distributed design alternatives
Pooja Dixit
ย 
DDBMS Paper with Solution
DDBMS Paper with SolutionDDBMS Paper with Solution
DDBMS Paper with Solution
Gyanmanjari Institute Of Technology
ย 
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUESDISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
AAKANKSHA JAIN
ย 
Introduction to Distributed System
Introduction to Distributed SystemIntroduction to Distributed System
Introduction to Distributed System
Sunita Sahu
ย 
Deadlock management
Deadlock managementDeadlock management
Deadlock management
Ahmed kasim
ย 
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
ย 
Distributed transaction
Distributed transactionDistributed transaction
Distributed transaction
MohitKothari26
ย 
Agreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared MemoryAgreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared Memory
SHIKHA GAUTAM
ย 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system
Sunita Sahu
ย 
Query processing and optimization (updated)
Query processing and optimization (updated)Query processing and optimization (updated)
Query processing and optimization (updated)
Ravinder Kamboj
ย 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
Subhasish Pati
ย 
Lec 7 query processing
Lec 7 query processingLec 7 query processing
Lec 7 query processing
Md. Mashiur Rahman
ย 
Dichotomy of parallel computing platforms
Dichotomy of parallel computing platformsDichotomy of parallel computing platforms
Dichotomy of parallel computing platforms
Syed Zaid Irshad
ย 
Ddbms1
Ddbms1Ddbms1
Ddbms1
pranjal_das
ย 
Join ordering in fragment queries
Join ordering in fragment queriesJoin ordering in fragment queries
Join ordering in fragment queries
Ifzalhussainkhan
ย 
Database , 12 Reliability
Database , 12 ReliabilityDatabase , 12 Reliability
Database , 12 Reliability
Ali Usman
ย 
Distributed concurrency control
Distributed concurrency controlDistributed concurrency control
Distributed concurrency control
Binte fatima
ย 
Query processing in Distributed Database System
Query processing in Distributed Database SystemQuery processing in Distributed Database System
Query processing in Distributed Database System
Meghaj Mallick
ย 
Distributed design alternatives
Distributed design alternativesDistributed design alternatives
Distributed design alternatives
Pooja Dixit
ย 
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUESDISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
AAKANKSHA JAIN
ย 
Introduction to Distributed System
Introduction to Distributed SystemIntroduction to Distributed System
Introduction to Distributed System
Sunita Sahu
ย 
Deadlock management
Deadlock managementDeadlock management
Deadlock management
Ahmed kasim
ย 
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
ย 
Distributed transaction
Distributed transactionDistributed transaction
Distributed transaction
MohitKothari26
ย 
Agreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared MemoryAgreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared Memory
SHIKHA GAUTAM
ย 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system
Sunita Sahu
ย 
Query processing and optimization (updated)
Query processing and optimization (updated)Query processing and optimization (updated)
Query processing and optimization (updated)
Ravinder Kamboj
ย 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
Subhasish Pati
ย 
Lec 7 query processing
Lec 7 query processingLec 7 query processing
Lec 7 query processing
Md. Mashiur Rahman
ย 
Dichotomy of parallel computing platforms
Dichotomy of parallel computing platformsDichotomy of parallel computing platforms
Dichotomy of parallel computing platforms
Syed Zaid Irshad
ย 
Join ordering in fragment queries
Join ordering in fragment queriesJoin ordering in fragment queries
Join ordering in fragment queries
Ifzalhussainkhan
ย 

Similar to management of distributed transactions (20)

Management of Distributed Transactions
Management of Distributed TransactionsManagement of Distributed Transactions
Management of Distributed Transactions
Ankita Dubey
ย 
4. concurrency control
4. concurrency control4. concurrency control
4. concurrency control
AbDul ThaYyal
ย 
deadlock prevention
deadlock preventiondeadlock prevention
deadlock prevention
Nilu Desai
ย 
Chapter 13
Chapter 13Chapter 13
Chapter 13
AbDul ThaYyal
ย 
Unit v-Distributed Transaction and Replication
Unit v-Distributed Transaction and ReplicationUnit v-Distributed Transaction and Replication
Unit v-Distributed Transaction and Replication
Dhivyaa C.R
ย 
UNIT IV DIS.pptx
UNIT IV DIS.pptxUNIT IV DIS.pptx
UNIT IV DIS.pptx
Premkumar R
ย 
Fault Tolerant and Distributed System
Fault Tolerant and Distributed SystemFault Tolerant and Distributed System
Fault Tolerant and Distributed System
sreenivas1591
ย 
Transaction management transparencies
Transaction management transparenciesTransaction management transparencies
Transaction management transparencies
Mohamed Zeinelabdeen Abdelgader Farh jber
ย 
module-4.1-Class notes_R and DD_basket-IV -.pdf
module-4.1-Class notes_R and DD_basket-IV -.pdfmodule-4.1-Class notes_R and DD_basket-IV -.pdf
module-4.1-Class notes_R and DD_basket-IV -.pdf
ritikkumarchaudhury7
ย 
Understanding Transactions in Databases.pptx
Understanding Transactions in Databases.pptxUnderstanding Transactions in Databases.pptx
Understanding Transactions in Databases.pptx
Mahmud Hasan Tanvir
ย 
Transaction Management, Concurrency Control and Deadlocks.pdf
Transaction Management, Concurrency Control and Deadlocks.pdfTransaction Management, Concurrency Control and Deadlocks.pdf
Transaction Management, Concurrency Control and Deadlocks.pdf
beshahashenafe20
ย 
Synchronization
SynchronizationSynchronization
Synchronization
Sara shall
ย 
Unit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptxUnit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptx
Koteswari Kasireddy
ย 
Concurrency Control in Distributed Systems.pptx
Concurrency Control in Distributed Systems.pptxConcurrency Control in Distributed Systems.pptx
Concurrency Control in Distributed Systems.pptx
MArshad35
ย 
Transaction Processing its properties & States
Transaction Processing its properties & StatesTransaction Processing its properties & States
Transaction Processing its properties & States
Meghaj Mallick
ย 
Unit iv -Transactions
Unit iv -TransactionsUnit iv -Transactions
Unit iv -Transactions
Dhivyaa C.R
ย 
UNIT-4-Transactionstates and processing ppt.pptx
UNIT-4-Transactionstates and  processing ppt.pptxUNIT-4-Transactionstates and  processing ppt.pptx
UNIT-4-Transactionstates and processing ppt.pptx
Uma Kakarlapudi
ย 
Process management in Operating System_Unit-2
Process management in Operating System_Unit-2Process management in Operating System_Unit-2
Process management in Operating System_Unit-2
mohanaps
ย 
Concurrency Control
Concurrency ControlConcurrency Control
Concurrency Control
Nishant Munjal
ย 
enc=encoded=TlJst0_SHq0cPRhLS74QDXTP4FpU303sSqpyVVkfhckA93UCiZrRF0QVNAFGmuGu9...
enc=encoded=TlJst0_SHq0cPRhLS74QDXTP4FpU303sSqpyVVkfhckA93UCiZrRF0QVNAFGmuGu9...enc=encoded=TlJst0_SHq0cPRhLS74QDXTP4FpU303sSqpyVVkfhckA93UCiZrRF0QVNAFGmuGu9...
enc=encoded=TlJst0_SHq0cPRhLS74QDXTP4FpU303sSqpyVVkfhckA93UCiZrRF0QVNAFGmuGu9...
DHANUSHKUMARKS
ย 
Management of Distributed Transactions
Management of Distributed TransactionsManagement of Distributed Transactions
Management of Distributed Transactions
Ankita Dubey
ย 
4. concurrency control
4. concurrency control4. concurrency control
4. concurrency control
AbDul ThaYyal
ย 
deadlock prevention
deadlock preventiondeadlock prevention
deadlock prevention
Nilu Desai
ย 
Unit v-Distributed Transaction and Replication
Unit v-Distributed Transaction and ReplicationUnit v-Distributed Transaction and Replication
Unit v-Distributed Transaction and Replication
Dhivyaa C.R
ย 
UNIT IV DIS.pptx
UNIT IV DIS.pptxUNIT IV DIS.pptx
UNIT IV DIS.pptx
Premkumar R
ย 
Fault Tolerant and Distributed System
Fault Tolerant and Distributed SystemFault Tolerant and Distributed System
Fault Tolerant and Distributed System
sreenivas1591
ย 
module-4.1-Class notes_R and DD_basket-IV -.pdf
module-4.1-Class notes_R and DD_basket-IV -.pdfmodule-4.1-Class notes_R and DD_basket-IV -.pdf
module-4.1-Class notes_R and DD_basket-IV -.pdf
ritikkumarchaudhury7
ย 
Understanding Transactions in Databases.pptx
Understanding Transactions in Databases.pptxUnderstanding Transactions in Databases.pptx
Understanding Transactions in Databases.pptx
Mahmud Hasan Tanvir
ย 
Transaction Management, Concurrency Control and Deadlocks.pdf
Transaction Management, Concurrency Control and Deadlocks.pdfTransaction Management, Concurrency Control and Deadlocks.pdf
Transaction Management, Concurrency Control and Deadlocks.pdf
beshahashenafe20
ย 
Synchronization
SynchronizationSynchronization
Synchronization
Sara shall
ย 
Unit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptxUnit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptx
Koteswari Kasireddy
ย 
Concurrency Control in Distributed Systems.pptx
Concurrency Control in Distributed Systems.pptxConcurrency Control in Distributed Systems.pptx
Concurrency Control in Distributed Systems.pptx
MArshad35
ย 
Transaction Processing its properties & States
Transaction Processing its properties & StatesTransaction Processing its properties & States
Transaction Processing its properties & States
Meghaj Mallick
ย 
Unit iv -Transactions
Unit iv -TransactionsUnit iv -Transactions
Unit iv -Transactions
Dhivyaa C.R
ย 
UNIT-4-Transactionstates and processing ppt.pptx
UNIT-4-Transactionstates and  processing ppt.pptxUNIT-4-Transactionstates and  processing ppt.pptx
UNIT-4-Transactionstates and processing ppt.pptx
Uma Kakarlapudi
ย 
Process management in Operating System_Unit-2
Process management in Operating System_Unit-2Process management in Operating System_Unit-2
Process management in Operating System_Unit-2
mohanaps
ย 
Concurrency Control
Concurrency ControlConcurrency Control
Concurrency Control
Nishant Munjal
ย 
enc=encoded=TlJst0_SHq0cPRhLS74QDXTP4FpU303sSqpyVVkfhckA93UCiZrRF0QVNAFGmuGu9...
enc=encoded=TlJst0_SHq0cPRhLS74QDXTP4FpU303sSqpyVVkfhckA93UCiZrRF0QVNAFGmuGu9...enc=encoded=TlJst0_SHq0cPRhLS74QDXTP4FpU303sSqpyVVkfhckA93UCiZrRF0QVNAFGmuGu9...
enc=encoded=TlJst0_SHq0cPRhLS74QDXTP4FpU303sSqpyVVkfhckA93UCiZrRF0QVNAFGmuGu9...
DHANUSHKUMARKS
ย 
Ad

More from Nilu Desai (6)

data mining for terror attacks
data mining for terror attacksdata mining for terror attacks
data mining for terror attacks
Nilu Desai
ย 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
Nilu Desai
ย 
collaborative study on the cloud
collaborative study on the cloudcollaborative study on the cloud
collaborative study on the cloud
Nilu Desai
ย 
digital signature for SMS security
digital signature for SMS securitydigital signature for SMS security
digital signature for SMS security
Nilu Desai
ย 
Cookie replay attack unit wise presentation
Cookie replay attack  unit wise presentationCookie replay attack  unit wise presentation
Cookie replay attack unit wise presentation
Nilu Desai
ย 
Iris recognition system
Iris recognition systemIris recognition system
Iris recognition system
Nilu Desai
ย 
data mining for terror attacks
data mining for terror attacksdata mining for terror attacks
data mining for terror attacks
Nilu Desai
ย 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
Nilu Desai
ย 
collaborative study on the cloud
collaborative study on the cloudcollaborative study on the cloud
collaborative study on the cloud
Nilu Desai
ย 
digital signature for SMS security
digital signature for SMS securitydigital signature for SMS security
digital signature for SMS security
Nilu Desai
ย 
Cookie replay attack unit wise presentation
Cookie replay attack  unit wise presentationCookie replay attack  unit wise presentation
Cookie replay attack unit wise presentation
Nilu Desai
ย 
Iris recognition system
Iris recognition systemIris recognition system
Iris recognition system
Nilu Desai
ย 
Ad

Recently uploaded (20)

Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
ย 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
ย 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
ย 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
ย 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
ย 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
ย 
HCL Nomad Web โ€“ Best Practices and Managing Multiuser Environments
HCL Nomad Web โ€“ Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web โ€“ Best Practices and Managing Multiuser Environments
HCL Nomad Web โ€“ Best Practices and Managing Multiuser Environments
panagenda
ย 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
ย 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
ย 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
ย 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
ย 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
ย 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
ย 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
ย 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
ย 
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
ย 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
ย 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
ย 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
ย 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
ย 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
ย 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
ย 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
ย 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
ย 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
ย 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
ย 
HCL Nomad Web โ€“ Best Practices and Managing Multiuser Environments
HCL Nomad Web โ€“ Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web โ€“ Best Practices and Managing Multiuser Environments
HCL Nomad Web โ€“ Best Practices and Managing Multiuser Environments
panagenda
ย 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
ย 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
ย 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
ย 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
ย 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
ย 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
ย 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
ย 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
ย 
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
ย 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
ย 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
ย 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
ย 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
ย 

management of distributed transactions

  • 2. Outline โ€ข Introduction โ€ข Framework โ€ข Supporting atomicity โ€ข Concurrency control โ€ข Summarization
  • 3. Introduction ๏ถ The management of distributed transactions require dealing with several problems which are strictly interconnected, like- a. Reliability b. Concurrency control c. Efficient utilization of the resources of the whole system.
  • 4. Framework for transaction management 1. Properties of transactions 2. Goals of transaction management 3. Distributed transactions
  • 5. 1. Properties of transactions โ€ข Atomicity โ€ข Durability โ€ข Serializability โ€ข Isolation
  • 6. 2. Goals of transaction management โ€ข CPU and main memory utilization โ€ข Control messages โ€ข Response time โ€ข Availability
  • 7. Lets summarize! โ€ข The goal of transaction management in a distributed database is to control the execution of transactions so that: 1. Transactions have atomicity, durability, serializability and isolation properties. 2. Their cost in terms of main memory, CPU and number of transmitted control messages and their response time are minimized. 3. The availability of the system is maximized.
  • 8. 3. Distributed transactions โ€ข Agent: An agent is a local process which performs some actions on behalf of an application.
  • 9. An updating transaction Updating a master tape is fault tolerant: If a run fails for any reason, all the tape could be rewound and the job restarted with no harm done.
  • 10. Basic Transaction Primitives Primitive Description BEGIN_TRANSACTION Make the start of a transaction END_TRANSACTION Terminate the transaction and try to commit ABORT_TRANSACTION Kill the transaction and restore the old values READ Read data from a file, a table WRITE Write data to a file, a table
  • 13. Flat and nested transactions T S 1 T22 T21 T12 T11 T2 T1 T S 3 S 2 S 2 S 6 S 5 S 4 S 1 S 3 (a) Distributed flat (b) Distributed nested S 7 S 0 A circle (Si) denotes a server, and a square (Tj) represents a sub- transaction.
  • 14. ๏ถ Flat transaction send out requests to different servers and each request is completed before client goes to the next one. ๏ถ Nested transaction allows sub-transactions at the same level to execute concurrently.
  • 15. Supporting atomicity of distributed transactions โ€ข Recovery in centralized databases โ€ข Communication failures in distributed databases. โ€ข Recovery of distributed transactions. โ€ข The 2-Phase-commitment protocol
  • 16. 1-phase atomic commit protocol โ€ข A transaction comes to an end when the client requests that a transaction be committed or aborted. โ€ข Simple way is: coordinator to communicate the commit or abort request to all of the participants in the transaction and to keep on repeating the request until all of them have acknowledged that they had carried it out. โ€ข Inadequate because when the client requests a commit, it does not allow a server to make a unilateral decision to abort a transaction. E.g. deadlock avoidance may force a transaction to abort at a server when locking is used. So any server may fail or abort and client is not aware.
  • 17. 2-phase commit protocol โ€ข Allow any participant to abort its part of a transaction. Due to atomicity, the whole transaction must also be aborted. โ€ข In the first phase, each participant votes for the transaction to be committed or aborted. Once voted to commit, not allowed to abort it. So before votes to commit, it must ensure that it will eventually be able to carry out its part, even if it fails and is replaced. โ€ข A participant is said to be in a prepared state if it will eventually be able to commit it. So each participant needs to save the altered objects in the permanent storage device together with its status- prepared.
  • 18. 2-phase commit protocol โ€ข In the second phase, every participant in the transaction carries out the joint decision. If any one participant votes to abort, the decision must be to abort. If all the participants vote to commit, then the decision is to commit the transaction. โ€ข The problem is to ensure that all of the participants vote and that they all reach the same decision. It is an example of consensus. It is simple if no error occurs. However, it should work when servers fail, message lost or servers are temporarily unable to communicate with one another.
  • 19. 2-phase commit protocol โ€ข If the client requests abort, or if the transaction is aborted by one of the participants, the coordinator informs the participants immediately. โ€ข It is when the client asks the coordinator to commit the transaction that two-phase commit protocol comes into use. โ€ข In the first phase, the coordinator asks all the participants if they are prepared to commit; and in the second, it tells them to commit or abort the transaction.
  • 20. Operations for 2-phase commit protocol โ€ข canCommit?(trans)-> Yes / No โ–ซ Call from coordinator to participant to ask whether it can commit a transaction. Participant replies with its vote. โ€ข doCommit(trans) โ–ซ Call from coordinator to participant to tell participant to commit its part of a transaction. โ€ข doAbort(trans) โ–ซ Call from coordinator to participant to tell participant to abort its part of a transaction. โ€ข haveCommitted(trans, participant) โ–ซ Call from participant to coordinator to confirm that it has committed the transaction. โ€ข getDecision(trans) -> Yes / No โ–ซ Call from participant to coordinator to ask for the decision on a transaction after it has voted Yes but has still had no reply after some delay. Used to recover from server crash or delayed messages.
  • 21. Communication in 2-phase commit protocol canCommit? Yes doCommit haveCommitted Coordinator 1 3 (waiting for votes) committed done prepared to commit step Participant 2 4 (uncertain) prepared to commit committed statusstepstatus
  • 22. Concurrency control for distributed transactions โ€ข Concurrency control based on locking in centralized databases. โ€ข Concurrency control based on locking in distributed databases.
  • 23. Concurrency control in distributed transactions โ€ข Concurrency control for distributed transactions: each server applies local concurrency control to its own objects, which ensure transactions serializability locally. โ€ข However, the members of a collection of servers of distributed transactions are jointly responsible for ensuring that they are performed in a serially equivalent manner. Thus global serializability is required.
  • 24. locks โ€ข Lock manager at each server decide whether to grant a lock or make the requesting transaction wait. โ€ข However, it cannot release any locks until it knows that the transaction has been committed or aborted at all the servers involved in the transaction. โ€ข A lock managers in different servers set their locks independently of one another. It is possible that different servers may impose different orderings on transactions.
  • 25. Timestamp ordering concurrency control โ€ข In a single server transaction, the coordinator issues a unique timestamp to each transaction when it starts. Serial equivalence is enforced by committing the versions of objects in the order of the timestamps of transactions that accessed them. โ€ข In distributed transactions, we require that each coordinator issue globally unique time stamps. The coordinators must agree as to the ordering of their timestamps. <local timestamp, server-id>, the agreed ordering of pairs of timestamps is based on a comparison in which the server-id is less significant. โ€ข The timestamp is passed to each server whose objects perform an operation in the transaction.
  • 26. Timestamp ordering concurrency control โ€ข To achieve the same ordering at all the servers, The servers of distributed transactions are jointly responsible for ensuring that they are performed in a serially equivalent manner. E.g. If T commits after U at server X, T must commits after U at server Y. โ€ข Conflicts are resolved as each operation is performed. If the resolution of a conflict requires a transaction to be aborted, the coordinator will be informed and it will abort the transaction at all the participants.
  • 27. locking T U Write(A) at X locks A Write(B) at Y locks B Read(B) at Y waits for U Read(A) at X waits for T **************************************************** ************** T before U in one server X and U before T in server Y. These different ordering can lead to cyclic dependencies between transactions and a distributed deadlock situation arises.
  • 28. Distributed deadlock โ€ข Deadlocks can arise within a single server when locking is used for concurrency control. Servers must either prevent or detect and resolve deadlocks. โ€ข Using timeout to resolve deadlock is a clumsy approach. Why? Another way is to detect deadlock by detecting cycles in a wait for graph.
  • 29. Distributed transaction managers must ensure that all transactions have the atomicity, durability, seriability and isolation properties. In most systems, this is obtained by implementing on top of existing local transaction managers the 2-phase- commitment protocol for reliability,2-phase-locking for concurrency control, and timeouts for deadlock detection. The 2-phase-commitment protocol ensures that the subtransactions of the same transaction will either all commit or all abort, in spite of the possible failures. 2-phase- commitment is resilient to any failure in which no log information is lost. The 2- phase-locking mechanism requires that all subtransactions acquire locks in the growing phase and release locks in the shrinking phase. Timeout mechanisms for deadlock detection simply abort those transactions which are in wait, possibly for a deadlock. Several computation and communication structures are possible for distributed transaction managers. The computation can use processes permanently assigned to transactions, or servers dynamically bound to them. Processes can have a centralized structure, in which one agent activates all other agents, or a hierarchical structure, in which each agent can in turn activate other agents. The communication can use sessions or datagrams. The communication structure of the commitment protocol can be centralized, hierarchical, linear, or distributed.