Unit - Iv
Unit - Iv
Coordination: Clock Synchronization - Logical clocks Fault Tolerance: Introduction to fault tolerance - Concepts
- Mutual Exclusion: Centralized algorithm - - Failure models - Failure masking by redundancy - Reliable
Distributed Algorithm - Token-ring algorithm - client server communication: Point to point
Decentralized Algorithm - Election Algorithms: Bully communication - RPC semantics in the presence of failures
algorithm - Ring algorithm - Elections in wireless - Reliable Group Communication: Atomic multicast,
environment and large scale systems Virtual synchrony and message ordering
Distributed commit
Recovery
Distributed Commit
• General Goal:
• We want an operation to be performed by all group
members, or none at all.
• [In the case of atomic multicasting, the operation is the
delivery of the message.]
There are three types of “commit protocol”:
1. single-phase commit
2. two-phase commit
3. three-phase commit
2
One-Phase Commit Protocol:
• An elected coordinator tells all the other processes to
perform the operation in question.
• The solutions:
The Two-Phase and Three-Phase Commit Protocols.
3
The Two-Phase Commit Protocol
First developed in 1978!!!
Summarized: GET READY, OK, GO AHEAD.
1. The coordinator sends a VOTE_REQUEST message to all group
members.
2. The group member returns VOTE_COMMIT if it can commit
locally, otherwise VOTE_ABORT.
3. All votes are collected by the coordinator. A
GLOBAL_COMMIT is sent if all the group members voted to
commit. If one group member voted to abort, a
GLOBAL_ABORT is sent.
4. The group members then COMMIT or ABORT based on the
last message received from the coordinator.
Two-Phase Commit (1)
...
...