SlideShare a Scribd company logo
1 of 18
NADAR SARASWATHI COLLEGE OF
ARTS AND SCIENCE
THENI
Department of CS & IT
subject: Distributed computing
Topic: mutual exclusion and distributed transaction
Presented by: S.Swetha
M.sc(IT)
Mutual exclusion in distributed system
Mutual exclusion is a concurrency control
property which is introduced to prevent
race conditions. It is the requirement that
a process can not enter its critical section
while another concurrent process is
currently present or executing in its
critical section i.e only one process is
allowed to execute the critical section at
any given instance of time.
Mutual exclusion in single computer system
Vs. distributed system:
In single computer system, memory and
other resources are shared between
different processes.The status of shared
resources and the status of users is easily
available in the shared memory so with
the help of shared variable (For example:
Semaphores) mutual exclusion problem
can be easily solved.
Continue……
In Distributed systems, we neither have
shared memory nor a common physical
clock and there for we can not solve
mutual exclusion problem using shared
variables.To eliminate the mutual
exclusion problem in distributed system
approach based on message passing is
used.
A site in distributed system do not have
complete information of state of the
system due to lack of shared memory
and a common physical clock.
Requirements of Mutual exclusion
Algorithm:
■No Deadlock:
Two or more site should not
endlessly wait for any message that will
never arrive.
■No Starvation:
Every site who wants to
execute critical section should get an
opportunity to execute it in finite time.
Any site should not wait indefinitely to
execute critical section while other site
are repeatedly executing critical
section…
■Fairness:
Each site should get a fair chance
to execute critical section. Any request
to execute critical section must be
executed in the order they are made i.e
Critical section execution requests
should be executed in the order of their
arrival in the system.
■ FaultTolerance:
In case of failure, it should be able to recognize it by itself in order to
continue functioning without any disruption.
Solution to distributed mutual exclusion:
As we know shared variables or a local kernel
can not be used to implement mutual exclusion
in distributed systems. Message passing is a way
to implement mutual exclusion. Below are the
three approaches based on message passing to
implement mutual exclusion in distributed
systems:
1.
Token BasedAlgorithm:
■ A unique token is shared among all the sites.
■ If a site possesses the unique token, it is allowed to enter its critical section
■ This approach uses sequence number to order requests for the critical section.
■ Each requests for critical section contains a sequence number.This sequence number
is used to distinguish old and current requests.
■ This approach insures Mutual exclusion as the token is unique
■ Example:
■ Suzuki-Kasami’s BroadcastAlgorithm
Non-token based approach:
■ A site communicates with other sites in order to determine which sites
should execute critical section next.This requires exchange of two or more
succeive round of messages among sites.
■ This approach use timestamps instead of sequence number to order
requests for the critical section.
■ When ever a site make request for critical section, it gets a timestamp.
Timestamp is also used to resolve any conflict between critical section
requests.
■ When ever a site make request for critical section, it gets a timestamp.
Timestamp is also used to resolve any conflict between critical section
requests.
Continue…..
■ All algorithm which follows non-token based approach maintains a logical clock.
Logical clocks get updated according to Lamport’s scheme
■ Example:
■ Lamport's algorithm, Ricart–Agrawala algorithm
Quorum based approach:
■ Instead of requesting permission to execute the critical section from all other
sites, Each site requests only a subset of sites which is called a quorum.
■ Any two subsets of sites or Quorum contains a common site.
■ This common site is responsible to ensure mutual exclusion
■ Example:
■ . Maekawa’sAlgorithm
Distributed transaction:
■ A Distributed transaction is a set of operations on data that is performed across two
or more data repositories (especially databases). It is typically coordinated across
separate nodes connected by a network, but may also span multiple databases on a
single server.
■ There are two possible outcomes: 1) all operations successfully complete, or 2) none of
the operations are performed at all due to a failure somewhere in the system. In the
latter case, if some work was completed prior to the failure, that work will be reversed
to ensure no net work was done.
■ The operation known as a “two-phase commit” (2PC) is a form of a distributed
transaction. “XA transactions” are transactions using the XA protocol, which is one
implementation of a two-phase commit operation.
■ Distributed transactions have the same processing completion requirements as
regular database transactions, but they must be managed across multiple resources,
making them more challenging to implement for database developers.The multiple
resources add more points of failure, such as the separate software systems that run
the resources (e.g., the database software), the extra hardware servers, and network
failures.This makes distributed transactions susceptible to failures, which is why
safeguards must be put in place to retain data integrity.
■ For a distributed transaction to occur, transaction managers coordinate the resources
(either multiple databases or multiple nodes of a single database).The transaction
manager can be one of the data repositories that will be updated as part of the
transaction, or it can be a completely independent separate resource that is only
responsible for coordination.The transaction manager decides whether to commit a
successful transaction or rollback an unsuccessful transaction, the latter of which
leaves the database unchanged.
Distributed  computing

More Related Content

Similar to Distributed computing

Storing the real world data
Storing the real world dataStoring the real world data
Storing the real world dataAthira Mukundan
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory managementrprajat007
 
operating system
operating systemoperating system
operating systemshreeuva
 
dos mutual exclusion algos
dos mutual exclusion algosdos mutual exclusion algos
dos mutual exclusion algosAkhil Sharma
 
Classifications of OS.pptx
Classifications of OS.pptxClassifications of OS.pptx
Classifications of OS.pptxBalamurugan M
 
Chapter Introductionn to distributed system .pptx
Chapter Introductionn to distributed system .pptxChapter Introductionn to distributed system .pptx
Chapter Introductionn to distributed system .pptxTekle12
 
Distributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGY
Distributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGYDistributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGY
Distributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGYreginamutio48
 
Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.Meghaj Mallick
 
Operating-System-(1-3 group) Case study on windows Mac and linux among variou...
Operating-System-(1-3 group) Case study on windows Mac and linux among variou...Operating-System-(1-3 group) Case study on windows Mac and linux among variou...
Operating-System-(1-3 group) Case study on windows Mac and linux among variou...ssuser4a97d3
 
Analysis of mutual exclusion algorithms with the significance and need of ele...
Analysis of mutual exclusion algorithms with the significance and need of ele...Analysis of mutual exclusion algorithms with the significance and need of ele...
Analysis of mutual exclusion algorithms with the significance and need of ele...Govt. P.G. College Dharamshala
 
Communication And Synchronization In Distributed Systems
Communication And Synchronization In Distributed SystemsCommunication And Synchronization In Distributed Systems
Communication And Synchronization In Distributed Systemsguest61205606
 
Communication And Synchronization In Distributed Systems
Communication And Synchronization In Distributed SystemsCommunication And Synchronization In Distributed Systems
Communication And Synchronization In Distributed Systemsguest61205606
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systemsguest0f5a7d
 
Overview of Distributed Systems
Overview of Distributed SystemsOverview of Distributed Systems
Overview of Distributed Systemsvampugani
 
Comparative Study of Mutual Exclusion Algorithms in Distributed Systems
Comparative Study of Mutual Exclusion Algorithms in Distributed SystemsComparative Study of Mutual Exclusion Algorithms in Distributed Systems
Comparative Study of Mutual Exclusion Algorithms in Distributed SystemsIJERA Editor
 

Similar to Distributed computing (20)

Storing the real world data
Storing the real world dataStoring the real world data
Storing the real world data
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
 
6CS5_DS_Unit-5.pptx
6CS5_DS_Unit-5.pptx6CS5_DS_Unit-5.pptx
6CS5_DS_Unit-5.pptx
 
operating system
operating systemoperating system
operating system
 
dos mutual exclusion algos
dos mutual exclusion algosdos mutual exclusion algos
dos mutual exclusion algos
 
Classifications of OS.pptx
Classifications of OS.pptxClassifications of OS.pptx
Classifications of OS.pptx
 
Chapter Introductionn to distributed system .pptx
Chapter Introductionn to distributed system .pptxChapter Introductionn to distributed system .pptx
Chapter Introductionn to distributed system .pptx
 
Distributed and clustered systems
Distributed and clustered systemsDistributed and clustered systems
Distributed and clustered systems
 
Distributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGY
Distributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGYDistributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGY
Distributed OPERATING SYSTEM FOR BACHELOR OF BUSINESS INFORMATION TECHNOLOGY
 
Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.
 
Operating-System-(1-3 group) Case study on windows Mac and linux among variou...
Operating-System-(1-3 group) Case study on windows Mac and linux among variou...Operating-System-(1-3 group) Case study on windows Mac and linux among variou...
Operating-System-(1-3 group) Case study on windows Mac and linux among variou...
 
Memory management
Memory managementMemory management
Memory management
 
Analysis of mutual exclusion algorithms with the significance and need of ele...
Analysis of mutual exclusion algorithms with the significance and need of ele...Analysis of mutual exclusion algorithms with the significance and need of ele...
Analysis of mutual exclusion algorithms with the significance and need of ele...
 
Introduction
IntroductionIntroduction
Introduction
 
Communication And Synchronization In Distributed Systems
Communication And Synchronization In Distributed SystemsCommunication And Synchronization In Distributed Systems
Communication And Synchronization In Distributed Systems
 
Communication And Synchronization In Distributed Systems
Communication And Synchronization In Distributed SystemsCommunication And Synchronization In Distributed Systems
Communication And Synchronization In Distributed Systems
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
 
Operating system
Operating systemOperating system
Operating system
 
Overview of Distributed Systems
Overview of Distributed SystemsOverview of Distributed Systems
Overview of Distributed Systems
 
Comparative Study of Mutual Exclusion Algorithms in Distributed Systems
Comparative Study of Mutual Exclusion Algorithms in Distributed SystemsComparative Study of Mutual Exclusion Algorithms in Distributed Systems
Comparative Study of Mutual Exclusion Algorithms in Distributed Systems
 

Recently uploaded

General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
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
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
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
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Recently uploaded (20)

General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
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...
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
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
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 

Distributed computing

  • 1. NADAR SARASWATHI COLLEGE OF ARTS AND SCIENCE THENI Department of CS & IT subject: Distributed computing Topic: mutual exclusion and distributed transaction Presented by: S.Swetha M.sc(IT)
  • 2. Mutual exclusion in distributed system Mutual exclusion is a concurrency control property which is introduced to prevent race conditions. It is the requirement that a process can not enter its critical section while another concurrent process is currently present or executing in its critical section i.e only one process is allowed to execute the critical section at any given instance of time.
  • 3. Mutual exclusion in single computer system Vs. distributed system: In single computer system, memory and other resources are shared between different processes.The status of shared resources and the status of users is easily available in the shared memory so with the help of shared variable (For example: Semaphores) mutual exclusion problem can be easily solved.
  • 4. Continue…… In Distributed systems, we neither have shared memory nor a common physical clock and there for we can not solve mutual exclusion problem using shared variables.To eliminate the mutual exclusion problem in distributed system approach based on message passing is used.
  • 5. A site in distributed system do not have complete information of state of the system due to lack of shared memory and a common physical clock.
  • 6.
  • 7. Requirements of Mutual exclusion Algorithm: ■No Deadlock: Two or more site should not endlessly wait for any message that will never arrive.
  • 8. ■No Starvation: Every site who wants to execute critical section should get an opportunity to execute it in finite time. Any site should not wait indefinitely to execute critical section while other site are repeatedly executing critical section…
  • 9. ■Fairness: Each site should get a fair chance to execute critical section. Any request to execute critical section must be executed in the order they are made i.e Critical section execution requests should be executed in the order of their arrival in the system.
  • 10. ■ FaultTolerance: In case of failure, it should be able to recognize it by itself in order to continue functioning without any disruption. Solution to distributed mutual exclusion: As we know shared variables or a local kernel can not be used to implement mutual exclusion in distributed systems. Message passing is a way to implement mutual exclusion. Below are the three approaches based on message passing to implement mutual exclusion in distributed systems:
  • 11. 1. Token BasedAlgorithm: ■ A unique token is shared among all the sites. ■ If a site possesses the unique token, it is allowed to enter its critical section ■ This approach uses sequence number to order requests for the critical section. ■ Each requests for critical section contains a sequence number.This sequence number is used to distinguish old and current requests. ■ This approach insures Mutual exclusion as the token is unique ■ Example: ■ Suzuki-Kasami’s BroadcastAlgorithm
  • 12. Non-token based approach: ■ A site communicates with other sites in order to determine which sites should execute critical section next.This requires exchange of two or more succeive round of messages among sites. ■ This approach use timestamps instead of sequence number to order requests for the critical section. ■ When ever a site make request for critical section, it gets a timestamp. Timestamp is also used to resolve any conflict between critical section requests. ■ When ever a site make request for critical section, it gets a timestamp. Timestamp is also used to resolve any conflict between critical section requests.
  • 13. Continue….. ■ All algorithm which follows non-token based approach maintains a logical clock. Logical clocks get updated according to Lamport’s scheme ■ Example: ■ Lamport's algorithm, Ricart–Agrawala algorithm
  • 14. Quorum based approach: ■ Instead of requesting permission to execute the critical section from all other sites, Each site requests only a subset of sites which is called a quorum. ■ Any two subsets of sites or Quorum contains a common site. ■ This common site is responsible to ensure mutual exclusion ■ Example: ■ . Maekawa’sAlgorithm
  • 15. Distributed transaction: ■ A Distributed transaction is a set of operations on data that is performed across two or more data repositories (especially databases). It is typically coordinated across separate nodes connected by a network, but may also span multiple databases on a single server. ■ There are two possible outcomes: 1) all operations successfully complete, or 2) none of the operations are performed at all due to a failure somewhere in the system. In the latter case, if some work was completed prior to the failure, that work will be reversed to ensure no net work was done.
  • 16. ■ The operation known as a “two-phase commit” (2PC) is a form of a distributed transaction. “XA transactions” are transactions using the XA protocol, which is one implementation of a two-phase commit operation.
  • 17. ■ Distributed transactions have the same processing completion requirements as regular database transactions, but they must be managed across multiple resources, making them more challenging to implement for database developers.The multiple resources add more points of failure, such as the separate software systems that run the resources (e.g., the database software), the extra hardware servers, and network failures.This makes distributed transactions susceptible to failures, which is why safeguards must be put in place to retain data integrity. ■ For a distributed transaction to occur, transaction managers coordinate the resources (either multiple databases or multiple nodes of a single database).The transaction manager can be one of the data repositories that will be updated as part of the transaction, or it can be a completely independent separate resource that is only responsible for coordination.The transaction manager decides whether to commit a successful transaction or rollback an unsuccessful transaction, the latter of which leaves the database unchanged.