SlideShare a Scribd company logo
1 of 17
1 
AGREEMENT 
PROTOCOLS 
Part of unit-2 
BY PROF. MAYANK JAIN
2 
Introduction 
• Processes/Sites in distributed systems often 
compete as well as cooperate to achieve a common 
goal. 
• Mutual Trust/agreement is very much required. 
• In Distributed Data bases, there may be a 
situation where data managers have to decide 
“Whether to commit or Abort the Transaction” 
• When there is no failure, reaching an agreement is 
easy. 
• However, in case of failures, processes must 
exchange their values with other processes and 
relay the values received from others several 
times to isolate the effect of faulty processor. 
• Agreement Protocols helps to reach an agreement in 
presence of failures.
3 
System Model 
• Agreement Problems have been studied under 
following System Model: 
1. ‘n’ processors and at most ‘m’ of the processors 
can be faulty 
2. Processors can directly communicate with other 
processors by message passing. 
3. Receiver knows the identity of the sender 
4. Communication medium is reliabble. 
5. Only Processors are prone to failures
4 
Synchronous VS Asynchronous 
Computation 
• Synchronous Computation 
1. Processes run in lock step manner[ Process 
receives a message sent to it earlier, performs 
computation and sends a message to other 
process. 
2. Step of Synchronous computation is called round 
• Asynchronous Computation 
1. Computation does not proceed in lock step. 
2. Process can send receive messages and perform 
computation at any time. 
Synchronous Models of Computations are Assumed here.
5 
Model of processor Failures 
• Processor Can Fail in three modes: 
1. Crash Fault : 
(i) Processor stops and never resumes operation. 
2. Omission Fault : 
(i) Processor Omits to send message to some 
processors 
3. Malicious Fault : 
(i) Also known as Byzantine Faults 
(ii) Processor may send fictitious 
values/message to other processes to 
confuse them 
(iii) Tough to detect/correct
6 
Authenticated VS Non- 
Authenticated Messages 
• Authenticated Messages: 
1. Also known as signed Message 
2. Processor can not forge/change a received 
message 
3. Processor can verify the authenticity of the 
message 
4. It is easier to reach on an agreement in this 
case 
• Non-Authenticated Messages: 
1. Also known as Oral Message 
2. Processor can forge/change a received message 
and claims to have received it from others 
3. Processor can not verify the authenticity of the 
message in this case.
7 
Performance Aspects of 
Agreement Protocols 
• Following Metrics are used : 
1. Time: No of rounds needed to reach an agreement 
2. Message Traffic : Number of messages exchanged 
to reach an agreement. 
3. Storage Overhead : Amount of information that 
needs to stored at processors during execution 
of the protocol.
8 
Classification of Agreement 
Problems 
• There are three well known agreement problems in 
distributed systems: 
1. Byzantine Agreement Problem : 
• A single Value is to be agreed upon. 
• Agreed Value is initialized by an arbitrary processor 
and all non faulty processors have to agree on that 
value. 
2. Consensus Problem: 
• Every processor has its own initial value and all non 
faulty processors must agree on a single common value. 
3. Interactive Consistency Problem: 
• Every processor has its own initial value and all non 
faulty processors must agree on a set of common 
values. 
Cont..
9 
Classification of Agreement 
Problems cont… 
• In All the previous mentioned problems, all non 
faulty processors must reach an agreement 
• In Byzantine and Consensus problems , 
agreement is on a single value 
• In Interactive Consistency problem , agreement 
is on a set of common values. 
• In Byzantine agreement problem ,only one 
processor initializes the value where as in other 
two cases, every processor has its own initial 
value.
10 
Byzantine Agreement Problem 
• Source Processor [ Any arbitrarily chosen 
processor] broadcasts its values to others. 
• Solution must meet following objectives: 
1. Agreement : All non-faulty processors agree on 
the same value. 
2. Validity : If source is nonfaulty, then the 
common agreed value must be the value supplied 
by the source processor. 
“If source is faulty then all non- faulty processors 
can agree on any common value”. 
“Value agreed upon by faulty processors is 
irrelevant”
11 
Consensus Problem 
• Every Processor broadcasts its initial value to all 
other processors. 
• Initial Values may be different for different 
processors. 
• Protocol must meet following objectives: 
1. Agreement : All non-faulty processors agree on the 
same single value. 
2. Validity : If initial value of every non-faulty 
processor is v , then the common agreed value by all 
non-faulty processors must be v. 
“If initial value of non-faulty processors are different 
then all non- faulty processors can agree on any 
common value”. 
“Value agreed upon by faulty processors is irrelevant”
Interactive Consistency Problem 
12 
• Every Processor broadcasts its initial value to 
all other processors. 
• Initial Values may be different for different 
processors. 
• Protocol must meet following objectives: 
1. Agreement : All non-faulty processors agree on 
the same vector (v1,v2,…vn). 
2. Validity : If ith processor is non-faulty and 
its initial value is vi, then the ith value 
agreed by all non-faulty processors must be vi. 
“If jth processor is faulty then all non- faulty 
processors can agree on any common value vj”. 
“Value agreed upon by faulty processors is 
irrelevant”
13 
Solution for Byzantine Agreement 
Problem 
• First Defined and solved by lamport. 
• Source Broadcasts its initial value to all other 
processors. 
• Processors send their values to other processors and 
also relay received values to others. 
• During Execution faulty processors may confuse by 
sending conflicting values. 
• However if faulty processors dominate in number, they 
can prevent non-faulty processors from reaching an 
agreement. 
• No of faulty processors should not exceed certain limit. 
• Pease showed that in a fully connected network, it is 
impossible to reach an agreement if number faulty 
processors ‘m’ exceeds (n-1)/3. n = number of processors
Lamport-Shostak-Pease Algorithm 
14 
• This algorithm also known as Oral Message 
Algorithm OM(m) where m is the number of faulty 
processors 
• ‘n’ = Number of processors and n >= 3m+1 
• Algorithm is Recursively defined as follows: 
• Algorithm OM(0) 
1. Source processor sends its values to every 
processor 
2. Each processor uses the value it receives from 
source. [If no value is received default value 0 
is used] 
• Algorithm OM(m), m>0 
1. The source processor sends its value to every 
processor.
15 
Cont… 
2. For each i, let vi be the value processor i 
receives from source.[ Default value 0 if no 
value received] 
3. Processor I acts as the new source and initiates 
Algorithm OM(m-1) where it sends the value vi to 
each of the n-2 other processors. 
4. For each i and j (not i), let vj be the value 
processor i received from processor j in STEP 
3. Processor I uses the value 
majority(v1,v2….vn-1). 
“The function majority(v1,v2….vn-1) computes the 
majority value if exists otherwise it uses 
default value 0.”
Byzantine Agreement Can not be reached among three 
16 
processors if one processor is faulty 
P0 is NON-Faulty 
P0 
P1 P2 
0 
1 
1 
1 
P0 is Faulty 
P0 
P1 P2 
0 
0 
1 
1 
P0 is source processor
17 
Applications of Agreement 
Algorithms 
1. Fault-Tolerant Clock Synchronization 
• Distributed Systems require physical clocks to 
synchronized 
• Physical clocks have drift problem 
• Agreement Protocols may help to reach a common 
clock value. 
2. Atomic Commit in DDBS 
• DDBS sites must agree whether to commit or abort 
the transaction 
• Agreement protocols may help to reach a 
consensus.

More Related Content

What's hot

Distributed document based system
Distributed document based systemDistributed document based system
Distributed document based systemChetan Selukar
 
Types of Load distributing algorithm in Distributed System
Types of Load distributing algorithm in Distributed SystemTypes of Load distributing algorithm in Distributed System
Types of Load distributing algorithm in Distributed SystemDHIVYADEVAKI
 
Operating Systems: Process Scheduling
Operating Systems: Process SchedulingOperating Systems: Process Scheduling
Operating Systems: Process SchedulingDamian T. Gordon
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memoryAshish Kumar
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSKathirvel Ayyaswamy
 
Client Centric Consistency Model
Client Centric Consistency ModelClient Centric Consistency Model
Client Centric Consistency ModelRajat Kumar
 
Distributed System-Multicast & Indirect communication
Distributed System-Multicast & Indirect communicationDistributed System-Multicast & Indirect communication
Distributed System-Multicast & Indirect communicationMNM Jain Engineering College
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back trackingTech_MX
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Ravindra Raju Kolahalam
 
2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software concepts2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software conceptsPrajakta Rane
 
Processes and Processors in Distributed Systems
Processes and Processors in Distributed SystemsProcesses and Processors in Distributed Systems
Processes and Processors in Distributed SystemsDr Sandeep Kumar Poonia
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory managementrprajat007
 
deadlock handling
deadlock handlingdeadlock handling
deadlock handlingSuraj Kumar
 

What's hot (20)

Replication in Distributed Systems
Replication in Distributed SystemsReplication in Distributed Systems
Replication in Distributed Systems
 
Distributed Mutual exclusion algorithms
Distributed Mutual exclusion algorithmsDistributed Mutual exclusion algorithms
Distributed Mutual exclusion algorithms
 
message passing
 message passing message passing
message passing
 
Distributed document based system
Distributed document based systemDistributed document based system
Distributed document based system
 
Types of Load distributing algorithm in Distributed System
Types of Load distributing algorithm in Distributed SystemTypes of Load distributing algorithm in Distributed System
Types of Load distributing algorithm in Distributed System
 
Naming in Distributed System
Naming in Distributed SystemNaming in Distributed System
Naming in Distributed System
 
Operating Systems: Process Scheduling
Operating Systems: Process SchedulingOperating Systems: Process Scheduling
Operating Systems: Process Scheduling
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
 
Process Management-Process Migration
Process Management-Process MigrationProcess Management-Process Migration
Process Management-Process Migration
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
 
Lecture 3 threads
Lecture 3   threadsLecture 3   threads
Lecture 3 threads
 
Client Centric Consistency Model
Client Centric Consistency ModelClient Centric Consistency Model
Client Centric Consistency Model
 
Distributed System-Multicast & Indirect communication
Distributed System-Multicast & Indirect communicationDistributed System-Multicast & Indirect communication
Distributed System-Multicast & Indirect communication
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back tracking
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]
 
2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software concepts2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software concepts
 
Mutual exclusion and sync
Mutual exclusion and syncMutual exclusion and sync
Mutual exclusion and sync
 
Processes and Processors in Distributed Systems
Processes and Processors in Distributed SystemsProcesses and Processors in Distributed Systems
Processes and Processors in Distributed Systems
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
 
deadlock handling
deadlock handlingdeadlock handling
deadlock handling
 

Viewers also liked

Time Triggered Protocol
Time Triggered ProtocolTime Triggered Protocol
Time Triggered ProtocolDhruv Goel
 
Scheduling in distributed systems - Andrii Vozniuk
Scheduling in distributed systems - Andrii VozniukScheduling in distributed systems - Andrii Vozniuk
Scheduling in distributed systems - Andrii VozniukAndrii Vozniuk
 
Distributes objects and Rmi
Distributes objects and RmiDistributes objects and Rmi
Distributes objects and RmiMayank Jain
 
The byzantine generals problem
The byzantine generals problemThe byzantine generals problem
The byzantine generals problemNGUYEN VAN LUONG
 
Distributed process and scheduling
Distributed process and scheduling Distributed process and scheduling
Distributed process and scheduling SHATHAN
 
B trees in Data Structure
B trees in Data StructureB trees in Data Structure
B trees in Data StructureAnuj Modi
 
Unit 1 architecture of distributed systems
Unit 1 architecture of distributed systemsUnit 1 architecture of distributed systems
Unit 1 architecture of distributed systemskaran2190
 

Viewers also liked (9)

Distributed Transaction
Distributed TransactionDistributed Transaction
Distributed Transaction
 
Time Triggered Protocol
Time Triggered ProtocolTime Triggered Protocol
Time Triggered Protocol
 
Scheduling in distributed systems - Andrii Vozniuk
Scheduling in distributed systems - Andrii VozniukScheduling in distributed systems - Andrii Vozniuk
Scheduling in distributed systems - Andrii Vozniuk
 
Distributes objects and Rmi
Distributes objects and RmiDistributes objects and Rmi
Distributes objects and Rmi
 
The byzantine generals problem
The byzantine generals problemThe byzantine generals problem
The byzantine generals problem
 
Distributed deadlock
Distributed deadlockDistributed deadlock
Distributed deadlock
 
Distributed process and scheduling
Distributed process and scheduling Distributed process and scheduling
Distributed process and scheduling
 
B trees in Data Structure
B trees in Data StructureB trees in Data Structure
B trees in Data Structure
 
Unit 1 architecture of distributed systems
Unit 1 architecture of distributed systemsUnit 1 architecture of distributed systems
Unit 1 architecture of distributed systems
 

Similar to Distributed Agreement Protocols Explained

1. Consensus and agreement algorithms - Introduction.pdf
1. Consensus and agreement algorithms - Introduction.pdf1. Consensus and agreement algorithms - Introduction.pdf
1. Consensus and agreement algorithms - Introduction.pdfAzmiNizar1
 
Randomized Byzantine Problem by Rabin
Randomized Byzantine Problem by RabinRandomized Byzantine Problem by Rabin
Randomized Byzantine Problem by RabinKishor Datta Gupta
 
Ripple - XRP we know how XRP blockchain throughout Whitepaper
Ripple - XRP we know how XRP blockchain throughout WhitepaperRipple - XRP we know how XRP blockchain throughout Whitepaper
Ripple - XRP we know how XRP blockchain throughout WhitepaperTrung Vu
 
Message Passing, Remote Procedure Calls and Distributed Shared Memory as Com...
Message Passing, Remote Procedure Calls and  Distributed Shared Memory as Com...Message Passing, Remote Procedure Calls and  Distributed Shared Memory as Com...
Message Passing, Remote Procedure Calls and Distributed Shared Memory as Com...Sehrish Asif
 
Synchronization
SynchronizationSynchronization
SynchronizationSara shall
 
Fault Tolerant and Distributed System
Fault Tolerant and Distributed SystemFault Tolerant and Distributed System
Fault Tolerant and Distributed Systemsreenivas1591
 
Coimbatore Second Mule Meetup on Error Handling in Mule 4
Coimbatore Second Mule Meetup on Error Handling in Mule 4Coimbatore Second Mule Meetup on Error Handling in Mule 4
Coimbatore Second Mule Meetup on Error Handling in Mule 4pqrs1234
 
Lecture 5- Process Synchonization_revised.pdf
Lecture 5- Process Synchonization_revised.pdfLecture 5- Process Synchonization_revised.pdf
Lecture 5- Process Synchonization_revised.pdfAmanuelmergia
 
Hyperledger Consensus Algorithms
Hyperledger Consensus AlgorithmsHyperledger Consensus Algorithms
Hyperledger Consensus AlgorithmsMabelOza12
 
Process Synchronization -1.ppt
Process Synchronization -1.pptProcess Synchronization -1.ppt
Process Synchronization -1.pptjayverma27
 
Solutions to byzantine agreement problem
Solutions to byzantine agreement problem Solutions to byzantine agreement problem
Solutions to byzantine agreement problem AJAY KHARAT
 
Osi model
Osi model Osi model
Osi model maha tce
 
BlockChain_Chap3_RP _Consensus.pptx
BlockChain_Chap3_RP _Consensus.pptxBlockChain_Chap3_RP _Consensus.pptx
BlockChain_Chap3_RP _Consensus.pptxRajChauhan226834
 
Error correction and detection th
Error correction and detection thError correction and detection th
Error correction and detection thShardaSalunkhe1
 

Similar to Distributed Agreement Protocols Explained (20)

1. Consensus and agreement algorithms - Introduction.pdf
1. Consensus and agreement algorithms - Introduction.pdf1. Consensus and agreement algorithms - Introduction.pdf
1. Consensus and agreement algorithms - Introduction.pdf
 
Randomized Byzantine Problem by Rabin
Randomized Byzantine Problem by RabinRandomized Byzantine Problem by Rabin
Randomized Byzantine Problem by Rabin
 
Ripple - XRP we know how XRP blockchain throughout Whitepaper
Ripple - XRP we know how XRP blockchain throughout WhitepaperRipple - XRP we know how XRP blockchain throughout Whitepaper
Ripple - XRP we know how XRP blockchain throughout Whitepaper
 
Agreement protocol
Agreement protocolAgreement protocol
Agreement protocol
 
Message Passing, Remote Procedure Calls and Distributed Shared Memory as Com...
Message Passing, Remote Procedure Calls and  Distributed Shared Memory as Com...Message Passing, Remote Procedure Calls and  Distributed Shared Memory as Com...
Message Passing, Remote Procedure Calls and Distributed Shared Memory as Com...
 
Synchronization
SynchronizationSynchronization
Synchronization
 
Fault Tolerant and Distributed System
Fault Tolerant and Distributed SystemFault Tolerant and Distributed System
Fault Tolerant and Distributed System
 
Coimbatore Second Mule Meetup on Error Handling in Mule 4
Coimbatore Second Mule Meetup on Error Handling in Mule 4Coimbatore Second Mule Meetup on Error Handling in Mule 4
Coimbatore Second Mule Meetup on Error Handling in Mule 4
 
Fault tolerance-omer-rana
Fault tolerance-omer-ranaFault tolerance-omer-rana
Fault tolerance-omer-rana
 
Lecture 5- Process Synchonization_revised.pdf
Lecture 5- Process Synchonization_revised.pdfLecture 5- Process Synchonization_revised.pdf
Lecture 5- Process Synchonization_revised.pdf
 
Transaction management transparencies
Transaction management transparenciesTransaction management transparencies
Transaction management transparencies
 
Hyperledger Consensus Algorithms
Hyperledger Consensus AlgorithmsHyperledger Consensus Algorithms
Hyperledger Consensus Algorithms
 
Process Synchronization -1.ppt
Process Synchronization -1.pptProcess Synchronization -1.ppt
Process Synchronization -1.ppt
 
Distributed System
Distributed System Distributed System
Distributed System
 
Solutions to byzantine agreement problem
Solutions to byzantine agreement problem Solutions to byzantine agreement problem
Solutions to byzantine agreement problem
 
Osi model
Osi model Osi model
Osi model
 
BlockChain_Chap3_RP _Consensus.pptx
BlockChain_Chap3_RP _Consensus.pptxBlockChain_Chap3_RP _Consensus.pptx
BlockChain_Chap3_RP _Consensus.pptx
 
Error correction and detection th
Error correction and detection thError correction and detection th
Error correction and detection th
 
Unit_4_Fault_Tolerance.pptx
Unit_4_Fault_Tolerance.pptxUnit_4_Fault_Tolerance.pptx
Unit_4_Fault_Tolerance.pptx
 
Client server model
Client server modelClient server model
Client server model
 

More from Mayank Jain

C, C++, Java, Android
C, C++, Java, AndroidC, C++, Java, Android
C, C++, Java, AndroidMayank Jain
 
C++ classes tutorials
C++ classes tutorialsC++ classes tutorials
C++ classes tutorialsMayank Jain
 
2 computer network - basic concepts
2   computer network - basic concepts2   computer network - basic concepts
2 computer network - basic conceptsMayank Jain
 
1 introduction-to-computer-networking
1 introduction-to-computer-networking1 introduction-to-computer-networking
1 introduction-to-computer-networkingMayank Jain
 
Ds objects and models
Ds objects and modelsDs objects and models
Ds objects and modelsMayank Jain
 
Enhanced E-R diagram
Enhanced E-R diagramEnhanced E-R diagram
Enhanced E-R diagramMayank Jain
 

More from Mayank Jain (8)

C, C++, Java, Android
C, C++, Java, AndroidC, C++, Java, Android
C, C++, Java, Android
 
C++ functions
C++ functionsC++ functions
C++ functions
 
C++ classes tutorials
C++ classes tutorialsC++ classes tutorials
C++ classes tutorials
 
2 computer network - basic concepts
2   computer network - basic concepts2   computer network - basic concepts
2 computer network - basic concepts
 
1 introduction-to-computer-networking
1 introduction-to-computer-networking1 introduction-to-computer-networking
1 introduction-to-computer-networking
 
Ds ppt imp.
Ds ppt imp.Ds ppt imp.
Ds ppt imp.
 
Ds objects and models
Ds objects and modelsDs objects and models
Ds objects and models
 
Enhanced E-R diagram
Enhanced E-R diagramEnhanced E-R diagram
Enhanced E-R diagram
 

Recently uploaded

Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the weldingMuhammadUzairLiaqat
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsSachinPawar510423
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Industrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESIndustrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESNarmatha D
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...Amil Baba Dawood bangali
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating SystemRashmi Bhat
 
Steel Structures - Building technology.pptx
Steel Structures - Building technology.pptxSteel Structures - Building technology.pptx
Steel Structures - Building technology.pptxNikhil Raut
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 

Recently uploaded (20)

Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the welding
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documents
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Industrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESIndustrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIES
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating System
 
Steel Structures - Building technology.pptx
Steel Structures - Building technology.pptxSteel Structures - Building technology.pptx
Steel Structures - Building technology.pptx
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 

Distributed Agreement Protocols Explained

  • 1. 1 AGREEMENT PROTOCOLS Part of unit-2 BY PROF. MAYANK JAIN
  • 2. 2 Introduction • Processes/Sites in distributed systems often compete as well as cooperate to achieve a common goal. • Mutual Trust/agreement is very much required. • In Distributed Data bases, there may be a situation where data managers have to decide “Whether to commit or Abort the Transaction” • When there is no failure, reaching an agreement is easy. • However, in case of failures, processes must exchange their values with other processes and relay the values received from others several times to isolate the effect of faulty processor. • Agreement Protocols helps to reach an agreement in presence of failures.
  • 3. 3 System Model • Agreement Problems have been studied under following System Model: 1. ‘n’ processors and at most ‘m’ of the processors can be faulty 2. Processors can directly communicate with other processors by message passing. 3. Receiver knows the identity of the sender 4. Communication medium is reliabble. 5. Only Processors are prone to failures
  • 4. 4 Synchronous VS Asynchronous Computation • Synchronous Computation 1. Processes run in lock step manner[ Process receives a message sent to it earlier, performs computation and sends a message to other process. 2. Step of Synchronous computation is called round • Asynchronous Computation 1. Computation does not proceed in lock step. 2. Process can send receive messages and perform computation at any time. Synchronous Models of Computations are Assumed here.
  • 5. 5 Model of processor Failures • Processor Can Fail in three modes: 1. Crash Fault : (i) Processor stops and never resumes operation. 2. Omission Fault : (i) Processor Omits to send message to some processors 3. Malicious Fault : (i) Also known as Byzantine Faults (ii) Processor may send fictitious values/message to other processes to confuse them (iii) Tough to detect/correct
  • 6. 6 Authenticated VS Non- Authenticated Messages • Authenticated Messages: 1. Also known as signed Message 2. Processor can not forge/change a received message 3. Processor can verify the authenticity of the message 4. It is easier to reach on an agreement in this case • Non-Authenticated Messages: 1. Also known as Oral Message 2. Processor can forge/change a received message and claims to have received it from others 3. Processor can not verify the authenticity of the message in this case.
  • 7. 7 Performance Aspects of Agreement Protocols • Following Metrics are used : 1. Time: No of rounds needed to reach an agreement 2. Message Traffic : Number of messages exchanged to reach an agreement. 3. Storage Overhead : Amount of information that needs to stored at processors during execution of the protocol.
  • 8. 8 Classification of Agreement Problems • There are three well known agreement problems in distributed systems: 1. Byzantine Agreement Problem : • A single Value is to be agreed upon. • Agreed Value is initialized by an arbitrary processor and all non faulty processors have to agree on that value. 2. Consensus Problem: • Every processor has its own initial value and all non faulty processors must agree on a single common value. 3. Interactive Consistency Problem: • Every processor has its own initial value and all non faulty processors must agree on a set of common values. Cont..
  • 9. 9 Classification of Agreement Problems cont… • In All the previous mentioned problems, all non faulty processors must reach an agreement • In Byzantine and Consensus problems , agreement is on a single value • In Interactive Consistency problem , agreement is on a set of common values. • In Byzantine agreement problem ,only one processor initializes the value where as in other two cases, every processor has its own initial value.
  • 10. 10 Byzantine Agreement Problem • Source Processor [ Any arbitrarily chosen processor] broadcasts its values to others. • Solution must meet following objectives: 1. Agreement : All non-faulty processors agree on the same value. 2. Validity : If source is nonfaulty, then the common agreed value must be the value supplied by the source processor. “If source is faulty then all non- faulty processors can agree on any common value”. “Value agreed upon by faulty processors is irrelevant”
  • 11. 11 Consensus Problem • Every Processor broadcasts its initial value to all other processors. • Initial Values may be different for different processors. • Protocol must meet following objectives: 1. Agreement : All non-faulty processors agree on the same single value. 2. Validity : If initial value of every non-faulty processor is v , then the common agreed value by all non-faulty processors must be v. “If initial value of non-faulty processors are different then all non- faulty processors can agree on any common value”. “Value agreed upon by faulty processors is irrelevant”
  • 12. Interactive Consistency Problem 12 • Every Processor broadcasts its initial value to all other processors. • Initial Values may be different for different processors. • Protocol must meet following objectives: 1. Agreement : All non-faulty processors agree on the same vector (v1,v2,…vn). 2. Validity : If ith processor is non-faulty and its initial value is vi, then the ith value agreed by all non-faulty processors must be vi. “If jth processor is faulty then all non- faulty processors can agree on any common value vj”. “Value agreed upon by faulty processors is irrelevant”
  • 13. 13 Solution for Byzantine Agreement Problem • First Defined and solved by lamport. • Source Broadcasts its initial value to all other processors. • Processors send their values to other processors and also relay received values to others. • During Execution faulty processors may confuse by sending conflicting values. • However if faulty processors dominate in number, they can prevent non-faulty processors from reaching an agreement. • No of faulty processors should not exceed certain limit. • Pease showed that in a fully connected network, it is impossible to reach an agreement if number faulty processors ‘m’ exceeds (n-1)/3. n = number of processors
  • 14. Lamport-Shostak-Pease Algorithm 14 • This algorithm also known as Oral Message Algorithm OM(m) where m is the number of faulty processors • ‘n’ = Number of processors and n >= 3m+1 • Algorithm is Recursively defined as follows: • Algorithm OM(0) 1. Source processor sends its values to every processor 2. Each processor uses the value it receives from source. [If no value is received default value 0 is used] • Algorithm OM(m), m>0 1. The source processor sends its value to every processor.
  • 15. 15 Cont… 2. For each i, let vi be the value processor i receives from source.[ Default value 0 if no value received] 3. Processor I acts as the new source and initiates Algorithm OM(m-1) where it sends the value vi to each of the n-2 other processors. 4. For each i and j (not i), let vj be the value processor i received from processor j in STEP 3. Processor I uses the value majority(v1,v2….vn-1). “The function majority(v1,v2….vn-1) computes the majority value if exists otherwise it uses default value 0.”
  • 16. Byzantine Agreement Can not be reached among three 16 processors if one processor is faulty P0 is NON-Faulty P0 P1 P2 0 1 1 1 P0 is Faulty P0 P1 P2 0 0 1 1 P0 is source processor
  • 17. 17 Applications of Agreement Algorithms 1. Fault-Tolerant Clock Synchronization • Distributed Systems require physical clocks to synchronized • Physical clocks have drift problem • Agreement Protocols may help to reach a common clock value. 2. Atomic Commit in DDBS • DDBS sites must agree whether to commit or abort the transaction • Agreement protocols may help to reach a consensus.