SlideShare a Scribd company logo
1 of 25
DISTRIBUTED COMPUTING
Chandy-Lamport Snapshot algorithm
for FIFO Channel
❖ In a Distributed system, more processes may be
running on different physical servers. These processes
communicate with each other via communication channels
using text messaging.
❖ These processes neither have a shared memory nor a
common physical clock, so determining the global state of a
distributed system is very difficult.
❖ But a process could record its own local state at a given
time but a message that is in transit (on its way to be
delivered) will not be included in the recorded state and hence
the actual state of the system/process is incorrect after the
transit message is delivered.
As shown in the below diagram, if we record only the local states of the
process S1 and S2 and omit the communication channels, then Rs.500will not
be tallied in both accounts A and B as that deliveringmessage is in transit
between both accounts while taking snapshot
FOR EXAMPLE
GLOBAL SNAPSHOT:
Global Snapshot = Global State = Collection of
individual states of each process in the distributed
system
+
individual state of each communication channel
in the distributed system
SNAPSHOT:
❖ Is a photograph of a process taken or record it
quickly.
What is the need for taking snapshots or recording
the global state of the system?
CHECK POINTING:
❖ Snapshot will use as a checkpoint, to restart the
application in case of failure.
COLLECTING GARBAGE:
❖ Use to remove objects that don't have any
references
DETECTING DEADLOCKS:
❖ Use to examine the current application state
VARIOUS SNAPSHOT ALGORITHMS
1) FIFO Channel
❖ Chandy_lamport algorithm
2) Non-FIFO Channel
❖ Lai-Yang algorithm Matterrn's algorithm
3)Casual ordering channel
❖ Acharya badrinath & Alagar venkatesan
algorithm
CHANDY LAMPORT ALGORITHM
❖ This algorithm always captures the consistent
global state of a distributed system
❖ The main idea behind the proposed algorithm is
that if we know that all messages that have been sent
by one process and they have been received by
another process, then we can record the global state
of the system.
❖ Any process in the distributed system can
initiate this global state recording algorithm using a
special message called MARKER.
❖ This marker traverse the distributed system
across all communication channel and cause each
process to record its own state.
❖ In the end, the state of entire system (Global state)
is recorded.
❖ This algorithm does not interfere with normal
execution of processes.
How it works
❖ This algorithm can be initiated by any process by
executing the "Marker Sending Rule" records its local
state and sends a marker on each outgoing channel.
❖ The receiving process executes the "Marker
Receiving Rule" once received the marker. If incase,
the process has not yet recorded its local state, it sets
the state of the incoming channel on which the marker
has been received as EMPTY or NULL
❖ The incoming channel on which the marker has
been received is set as empty in order to block any
other messages coming on this channel while
recording is being done.
❖ Then the receiving process executes the
"Marker Sending Rule" to record its own local state
+ record the state of other incoming channels i.e
except the channel on which the MARKER is
received.
Let us assume,
Two processes P1 & P2 are running two channels
are C12, C21
Initial global state (snapshot 1) of the processes and
channels
❖Now, P1 tells P2 to change its state variable x2 to 4.
❖This is an another global snapshot of this distributed
system - No: 2
❖ Now P2 receives the message sent by p1 through
the channel C12. So the channel C12 becomes empty
now.
❖ Global snapshot of this distributed system No: 3
❖ P2 changes its state variable x2 to 4.
❖ Global snapshot of the distributed system - No: 4
❖ Now, the Process P1 initiates the recording process.
i.e P1 is the initiator.
❖ So, P1 sends a MARKER message to P2 and begins recording
its local state and recording all messages on inbound
channels.
❖ Meanwhile, P2 also sent a message to P1
❖ P2 receives the MARKER message for the first
time, so records its local state.
❖ Meanwhile P1 also receives the message M1, sent by p2
❖ Now, P2 sends a MARKER message to P1
Now the statue is, P1 has already sent a
MARKER message to P2, so it records all
messages it received on inbound channels to the
appropriate channel's state
Now, Both processes have recorded
their states and also the states of their all
incoming channels
❖Each process has received a MARKER
on all of its incoming channels. i.e both
processes have recorded their local states.
❖Since only two processes running in this
distributed system, the algorithm terminates
here.
❖The collection of these two local snapshots,
determine the global state of the distributed
system.
◌ THANK YOU ◌

More Related Content

Similar to DISTRIBUTED COMPUTTING (snapshot).pptx

Precessor organization
Precessor organizationPrecessor organization
Precessor organizationAsif Iqbal
 
5.wo bt05 e1_1 umts signaling flow-62
5.wo bt05 e1_1 umts signaling flow-625.wo bt05 e1_1 umts signaling flow-62
5.wo bt05 e1_1 umts signaling flow-62HuongNTL1
 
MICROPROCESSOR INPUT OUTPUT OPERATIONS
MICROPROCESSOR INPUT OUTPUT OPERATIONSMICROPROCESSOR INPUT OUTPUT OPERATIONS
MICROPROCESSOR INPUT OUTPUT OPERATIONSGeorge Thomas
 
data-link layer protocols
data-link layer protocols  data-link layer protocols
data-link layer protocols BE Smârt
 
Gsm kpi optimization
Gsm kpi optimizationGsm kpi optimization
Gsm kpi optimizationBernard Sqa
 
ghgfjfhgdjfdhgdhgfdgfdhgdhgfdhgzeka.pptx
ghgfjfhgdjfdhgdhgfdgfdhgdhgfdhgzeka.pptxghgfjfhgdjfdhgdhgfdgfdhgdhgfdhgzeka.pptx
ghgfjfhgdjfdhgdhgfdgfdhgdhgfdhgzeka.pptxEliasPetros
 
distribute system.
distribute system.distribute system.
distribute system.keerthikaA8
 
Asynchronous data transfer
Asynchronous  data  transferAsynchronous  data  transfer
Asynchronous data transferNancyBeaulah_R
 
Unit 4-Transport Layer Protocols-3.pptx
Unit 4-Transport Layer Protocols-3.pptxUnit 4-Transport Layer Protocols-3.pptx
Unit 4-Transport Layer Protocols-3.pptxDESTROYER39
 
Unit 4-Transport Layer Protocols.pptx
Unit 4-Transport Layer Protocols.pptxUnit 4-Transport Layer Protocols.pptx
Unit 4-Transport Layer Protocols.pptxsarosh32
 
20031109 WRUG Presentation
20031109 WRUG Presentation20031109 WRUG Presentation
20031109 WRUG PresentationManuel Sardinha
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Fpga implementation of utmi with usb 2.O
Fpga implementation of  utmi  with usb 2.O Fpga implementation of  utmi  with usb 2.O
Fpga implementation of utmi with usb 2.O Mathew George
 
Exploration and Coverage for Autonomous Vehicles
Exploration and Coverage for Autonomous Vehicles Exploration and Coverage for Autonomous Vehicles
Exploration and Coverage for Autonomous Vehicles Chouaieb NEMRI
 

Similar to DISTRIBUTED COMPUTTING (snapshot).pptx (20)

Ca 2 note mano
Ca 2 note manoCa 2 note mano
Ca 2 note mano
 
Grds conferences icst and icbelsh (9)
Grds conferences icst and icbelsh (9)Grds conferences icst and icbelsh (9)
Grds conferences icst and icbelsh (9)
 
Unit 2 ppt 3.ppt
Unit 2 ppt 3.pptUnit 2 ppt 3.ppt
Unit 2 ppt 3.ppt
 
Precessor organization
Precessor organizationPrecessor organization
Precessor organization
 
5.wo bt05 e1_1 umts signaling flow-62
5.wo bt05 e1_1 umts signaling flow-625.wo bt05 e1_1 umts signaling flow-62
5.wo bt05 e1_1 umts signaling flow-62
 
MICROPROCESSOR INPUT OUTPUT OPERATIONS
MICROPROCESSOR INPUT OUTPUT OPERATIONSMICROPROCESSOR INPUT OUTPUT OPERATIONS
MICROPROCESSOR INPUT OUTPUT OPERATIONS
 
Computer Organization
Computer OrganizationComputer Organization
Computer Organization
 
data-link layer protocols
data-link layer protocols  data-link layer protocols
data-link layer protocols
 
Gsm kpi optimization
Gsm kpi optimizationGsm kpi optimization
Gsm kpi optimization
 
ghgfjfhgdjfdhgdhgfdgfdhgdhgfdhgzeka.pptx
ghgfjfhgdjfdhgdhgfdgfdhgdhgfdhgzeka.pptxghgfjfhgdjfdhgdhgfdgfdhgdhgfdhgzeka.pptx
ghgfjfhgdjfdhgdhgfdgfdhgdhgfdhgzeka.pptx
 
distribute system.
distribute system.distribute system.
distribute system.
 
Asynchronous data transfer
Asynchronous  data  transferAsynchronous  data  transfer
Asynchronous data transfer
 
Unit 4-Transport Layer Protocols-3.pptx
Unit 4-Transport Layer Protocols-3.pptxUnit 4-Transport Layer Protocols-3.pptx
Unit 4-Transport Layer Protocols-3.pptx
 
Unit 4-Transport Layer Protocols.pptx
Unit 4-Transport Layer Protocols.pptxUnit 4-Transport Layer Protocols.pptx
Unit 4-Transport Layer Protocols.pptx
 
20031109 WRUG Presentation
20031109 WRUG Presentation20031109 WRUG Presentation
20031109 WRUG Presentation
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
gsm-kpi-optimization
 gsm-kpi-optimization gsm-kpi-optimization
gsm-kpi-optimization
 
Lte mobility optimization
Lte mobility optimizationLte mobility optimization
Lte mobility optimization
 
Fpga implementation of utmi with usb 2.O
Fpga implementation of  utmi  with usb 2.O Fpga implementation of  utmi  with usb 2.O
Fpga implementation of utmi with usb 2.O
 
Exploration and Coverage for Autonomous Vehicles
Exploration and Coverage for Autonomous Vehicles Exploration and Coverage for Autonomous Vehicles
Exploration and Coverage for Autonomous Vehicles
 

Recently uploaded

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
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
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
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
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
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
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
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 

Recently uploaded (20)

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
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
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
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
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 ...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
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
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 

DISTRIBUTED COMPUTTING (snapshot).pptx

  • 2. ❖ In a Distributed system, more processes may be running on different physical servers. These processes communicate with each other via communication channels using text messaging. ❖ These processes neither have a shared memory nor a common physical clock, so determining the global state of a distributed system is very difficult. ❖ But a process could record its own local state at a given time but a message that is in transit (on its way to be delivered) will not be included in the recorded state and hence the actual state of the system/process is incorrect after the transit message is delivered.
  • 3. As shown in the below diagram, if we record only the local states of the process S1 and S2 and omit the communication channels, then Rs.500will not be tallied in both accounts A and B as that deliveringmessage is in transit between both accounts while taking snapshot FOR EXAMPLE
  • 4. GLOBAL SNAPSHOT: Global Snapshot = Global State = Collection of individual states of each process in the distributed system + individual state of each communication channel in the distributed system SNAPSHOT: ❖ Is a photograph of a process taken or record it quickly.
  • 5.
  • 6. What is the need for taking snapshots or recording the global state of the system? CHECK POINTING: ❖ Snapshot will use as a checkpoint, to restart the application in case of failure. COLLECTING GARBAGE: ❖ Use to remove objects that don't have any references DETECTING DEADLOCKS: ❖ Use to examine the current application state
  • 7.
  • 8.
  • 9.
  • 10. VARIOUS SNAPSHOT ALGORITHMS 1) FIFO Channel ❖ Chandy_lamport algorithm 2) Non-FIFO Channel ❖ Lai-Yang algorithm Matterrn's algorithm 3)Casual ordering channel ❖ Acharya badrinath & Alagar venkatesan algorithm
  • 11. CHANDY LAMPORT ALGORITHM ❖ This algorithm always captures the consistent global state of a distributed system ❖ The main idea behind the proposed algorithm is that if we know that all messages that have been sent by one process and they have been received by another process, then we can record the global state of the system.
  • 12. ❖ Any process in the distributed system can initiate this global state recording algorithm using a special message called MARKER. ❖ This marker traverse the distributed system across all communication channel and cause each process to record its own state. ❖ In the end, the state of entire system (Global state) is recorded. ❖ This algorithm does not interfere with normal execution of processes.
  • 13. How it works ❖ This algorithm can be initiated by any process by executing the "Marker Sending Rule" records its local state and sends a marker on each outgoing channel. ❖ The receiving process executes the "Marker Receiving Rule" once received the marker. If incase, the process has not yet recorded its local state, it sets the state of the incoming channel on which the marker has been received as EMPTY or NULL
  • 14. ❖ The incoming channel on which the marker has been received is set as empty in order to block any other messages coming on this channel while recording is being done. ❖ Then the receiving process executes the "Marker Sending Rule" to record its own local state + record the state of other incoming channels i.e except the channel on which the MARKER is received.
  • 15. Let us assume, Two processes P1 & P2 are running two channels are C12, C21
  • 16. Initial global state (snapshot 1) of the processes and channels
  • 17. ❖Now, P1 tells P2 to change its state variable x2 to 4. ❖This is an another global snapshot of this distributed system - No: 2
  • 18. ❖ Now P2 receives the message sent by p1 through the channel C12. So the channel C12 becomes empty now. ❖ Global snapshot of this distributed system No: 3
  • 19. ❖ P2 changes its state variable x2 to 4. ❖ Global snapshot of the distributed system - No: 4
  • 20. ❖ Now, the Process P1 initiates the recording process. i.e P1 is the initiator. ❖ So, P1 sends a MARKER message to P2 and begins recording its local state and recording all messages on inbound channels. ❖ Meanwhile, P2 also sent a message to P1
  • 21. ❖ P2 receives the MARKER message for the first time, so records its local state. ❖ Meanwhile P1 also receives the message M1, sent by p2 ❖ Now, P2 sends a MARKER message to P1
  • 22. Now the statue is, P1 has already sent a MARKER message to P2, so it records all messages it received on inbound channels to the appropriate channel's state
  • 23. Now, Both processes have recorded their states and also the states of their all incoming channels
  • 24. ❖Each process has received a MARKER on all of its incoming channels. i.e both processes have recorded their local states. ❖Since only two processes running in this distributed system, the algorithm terminates here. ❖The collection of these two local snapshots, determine the global state of the distributed system.