0% found this document useful (0 votes)
7 views

4.2.1. Problem Definition

Uploaded by

K Divi
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

4.2.1. Problem Definition

Uploaded by

K Divi
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

CS3551 DISTRIBUTED COMPUTING

III Year –CSE


Regulation 2021
Department Computer Science & Engineering
Ramco Institute of Technology

1
UNIT IV

4.2. Consensus and Agreement


Algorithm
4.2.2. Overview of Results
Source:
Ajay D Kshemkalyani & Mukesh Singhal (2010).
Distributed Computing: Principles, Algorithms and
Systems. Cambridge University Press

2
TOPICS
4.1. Consensus and Agreement Algorithm
 4.1.1. Problem Definition
 4.1.2. Overview of Results
 4.1.3.Agreement in Failure- free system
 4.1.4. Agreement in Synchronous system with failure
4.2. Checkpointing and Rollback Recovery
 4.2.1.Introdution
 4.2.2. Background and Definitions
 4.2.3. Issues in Failure Recovery
 4.2.4. Checkpoint based Recovery
 4.2.5. Log based roll back Recovery
 4.2.6. Coordinated Checkpointing Algorithm
 4.2.7. Algorithm for asynchronous check pointing and
Recovery

3
CONSENSUS AND AGREEMENT
4.1.1. Problem Definition

Agreement among the processes in a


distributed system is a fundamental
requirement.
Many forms of coordination require the
processes to exchange information to
negotiate with one another and eventually
reach a common understanding or
agreement.
Example,
Commit decision in database systems,
wherein the processes collectively decide
whether to commit or abort a transaction
4
that they participate in
4.1.1. Problem Definition- Assumption

System Model
Agreement problems have been studied
under the following system model:
N processor in the system with at most m of
them being faulty.
Processors can exchange message directly.
Receiver knows the identity of the sender
Communication medium is reliable:
Messages are delivered without error.

5
 Failure models:
 Some of the processes may be faulty in distributed systems.
 A faulty process can behave in any manner allowed by the
failure model assumed.
 Some of the well known failure models includes fail-stop,
send omission and receive omission, and Byzantine failures.
 Fail stop model: a process may crash in the middle of a
step, which could be the execution of a local operation or
processing of a message for a send or receive event. It may
send a message to only a subset of the destination set
before crashing.
 Byzantine failure model: a process may behave
arbitrarily.
 The choice of the failure model determines the feasibility
and complexity of solving consensus.
6
 Synchronous/asynchronous communication:
 If a failure-prone process chooses to send a message to
process but fails, then intended process cannot detect
the non-arrival of the message.
 A consensus algorithm is a process that achieves
agreement on a single data value among distributed
processes or systems.
 In a synchronous system, a unsent message scenario can
be identified by the intended recipient, at the end of the
round.
 The intended recipient can deal with the non-arrival of
the expected message by assuming the arrival of a
message containing some default data, and then
proceeding with the next round of the algorithm.

7
Network connectivity:
The system has full logical connectivity, i.e.,
each process can communicate with any other
by direct message passing.
Sender identification:
 A process that receives a message always
knows the identity of the sender process.
When multiple messages are expected from the
same sender in a single round, a scheduling
algorithm is employed that sends these
messages in sub-rounds, so that each message
sent within the round can be uniquely identified.
8
Channel reliability:
The channels are reliable, and only the processes
may fail.
Authenticated vs. non-authenticated messages:
With unauthenticated messages, when a faulty
process relays a message to other processes
When a process receive a message, it has no way
to verify its authenticity. This is known as un
authenticated message or oral message or an
unsigned message
Agreement variable:
The agreement variable may be boolean or
multivalued, and need not be an integer.
 This simplifying assumption does not affect the
results for other data types, but helps in the
9 abstraction while presenting the algorithms.
System assumption

Agreement variable- Agreement variable may be boolean or multivalues and need


not to be integer

10
4.2.1. Problem Definition- Byzantine
Problem

A simple example of Byzantine


behavior is shown in Figure.
 Four generals are shown, and a
consensus decision is to be
reached about a boolean value.
 The various generals are conveying
potentially misleading values of the
decision variable to the other
generals, which results in
confusion.
 In the face of such Byzantine
behavior, the challenge is to
determine whether it is possible to
reach agreement, and if so under
what conditions.
 If agreement is reachable, then
protocols to reach it need to be
devised.
11
4.1.1. Problem Definition- Byzantine
Problem- Contd…
 Before studying algorithms to solve the agreement problem, we
first define the problem formally.
 The Byzantine agreement problem requires a designated
process, called the source process, with an initial value, to reach
agreement with the other processes about its initial value,
subject to the following conditions:
 Agreement: All non-faulty processes must agree on the same
value.
 Validity: If the source process is non-faulty, then the agreed upon
value by all the non-faulty processes must be the same as the initial
value of the source.
 Termination: Each non-faulty process must eventually decide on a
value.
There are two other popular flavors of the Byzantine
agreement problem:
 Consensus problem
 Interactive consistency problem.

12
4.1.1. Problem Definition- Byzantine Problem-
Consensus problem

The consensus problem differs from the


Byzantine agreement problem in that each
process has an initial value and all the correct
processes must agree on a single value.
Formally:
 Agreement: All non-faulty processes must agree
on the same (single) value.
 Validity: If all the non-faulty processes have the
same initial value, then the agreed upon value by
all the non-faulty processes must be that same
value.
 Termination: Each non-faulty process must
eventually decide on a value.
13
4.1.1. Problem Definition- Byzantine Problem-
Interactive consistency problem.

 The interactive consistency problem differs from the


Byzantine agreement problem in that each process
has an initial value, and all the correct processes
must agree upon a set of values, with one value for
each process.
 The formal specification is as follows:
 Agreement :All non-faulty processes must agree on
the same array of values A[v1… vn.]
 Validity: If process i is non-faulty and its initial value is
vi, then all nonfaulty processes agree on vi as the ith
element of the array A. If process j is faulty, then the
non-faulty processes can agree on any value for Aj.
 Termination: Each non-faulty process must eventually
decide on the array A.

14

You might also like