SlideShare a Scribd company logo
Global State Recording
Distributed Systems

Hamed Naeemaei

1
Models of communication
1.

In FIFO model, each channel acts as a first-in first-out message queue

and thus, message ordering is preserved by a channel.
2.

In non-FIFO model, a channel acts like a set in which the sender
process adds messages and the receiver process removes messages
from it in a random order.

3.

A system that supports causal delivery of messages satisfies the
following property:
“For any two messages mij and mkj , if send(mij ) −→ send(mkj ), then rec(mij ) −→ rec(mkj )”.

2
System model
• Cij denotes the channel from process Pi to process Pj and

its state is denoted by SCij .
• At any instant, the state of process Pi , denoted by LSi
• The actions performed by a process are modeled as three
types of events: Internal events , the message send
event and the message receive event.

3
Consistent global state

4
Cuts
Instant of local
observation

Time

P1
5

8
3

initial
value

P2
5

3

2

7

4
1

P3
4

5
ideal
(vertical)
cut
(15)
not attainable

0
consistent
cut
(15)

equivalent to a vertical cut
(rubber band transformation)

inconsistent
cut
(19)
can’t be made vertical
(message from the future)

5
Issues in recording a global state
I1: How to distinguish between the messages to be recorded
in the snapshot from those not to be recorded.
– Any message that is sent by a process before recording its
snapshot, must be recorded in the global snapshot (from C1).
– Any message that is sent by a process after recording its
snapshot, must not be recorded in the global snapshot (from C2).

I2: How to determine the instant when a process takes its
snapshot.
– A process must record its snapshot before processing a message
that was sent by process after recording its snapshot.

6
Spezialetti-Kearns algorithm(FIFO)
Chandy-Lamport Extension
 Exploit concurrently initiated snapshots to reduce overhead of local
snapshot exchange

• There are two phases in obtaining a global
snapshot: locally recording the snapshot at every
process and distributing the resultant global
snapshot to all the initiators.
snapshot recording :
• In the Spezialetti-Kearns algorithm, a markers
carries the identifier of the initiator of the
algorithm.
• Each process has a variable master to keep track of
the initiator of the algorithm.
7
Spezialetti-Kearns algorithm(FIFO)
Chandy-Lamport Extension
• A key notion used by the optimizations is that of a
region in the system. A region encompasses all the
processes whose master field contains the
identifier of the same initiator.
• The identifier of the concurrent initiator is
recorded in a local variable id-border -set.

8
Spezialetti-Kearns algorithm (cont.)
• The state of the channel is recorded just as in the
Chandy-Lamport algorithm.
• Snapshot recording at a process is complete after
it has received a marker along each of its
channels.
• After every process has recorded its snapshot,
the system is partitioned into as many regions as
the number of concurrent initiations of the
algorithm.
• Variable id-border-set at a process contains the
identifiers of the neighboring regions.
9
Spezialetti-Kearns algorithm (cont.)
Efficient dissemination of the recorded
snapshot
• In the snapshot recording phase, a forest of
spanning trees is implicitly created in the system.
The initiator of the algorithm is the root of a
spanning tree and all processes in its region
belong to its spanning tree.

10
Spezialetti-Kearns algorithm (cont.)
1) If Pi receives its first marker from Pj then: process Pj is the
parent of process Pi in the spanning tree.
2) When an intermediate process in a spanning tree has
received the recorded states from all its child processes
and has recorded the states of all incoming channels, it
forwards its locally recorded state and the locally recorded
states of all its descendent processes to its parent.
11
Spezialetti-Kearns algorithm (cont.)
3)

When the initiator receives the locally recorded states
of all its descendants from its children processes, it
assembles the snapshot for all the processes in its

region and the channels incident on these processes.

4)

The initiator exchanges the snapshot of its region with
the initiators in adjacent regions in rounds.
12
Spezialetti-Kearns algorithm (cont.)
Example

13
Snapshot Algorithms for Non-FIFO Channels
Lai-Yang Algorithm

• In a non-FIFO system, a marker cannot be used to
delineate messages into those to be recorded in the
global state from those not to be recorded in the
global state.
• In a non-FIFO system, either some degree of
inhibition or piggybacking of control information on
computation messages to capture out-of-sequence
messages is necessary to record a consistent global
snapshot.
• The Lai-Yang algorithm fulfills this role of a marker in
a non-FIFO system by using a coloring scheme on
computation messages that works as follows:
14
Snapshot Algorithms for Non-FIFO Channels
Lai-Yang Algorithm

– Every process is initially white and turns red while
taking a snapshot. The equivalent of the “Marker
Sending Rule” is executed when a process turns red.
– Every message sent by a white (red) process is
colored white (red).
– Thus, a white (red) message is a message that was
sent before (after) the sender of that message
recorded its local snapshot.
– Every white process takes its snapshot at its
convenience, but no later than the instant it
receives a red message.
15
Snapshot Algorithms for Non-FIFO Channels
Lai-Yang Algorithm

send (mij ) | send (mij ) LSi

rec(mij ) | rec(mij ) LS j

16
Snapshot Algorithms for Non-FIFO Channels
Lai-Yang Algorithm
Example

P
rw
rr

ww
wr
Q

17
Snapshot Algorithms for Non-FIFO Channels
Mattern’s Algorithm
• Mattern’s algorithm is based on vector clocks and assumes a single initiator
process and works as follows:
– The initiator “ticks” its local clock and selects a future vector time s at which it
would like a global snapshot to be recorded. It then broadcasts this time s and
freezes all activity until it receives all acknowledgements of the receipt of this

broadcast.
– When a process receives the broadcast, it remembers the value s and returns an
acknowledgement to the initiator.
– After having received an acknowledgement from every process, the initiator
increases its vector clock to s and broadcasts a dummy message to all processes.
18
Snapshot Algorithms for Non-FIFO Channels
Mattern’s Algorithm

– The receipt of this dummy message forces each
recipient to increase its clock to a value ≥ s if not
already ≥ s.
– Each process takes a local snapshot and sends it to
the initiator when (just before) its clock increases
from a value less than s to a value ≥ s.
– The state of Cij is all messages sent along Cij , whose
timestamp is smaller than s and which are received by
Pj after recording LSj .
19
20
Ad

More Related Content

What's hot (20)

11. dfs
11. dfs11. dfs
11. dfs
Dr Sandeep Kumar Poonia
 
Transport layer
Transport layerTransport layer
Transport layer
reshmadayma
 
Distributed system lamport's and vector algorithm
Distributed system lamport's and vector algorithmDistributed system lamport's and vector algorithm
Distributed system lamport's and vector algorithm
pinki soni
 
Operating system support in distributed system
Operating system support in distributed systemOperating system support in distributed system
Operating system support in distributed system
ishapadhy
 
Distributed Operating System_1
Distributed Operating System_1Distributed Operating System_1
Distributed Operating System_1
Dr Sandeep Kumar Poonia
 
Checkpointing.pptx
Checkpointing.pptxCheckpointing.pptx
Checkpointing.pptx
AzmiNizar1
 
strong slot and filler
strong slot and fillerstrong slot and filler
strong slot and filler
BMS Institute of Technology and Management
 
Methods for handling deadlock
Methods for handling deadlockMethods for handling deadlock
Methods for handling deadlock
sangrampatil81
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
Anamika Singh
 
Logical Clocks (Distributed computing)
Logical Clocks (Distributed computing)Logical Clocks (Distributed computing)
Logical Clocks (Distributed computing)
Sri Prasanna
 
6.Distributed Operating Systems
6.Distributed Operating Systems6.Distributed Operating Systems
6.Distributed Operating Systems
Dr Sandeep Kumar Poonia
 
8 memory management strategies
8 memory management strategies8 memory management strategies
8 memory management strategies
Dr. Loganathan R
 
Mobile Transport layer
Mobile Transport layerMobile Transport layer
Mobile Transport layer
Pallepati Vasavi
 
Unit 4 sp macro
Unit 4 sp macroUnit 4 sp macro
Unit 4 sp macro
Deepmala Sharma
 
Semaphore
SemaphoreSemaphore
Semaphore
Arafat Hossan
 
Synchronization - Election Algorithms
Synchronization  - Election AlgorithmsSynchronization  - Election Algorithms
Synchronization - Election Algorithms
OsaMa Hasan
 
Optimistic concurrency control in Distributed Systems
Optimistic concurrency control in Distributed SystemsOptimistic concurrency control in Distributed Systems
Optimistic concurrency control in Distributed Systems
mridul mishra
 
Agreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared MemoryAgreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared Memory
SHIKHA GAUTAM
 
Distributed Transaction
Distributed TransactionDistributed Transaction
Distributed Transaction
Pratik Tambekar
 
Tcp/ip server sockets
Tcp/ip server socketsTcp/ip server sockets
Tcp/ip server sockets
rajshreemuthiah
 
Distributed system lamport's and vector algorithm
Distributed system lamport's and vector algorithmDistributed system lamport's and vector algorithm
Distributed system lamport's and vector algorithm
pinki soni
 
Operating system support in distributed system
Operating system support in distributed systemOperating system support in distributed system
Operating system support in distributed system
ishapadhy
 
Checkpointing.pptx
Checkpointing.pptxCheckpointing.pptx
Checkpointing.pptx
AzmiNizar1
 
Methods for handling deadlock
Methods for handling deadlockMethods for handling deadlock
Methods for handling deadlock
sangrampatil81
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
Anamika Singh
 
Logical Clocks (Distributed computing)
Logical Clocks (Distributed computing)Logical Clocks (Distributed computing)
Logical Clocks (Distributed computing)
Sri Prasanna
 
8 memory management strategies
8 memory management strategies8 memory management strategies
8 memory management strategies
Dr. Loganathan R
 
Synchronization - Election Algorithms
Synchronization  - Election AlgorithmsSynchronization  - Election Algorithms
Synchronization - Election Algorithms
OsaMa Hasan
 
Optimistic concurrency control in Distributed Systems
Optimistic concurrency control in Distributed SystemsOptimistic concurrency control in Distributed Systems
Optimistic concurrency control in Distributed Systems
mridul mishra
 
Agreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared MemoryAgreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared Memory
SHIKHA GAUTAM
 

Similar to Global state recording in Distributed Systems (20)

Flexible Symmetric Global Snapshot
Flexible Symmetric Global Snapshot Flexible Symmetric Global Snapshot
Flexible Symmetric Global Snapshot
Ashutosh Jaiswal
 
CST 402 Distributed Computing Module 2 Notes
CST 402 Distributed Computing Module 2 NotesCST 402 Distributed Computing Module 2 Notes
CST 402 Distributed Computing Module 2 Notes
sm8i4
 
DISTRIBUTED COMPUTTING (snapshot).pptx
DISTRIBUTED COMPUTTING (snapshot).pptxDISTRIBUTED COMPUTTING (snapshot).pptx
DISTRIBUTED COMPUTTING (snapshot).pptx
950621104027GODWINJ
 
Design and analysis of algorithm chapter two.pptx
Design and analysis of algorithm chapter two.pptxDesign and analysis of algorithm chapter two.pptx
Design and analysis of algorithm chapter two.pptx
Tekle12
 
Computer Organization
Computer OrganizationComputer Organization
Computer Organization
JasmineShaik14
 
SAND: A Fault-Tolerant Streaming Architecture for Network Traffic Analytics
SAND: A Fault-Tolerant Streaming Architecture for Network Traffic AnalyticsSAND: A Fault-Tolerant Streaming Architecture for Network Traffic Analytics
SAND: A Fault-Tolerant Streaming Architecture for Network Traffic Analytics
Qin Liu
 
Digital-Unit-III.ppt
Digital-Unit-III.pptDigital-Unit-III.ppt
Digital-Unit-III.ppt
VijayalakshmiV16
 
Control unit design
Control unit designControl unit design
Control unit design
Dhaval Bagal
 
ch 2 - DISTRIBUTED DEADLOCK DETECTION.pptx
ch 2 - DISTRIBUTED DEADLOCK DETECTION.pptxch 2 - DISTRIBUTED DEADLOCK DETECTION.pptx
ch 2 - DISTRIBUTED DEADLOCK DETECTION.pptx
Ethiopia Satlliet television
 
SAMPLE FOR MICRO PROGRAMMING CO_-_7th_UNIT.pdf
SAMPLE FOR MICRO PROGRAMMING CO_-_7th_UNIT.pdfSAMPLE FOR MICRO PROGRAMMING CO_-_7th_UNIT.pdf
SAMPLE FOR MICRO PROGRAMMING CO_-_7th_UNIT.pdf
DrKalaavathiBuvanesh
 
운영체제론 Ch16
운영체제론 Ch16운영체제론 Ch16
운영체제론 Ch16
Jongmyoung Kim
 
Micro operation control of processor
Micro operation control of processorMicro operation control of processor
Micro operation control of processor
Muhammad Ishaq
 
Traffic Signal Synchronization Operating Systems
Traffic Signal Synchronization Operating SystemsTraffic Signal Synchronization Operating Systems
Traffic Signal Synchronization Operating Systems
abhishek2024sweco
 
slides-main.pdf
slides-main.pdfslides-main.pdf
slides-main.pdf
Matupi1
 
Central processing unit i
Central processing unit iCentral processing unit i
Central processing unit i
JyotiprakashMishra18
 
Control Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitControl Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unit
abdosaidgkv
 
Exploiting parallelism opportunities in non-parallel architectures to improve...
Exploiting parallelism opportunities in non-parallel architectures to improve...Exploiting parallelism opportunities in non-parallel architectures to improve...
Exploiting parallelism opportunities in non-parallel architectures to improve...
GreenLSI Team, LSI, UPM
 
Grds conferences icst and icbelsh (9)
Grds conferences icst and icbelsh (9)Grds conferences icst and icbelsh (9)
Grds conferences icst and icbelsh (9)
Global R & D Services
 
Synchronization
SynchronizationSynchronization
Synchronization
Sara shall
 
p2 p grid
 p2 p grid  p2 p grid
p2 p grid
Yogeshwari M Yogi
 
Flexible Symmetric Global Snapshot
Flexible Symmetric Global Snapshot Flexible Symmetric Global Snapshot
Flexible Symmetric Global Snapshot
Ashutosh Jaiswal
 
CST 402 Distributed Computing Module 2 Notes
CST 402 Distributed Computing Module 2 NotesCST 402 Distributed Computing Module 2 Notes
CST 402 Distributed Computing Module 2 Notes
sm8i4
 
DISTRIBUTED COMPUTTING (snapshot).pptx
DISTRIBUTED COMPUTTING (snapshot).pptxDISTRIBUTED COMPUTTING (snapshot).pptx
DISTRIBUTED COMPUTTING (snapshot).pptx
950621104027GODWINJ
 
Design and analysis of algorithm chapter two.pptx
Design and analysis of algorithm chapter two.pptxDesign and analysis of algorithm chapter two.pptx
Design and analysis of algorithm chapter two.pptx
Tekle12
 
SAND: A Fault-Tolerant Streaming Architecture for Network Traffic Analytics
SAND: A Fault-Tolerant Streaming Architecture for Network Traffic AnalyticsSAND: A Fault-Tolerant Streaming Architecture for Network Traffic Analytics
SAND: A Fault-Tolerant Streaming Architecture for Network Traffic Analytics
Qin Liu
 
Control unit design
Control unit designControl unit design
Control unit design
Dhaval Bagal
 
SAMPLE FOR MICRO PROGRAMMING CO_-_7th_UNIT.pdf
SAMPLE FOR MICRO PROGRAMMING CO_-_7th_UNIT.pdfSAMPLE FOR MICRO PROGRAMMING CO_-_7th_UNIT.pdf
SAMPLE FOR MICRO PROGRAMMING CO_-_7th_UNIT.pdf
DrKalaavathiBuvanesh
 
Micro operation control of processor
Micro operation control of processorMicro operation control of processor
Micro operation control of processor
Muhammad Ishaq
 
Traffic Signal Synchronization Operating Systems
Traffic Signal Synchronization Operating SystemsTraffic Signal Synchronization Operating Systems
Traffic Signal Synchronization Operating Systems
abhishek2024sweco
 
slides-main.pdf
slides-main.pdfslides-main.pdf
slides-main.pdf
Matupi1
 
Control Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitControl Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unit
abdosaidgkv
 
Exploiting parallelism opportunities in non-parallel architectures to improve...
Exploiting parallelism opportunities in non-parallel architectures to improve...Exploiting parallelism opportunities in non-parallel architectures to improve...
Exploiting parallelism opportunities in non-parallel architectures to improve...
GreenLSI Team, LSI, UPM
 
Synchronization
SynchronizationSynchronization
Synchronization
Sara shall
 
Ad

Recently uploaded (20)

SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdfBiophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
PKLI-Institute of Nursing and Allied Health Sciences Lahore , Pakistan.
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Ad

Global state recording in Distributed Systems

  • 1. Global State Recording Distributed Systems Hamed Naeemaei 1
  • 2. Models of communication 1. In FIFO model, each channel acts as a first-in first-out message queue and thus, message ordering is preserved by a channel. 2. In non-FIFO model, a channel acts like a set in which the sender process adds messages and the receiver process removes messages from it in a random order. 3. A system that supports causal delivery of messages satisfies the following property: “For any two messages mij and mkj , if send(mij ) −→ send(mkj ), then rec(mij ) −→ rec(mkj )”. 2
  • 3. System model • Cij denotes the channel from process Pi to process Pj and its state is denoted by SCij . • At any instant, the state of process Pi , denoted by LSi • The actions performed by a process are modeled as three types of events: Internal events , the message send event and the message receive event. 3
  • 5. Cuts Instant of local observation Time P1 5 8 3 initial value P2 5 3 2 7 4 1 P3 4 5 ideal (vertical) cut (15) not attainable 0 consistent cut (15) equivalent to a vertical cut (rubber band transformation) inconsistent cut (19) can’t be made vertical (message from the future) 5
  • 6. Issues in recording a global state I1: How to distinguish between the messages to be recorded in the snapshot from those not to be recorded. – Any message that is sent by a process before recording its snapshot, must be recorded in the global snapshot (from C1). – Any message that is sent by a process after recording its snapshot, must not be recorded in the global snapshot (from C2). I2: How to determine the instant when a process takes its snapshot. – A process must record its snapshot before processing a message that was sent by process after recording its snapshot. 6
  • 7. Spezialetti-Kearns algorithm(FIFO) Chandy-Lamport Extension  Exploit concurrently initiated snapshots to reduce overhead of local snapshot exchange • There are two phases in obtaining a global snapshot: locally recording the snapshot at every process and distributing the resultant global snapshot to all the initiators. snapshot recording : • In the Spezialetti-Kearns algorithm, a markers carries the identifier of the initiator of the algorithm. • Each process has a variable master to keep track of the initiator of the algorithm. 7
  • 8. Spezialetti-Kearns algorithm(FIFO) Chandy-Lamport Extension • A key notion used by the optimizations is that of a region in the system. A region encompasses all the processes whose master field contains the identifier of the same initiator. • The identifier of the concurrent initiator is recorded in a local variable id-border -set. 8
  • 9. Spezialetti-Kearns algorithm (cont.) • The state of the channel is recorded just as in the Chandy-Lamport algorithm. • Snapshot recording at a process is complete after it has received a marker along each of its channels. • After every process has recorded its snapshot, the system is partitioned into as many regions as the number of concurrent initiations of the algorithm. • Variable id-border-set at a process contains the identifiers of the neighboring regions. 9
  • 10. Spezialetti-Kearns algorithm (cont.) Efficient dissemination of the recorded snapshot • In the snapshot recording phase, a forest of spanning trees is implicitly created in the system. The initiator of the algorithm is the root of a spanning tree and all processes in its region belong to its spanning tree. 10
  • 11. Spezialetti-Kearns algorithm (cont.) 1) If Pi receives its first marker from Pj then: process Pj is the parent of process Pi in the spanning tree. 2) When an intermediate process in a spanning tree has received the recorded states from all its child processes and has recorded the states of all incoming channels, it forwards its locally recorded state and the locally recorded states of all its descendent processes to its parent. 11
  • 12. Spezialetti-Kearns algorithm (cont.) 3) When the initiator receives the locally recorded states of all its descendants from its children processes, it assembles the snapshot for all the processes in its region and the channels incident on these processes. 4) The initiator exchanges the snapshot of its region with the initiators in adjacent regions in rounds. 12
  • 14. Snapshot Algorithms for Non-FIFO Channels Lai-Yang Algorithm • In a non-FIFO system, a marker cannot be used to delineate messages into those to be recorded in the global state from those not to be recorded in the global state. • In a non-FIFO system, either some degree of inhibition or piggybacking of control information on computation messages to capture out-of-sequence messages is necessary to record a consistent global snapshot. • The Lai-Yang algorithm fulfills this role of a marker in a non-FIFO system by using a coloring scheme on computation messages that works as follows: 14
  • 15. Snapshot Algorithms for Non-FIFO Channels Lai-Yang Algorithm – Every process is initially white and turns red while taking a snapshot. The equivalent of the “Marker Sending Rule” is executed when a process turns red. – Every message sent by a white (red) process is colored white (red). – Thus, a white (red) message is a message that was sent before (after) the sender of that message recorded its local snapshot. – Every white process takes its snapshot at its convenience, but no later than the instant it receives a red message. 15
  • 16. Snapshot Algorithms for Non-FIFO Channels Lai-Yang Algorithm send (mij ) | send (mij ) LSi rec(mij ) | rec(mij ) LS j 16
  • 17. Snapshot Algorithms for Non-FIFO Channels Lai-Yang Algorithm Example P rw rr ww wr Q 17
  • 18. Snapshot Algorithms for Non-FIFO Channels Mattern’s Algorithm • Mattern’s algorithm is based on vector clocks and assumes a single initiator process and works as follows: – The initiator “ticks” its local clock and selects a future vector time s at which it would like a global snapshot to be recorded. It then broadcasts this time s and freezes all activity until it receives all acknowledgements of the receipt of this broadcast. – When a process receives the broadcast, it remembers the value s and returns an acknowledgement to the initiator. – After having received an acknowledgement from every process, the initiator increases its vector clock to s and broadcasts a dummy message to all processes. 18
  • 19. Snapshot Algorithms for Non-FIFO Channels Mattern’s Algorithm – The receipt of this dummy message forces each recipient to increase its clock to a value ≥ s if not already ≥ s. – Each process takes a local snapshot and sends it to the initiator when (just before) its clock increases from a value less than s to a value ≥ s. – The state of Cij is all messages sent along Cij , whose timestamp is smaller than s and which are received by Pj after recording LSj . 19
  • 20. 20