SlideShare a Scribd company logo
1 of 22
Download to read offline
TIME AND GLOBAL STATES
Deepak John
Department Of Computer Applications,SJCET-Pala
IntroductionIntroduction
 Time is an Important and interesting issue in distributes systems.
One we can measure accurately. Can use as a metric.y
 Consistency of distributed data, transactions, authenticity checks
(ticket lifetimes),duplication detection, distributed debugging and
b d t ti tgarbage detection, etc.
 A device that count oscillations occurring in a crystal at a definite
frequencyq y
 Hardware time: Hi(t)
 The counts of oscillation since an original point
S ft ti C ( ) H ( )+ Software time: Ci(t) = Hi(t)+
 Timestamp of an event
Clock skew and clock drift
 l k kClock skew
Instantaneous difference between readings of any two clocks
Clock drift
Variations in how clocks count time (oscillations in a crystal), which
cause divergence between clocks
Network
Clock synchronization using a time server: Cristian’s
method
mr
mt
p Time server,S
Periodically, each machine sends a message to the time server
asking for the current timeg
Machine responds with CUTC as fast as it can
The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again.
1 The master polls the slaves’ clocks
The Berkeley algorithms
1. The master polls the slaves’ clocks
2. The master estimates the slaves’ clocks by round-trip time
 Similar to Christian’s algorithmg
3. The master averages the slaves’ clock values
 Cancel out the individual clock’s tendencies to run fast or
lslow
4. The master sends back to the slaves the amount that the slaves’
clocks should adjust by
 Positive or negative value
 Avoid further uncertainty due to the message transmission
timetime
 Slave adjust its clock
NTP: The Network Time Protocol- Mills
 To provide a service enabling clients across the internet to be
synchronized accurately to UTC
 NTP employs techniques for filtering of timing data and it
discriminates between the quality of timing data from differentdiscriminates between the quality of timing data from different
servers.
 To provide a reliable service that can survive lengthy losses of
connectivity:
 There are redundant servers and redundant paths between servers;
server can reconfigure in case of failuresserver can reconfigure in case of failures.
 scale to large number of clients and servers
 To provide protection against interference with the time service To provide protection against interference with the time service
whether accidental or malicious
 Hierarchical structure for the time servers
 NTP servers synchronize with each other in one of three modes: in
the order of accuracy.
1. Multicast mode
 Intend for use on a high speed LAN Intend for use on a high speed LAN
 Assuming a small delay
 Low accuracy but efficient
2. Procedure-call mode
 Similar to Christian’s
 Higher accuracy than multicast Higher accuracy than multicast
3. Symmetric mode
 The highest accuracyg y
 Reconfigure when servers become unreachable
An example synchronization subnet in an NTP implementation
1
Primary servers are
connected to a time
source,
2 2
Secondary servers
are synchronized
with primary servers.
3 3 3
p y
Note: Arrows denote synchronization control, numbers denote strata.
Messages exchanged between a pair of NTP peers
All messages use UDP and so deliver unreliably.
Each message carries three time stamps: sent time, recd time, time of
this message.
Ti-1Ti-2Server B
Time
g
m m'
TiTi- 3Server A
Time
Logical Time and logical ClockLogical Time and logical Clock
 Logical time is an alternative; it gives ordering of events, rather than
exact timestamp of occurrence.
 Happen-before relation (→) is a partial order on events that reflects a
flow of information between them.
Th l f ‘H B f ’ l ti Three rules for ‘Happen Before’ relation.
The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again.
Logical clocks (LC)Logical clocks (LC)
 Logical clock is a monotonically increasing software counter that is
updated according to the happened-before relationship between
tevents.
 Each process pi has a logical clock Li, which can be used to apply
logical timestamps to events.logical timestamps to events.
 Rules or Lamports algorithm for logical clocks:The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again.
Events occurring at three processes
The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again.
Lamport timestamps
 e  e`  L(e) < L(e`)
 L(e) < L(e`)  e  e` or e||e` L(e) L(e )  e  e or e||e
The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again.
Vector Clock
 A vector clock for a system of N processes is an array of N integersy p y g
 Each process keeps its own vector clock Vi, which it uses to
timestamp local event
 Processes piggyback vector timestamps on the messages they send Processes piggyback vector timestamps on the messages they send
to one another
Global StateGlobal State
 The global state of a distributed computation is the set of local states
of all individual processes involved in the computation plus the state
of the communication channels.
 The set of local states for a global set called the “cut”. A cut
represents the last event that has been recorded for each of severalrepresents the last event that has been recorded for each of several
processes.
 All recorded message receipts have a corresponding recorded send
event
A cut C is consistent if for each event it contains all the events that
happened-before(HB) that event.
An inconsistent cut would have a receipt of a message but no
corresponding send event.
A consistent global state is one that corresponds to a consistent cut
p1
e 1
0
e 1
1
e 1
2
e 1
3
A consistent global state is one that corresponds to a consistent cut.
m1 m2
p2
Physical
p2 time
Inconsistent cut
e 2
0
e 2
1
e 2
2
Consistent cut
Inconsistent cut
 Distributed garbage collection
Requirements of global states
 Based on reference counting
 Should include the state of communication channels.
 referring object may be in a message in transit referring object may be in a message in transit.
The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again.
 Distributed deadlock detection
 Look for “waits-for”
relationship
 Distributed termination
detection.detection.
 consider a system where each
process is active or passive.
h k b we check processes one-by-
one; has the system
terminated if all are passive?p
 p2 is passive but there is a
message for p1 in transit
Distributed debuggingDistributed debugging
Need collect values of distributed variables at the same time
Chandy and Lamport’s Snapshot Algorithm
 Assume the distributed system can be represented as a collection of Assume the distributed system can be represented as a collection of
processes connected to each other through uni-directional point-to-
point communication channels.
 the algorithm may be initiated by any process. Consider two
processes P and Q
 P records its own local state P records its own local state
 It sends a marker along each of its outgoing channels, indicating
that the receiver should participate in recording the global state.
 When process Q receives the marker through an incoming
channel C, its action depends on whether or not it has already
saved its local statesaved its local state
Marker receiving rule for process pi
On pi’s receipt of a marker message over channel c:
if ( h t t d d it t t ) itif (pi has not yet recorded its state) it
records its process state now;
records the state of c as the empty set;
turns on recording of messages arriving over other incoming
channels;
else
pi records the state of c as the set of messages it has received over c
since it saved its state.
end ifend if
Marker sending rule for process pi
After pi has recorded its state, for each outgoing channel c:
p sends one marker message over cpi sends one marker message over c
(before it sends any other message over c).

More Related Content

What's hot

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 MemorySHIKHA GAUTAM
 
Logical Clocks (Distributed computing)
Logical Clocks (Distributed computing)Logical Clocks (Distributed computing)
Logical Clocks (Distributed computing)Sri Prasanna
 
Load Balancing In Distributed Computing
Load Balancing In Distributed ComputingLoad Balancing In Distributed Computing
Load Balancing In Distributed ComputingRicha Singh
 
Client Centric Consistency Model
Client Centric Consistency ModelClient Centric Consistency Model
Client Centric Consistency ModelRajat Kumar
 
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 algorithmpinki soni
 
Distributed shred memory architecture
Distributed shred memory architectureDistributed shred memory architecture
Distributed shred memory architectureMaulik Togadiya
 
Communication in Distributed Systems
Communication in Distributed SystemsCommunication in Distributed Systems
Communication in Distributed SystemsDilum Bandara
 
Physical and Logical Clocks
Physical and Logical ClocksPhysical and Logical Clocks
Physical and Logical ClocksDilum Bandara
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communicationAbDul ThaYyal
 
Inter-Process Communication in distributed systems
Inter-Process Communication in distributed systemsInter-Process Communication in distributed systems
Inter-Process Communication in distributed systemsAya Mahmoud
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed systemSunita Sahu
 
Processor allocation in Distributed Systems
Processor allocation in Distributed SystemsProcessor allocation in Distributed Systems
Processor allocation in Distributed SystemsRitu Ranjan Shrivastwa
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memoryAshish Kumar
 
File replication
File replicationFile replication
File replicationKlawal13
 
Structure of shared memory space
Structure of shared memory spaceStructure of shared memory space
Structure of shared memory spaceCoder Tech
 
Consistency in Distributed Systems
Consistency in Distributed SystemsConsistency in Distributed Systems
Consistency in Distributed SystemsShane Johnson
 
Consistency protocols
Consistency protocolsConsistency protocols
Consistency protocolsZongYing Lyu
 

What's hot (20)

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
 
Chapter 10
Chapter 10Chapter 10
Chapter 10
 
Logical Clocks (Distributed computing)
Logical Clocks (Distributed computing)Logical Clocks (Distributed computing)
Logical Clocks (Distributed computing)
 
Load Balancing In Distributed Computing
Load Balancing In Distributed ComputingLoad Balancing In Distributed Computing
Load Balancing In Distributed Computing
 
Client Centric Consistency Model
Client Centric Consistency ModelClient Centric Consistency Model
Client Centric Consistency Model
 
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
 
Distributed shred memory architecture
Distributed shred memory architectureDistributed shred memory architecture
Distributed shred memory architecture
 
Communication in Distributed Systems
Communication in Distributed SystemsCommunication in Distributed Systems
Communication in Distributed Systems
 
Physical and Logical Clocks
Physical and Logical ClocksPhysical and Logical Clocks
Physical and Logical Clocks
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communication
 
Clocks
ClocksClocks
Clocks
 
Inter-Process Communication in distributed systems
Inter-Process Communication in distributed systemsInter-Process Communication in distributed systems
Inter-Process Communication in distributed systems
 
Message passing in Distributed Computing Systems
Message passing in Distributed Computing SystemsMessage passing in Distributed Computing Systems
Message passing in Distributed Computing Systems
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system
 
Processor allocation in Distributed Systems
Processor allocation in Distributed SystemsProcessor allocation in Distributed Systems
Processor allocation in Distributed Systems
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
 
File replication
File replicationFile replication
File replication
 
Structure of shared memory space
Structure of shared memory spaceStructure of shared memory space
Structure of shared memory space
 
Consistency in Distributed Systems
Consistency in Distributed SystemsConsistency in Distributed Systems
Consistency in Distributed Systems
 
Consistency protocols
Consistency protocolsConsistency protocols
Consistency protocols
 

Viewers also liked

Clock Synchronization in Distributed Systems
Clock Synchronization in Distributed SystemsClock Synchronization in Distributed Systems
Clock Synchronization in Distributed SystemsZbigniew Jerzak
 
Flexible Symmetric Global Snapshot
Flexible Symmetric Global Snapshot Flexible Symmetric Global Snapshot
Flexible Symmetric Global Snapshot Ashutosh Jaiswal
 
Distributed Snapshots
Distributed SnapshotsDistributed Snapshots
Distributed Snapshotsawesomesos
 
network filesystem briefs
network filesystem briefsnetwork filesystem briefs
network filesystem briefsbergwolf
 
Global state recording in Distributed Systems
Global state recording in Distributed SystemsGlobal state recording in Distributed Systems
Global state recording in Distributed SystemsArsnet
 
Posix threads(asha)
Posix threads(asha)Posix threads(asha)
Posix threads(asha)Nagarajan
 
Day 2 global_state_and_snapshot_algorithms
Day 2 global_state_and_snapshot_algorithmsDay 2 global_state_and_snapshot_algorithms
Day 2 global_state_and_snapshot_algorithmsVI Ni
 
LDAP - Lightweight Directory Access Protocol
LDAP - Lightweight Directory Access ProtocolLDAP - Lightweight Directory Access Protocol
LDAP - Lightweight Directory Access ProtocolS. Hasnain Raza
 
The Ldap Protocol
The Ldap ProtocolThe Ldap Protocol
The Ldap ProtocolGlen Plantz
 
Lamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusionLamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusionNeelamani Samal
 
clock synchronization in Distributed System
clock synchronization in Distributed System clock synchronization in Distributed System
clock synchronization in Distributed System Harshita Ved
 
Mutual Exclusion Election (Distributed computing)
Mutual Exclusion Election (Distributed computing)Mutual Exclusion Election (Distributed computing)
Mutual Exclusion Election (Distributed computing)Sri Prasanna
 
LDAP Presentation
LDAP PresentationLDAP Presentation
LDAP Presentationcyberleon95
 

Viewers also liked (20)

Clock Synchronization in Distributed Systems
Clock Synchronization in Distributed SystemsClock Synchronization in Distributed Systems
Clock Synchronization in Distributed Systems
 
LDAP
LDAPLDAP
LDAP
 
Flexible Symmetric Global Snapshot
Flexible Symmetric Global Snapshot Flexible Symmetric Global Snapshot
Flexible Symmetric Global Snapshot
 
Distributed Snapshots
Distributed SnapshotsDistributed Snapshots
Distributed Snapshots
 
network filesystem briefs
network filesystem briefsnetwork filesystem briefs
network filesystem briefs
 
Global state recording in Distributed Systems
Global state recording in Distributed SystemsGlobal state recording in Distributed Systems
Global state recording in Distributed Systems
 
Posix threads(asha)
Posix threads(asha)Posix threads(asha)
Posix threads(asha)
 
Day 2 global_state_and_snapshot_algorithms
Day 2 global_state_and_snapshot_algorithmsDay 2 global_state_and_snapshot_algorithms
Day 2 global_state_and_snapshot_algorithms
 
AD & LDAP
AD & LDAPAD & LDAP
AD & LDAP
 
LDAP - Lightweight Directory Access Protocol
LDAP - Lightweight Directory Access ProtocolLDAP - Lightweight Directory Access Protocol
LDAP - Lightweight Directory Access Protocol
 
Coda file system tahir
Coda file system   tahirCoda file system   tahir
Coda file system tahir
 
Posix Threads
Posix ThreadsPosix Threads
Posix Threads
 
The Ldap Protocol
The Ldap ProtocolThe Ldap Protocol
The Ldap Protocol
 
Coda file system
Coda file systemCoda file system
Coda file system
 
Ldap introduction (eng)
Ldap introduction (eng)Ldap introduction (eng)
Ldap introduction (eng)
 
Lamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusionLamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusion
 
LDAP Theory
LDAP TheoryLDAP Theory
LDAP Theory
 
clock synchronization in Distributed System
clock synchronization in Distributed System clock synchronization in Distributed System
clock synchronization in Distributed System
 
Mutual Exclusion Election (Distributed computing)
Mutual Exclusion Election (Distributed computing)Mutual Exclusion Election (Distributed computing)
Mutual Exclusion Election (Distributed computing)
 
LDAP Presentation
LDAP PresentationLDAP Presentation
LDAP Presentation
 

Similar to Distributed computing time

Tta protocolsfinalppt-140305235749-phpapp02
Tta protocolsfinalppt-140305235749-phpapp02Tta protocolsfinalppt-140305235749-phpapp02
Tta protocolsfinalppt-140305235749-phpapp02Hrudya Balachandran
 
A Deterministic Model Of Time For Distributed Systems
A Deterministic Model Of Time For Distributed SystemsA Deterministic Model Of Time For Distributed Systems
A Deterministic Model Of Time For Distributed SystemsJim Webb
 
Concurrency in Distributed Systems : Leslie Lamport papers
Concurrency in Distributed Systems : Leslie Lamport papersConcurrency in Distributed Systems : Leslie Lamport papers
Concurrency in Distributed Systems : Leslie Lamport papersSubhajit Sahu
 
Computer network (13)
Computer network (13)Computer network (13)
Computer network (13)NYversity
 
CS6601-Unit 4 Distributed Systems
CS6601-Unit 4 Distributed SystemsCS6601-Unit 4 Distributed Systems
CS6601-Unit 4 Distributed SystemsNandakumar P
 
Unit iii-Synchronization
Unit iii-SynchronizationUnit iii-Synchronization
Unit iii-SynchronizationDhivyaa C.R
 
Synchronization in distributed computing
Synchronization in distributed computingSynchronization in distributed computing
Synchronization in distributed computingSVijaylakshmi
 
Stochastic modelling and its applications
Stochastic modelling and its applicationsStochastic modelling and its applications
Stochastic modelling and its applicationsKartavya Jain
 
Ch17 OS
Ch17 OSCh17 OS
Ch17 OSC.U
 

Similar to Distributed computing time (20)

Chap 5
Chap 5Chap 5
Chap 5
 
Time in distributed systmes
Time in distributed systmesTime in distributed systmes
Time in distributed systmes
 
Chapter 6 synchronization
Chapter 6 synchronizationChapter 6 synchronization
Chapter 6 synchronization
 
Tta protocolsfinalppt-140305235749-phpapp02
Tta protocolsfinalppt-140305235749-phpapp02Tta protocolsfinalppt-140305235749-phpapp02
Tta protocolsfinalppt-140305235749-phpapp02
 
Clock.pdf
Clock.pdfClock.pdf
Clock.pdf
 
Synch
SynchSynch
Synch
 
slides.06.pptx
slides.06.pptxslides.06.pptx
slides.06.pptx
 
Pdp12
Pdp12Pdp12
Pdp12
 
A Deterministic Model Of Time For Distributed Systems
A Deterministic Model Of Time For Distributed SystemsA Deterministic Model Of Time For Distributed Systems
A Deterministic Model Of Time For Distributed Systems
 
Concurrency in Distributed Systems : Leslie Lamport papers
Concurrency in Distributed Systems : Leslie Lamport papersConcurrency in Distributed Systems : Leslie Lamport papers
Concurrency in Distributed Systems : Leslie Lamport papers
 
Computer network (13)
Computer network (13)Computer network (13)
Computer network (13)
 
Stream Processing Overview
Stream Processing OverviewStream Processing Overview
Stream Processing Overview
 
CS6601-Unit 4 Distributed Systems
CS6601-Unit 4 Distributed SystemsCS6601-Unit 4 Distributed Systems
CS6601-Unit 4 Distributed Systems
 
Os3
Os3Os3
Os3
 
Distributed System
Distributed SystemDistributed System
Distributed System
 
Data link layer tutorial
Data link layer tutorialData link layer tutorial
Data link layer tutorial
 
Unit iii-Synchronization
Unit iii-SynchronizationUnit iii-Synchronization
Unit iii-Synchronization
 
Synchronization in distributed computing
Synchronization in distributed computingSynchronization in distributed computing
Synchronization in distributed computing
 
Stochastic modelling and its applications
Stochastic modelling and its applicationsStochastic modelling and its applications
Stochastic modelling and its applications
 
Ch17 OS
Ch17 OSCh17 OS
Ch17 OS
 

More from Deepak John

Network concepts and wi fi
Network concepts and wi fiNetwork concepts and wi fi
Network concepts and wi fiDeepak John
 
Web browser week5 presentation
Web browser week5 presentationWeb browser week5 presentation
Web browser week5 presentationDeepak John
 
Information management
Information managementInformation management
Information managementDeepak John
 
It security,malware,phishing,information theft
It security,malware,phishing,information theftIt security,malware,phishing,information theft
It security,malware,phishing,information theftDeepak John
 
Email,contacts and calendar
Email,contacts and calendarEmail,contacts and calendar
Email,contacts and calendarDeepak John
 
Module 2 instruction set
Module 2 instruction set Module 2 instruction set
Module 2 instruction set Deepak John
 
introduction to computers
 introduction to computers introduction to computers
introduction to computersDeepak John
 
Registers and counters
Registers and counters Registers and counters
Registers and counters Deepak John
 
Computer security module 4
Computer security module 4Computer security module 4
Computer security module 4Deepak John
 
Module 4 network and computer security
Module  4 network and computer securityModule  4 network and computer security
Module 4 network and computer securityDeepak John
 
Network and computer security-
Network and computer security-Network and computer security-
Network and computer security-Deepak John
 
Computer security module 3
Computer security module 3Computer security module 3
Computer security module 3Deepak John
 
Module 4 registers and counters
Module 4 registers and counters Module 4 registers and counters
Module 4 registers and counters Deepak John
 
Module 2 network and computer security
Module 2 network and computer securityModule 2 network and computer security
Module 2 network and computer securityDeepak John
 
Computer security module 2
Computer security module 2Computer security module 2
Computer security module 2Deepak John
 
Computer security module 1
Computer security module 1Computer security module 1
Computer security module 1Deepak John
 
Network and Computer security
Network and Computer securityNetwork and Computer security
Network and Computer securityDeepak John
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logicDeepak John
 
Module 2 logic gates
Module 2  logic gatesModule 2  logic gates
Module 2 logic gatesDeepak John
 

More from Deepak John (20)

Network concepts and wi fi
Network concepts and wi fiNetwork concepts and wi fi
Network concepts and wi fi
 
Web browser week5 presentation
Web browser week5 presentationWeb browser week5 presentation
Web browser week5 presentation
 
Information management
Information managementInformation management
Information management
 
It security,malware,phishing,information theft
It security,malware,phishing,information theftIt security,malware,phishing,information theft
It security,malware,phishing,information theft
 
Email,contacts and calendar
Email,contacts and calendarEmail,contacts and calendar
Email,contacts and calendar
 
Module 1 8086
Module 1 8086Module 1 8086
Module 1 8086
 
Module 2 instruction set
Module 2 instruction set Module 2 instruction set
Module 2 instruction set
 
introduction to computers
 introduction to computers introduction to computers
introduction to computers
 
Registers and counters
Registers and counters Registers and counters
Registers and counters
 
Computer security module 4
Computer security module 4Computer security module 4
Computer security module 4
 
Module 4 network and computer security
Module  4 network and computer securityModule  4 network and computer security
Module 4 network and computer security
 
Network and computer security-
Network and computer security-Network and computer security-
Network and computer security-
 
Computer security module 3
Computer security module 3Computer security module 3
Computer security module 3
 
Module 4 registers and counters
Module 4 registers and counters Module 4 registers and counters
Module 4 registers and counters
 
Module 2 network and computer security
Module 2 network and computer securityModule 2 network and computer security
Module 2 network and computer security
 
Computer security module 2
Computer security module 2Computer security module 2
Computer security module 2
 
Computer security module 1
Computer security module 1Computer security module 1
Computer security module 1
 
Network and Computer security
Network and Computer securityNetwork and Computer security
Network and Computer security
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logic
 
Module 2 logic gates
Module 2  logic gatesModule 2  logic gates
Module 2 logic gates
 

Recently uploaded

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
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
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 

Recently uploaded (20)

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
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
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 

Distributed computing time

  • 1. TIME AND GLOBAL STATES Deepak John Department Of Computer Applications,SJCET-Pala
  • 2. IntroductionIntroduction  Time is an Important and interesting issue in distributes systems. One we can measure accurately. Can use as a metric.y  Consistency of distributed data, transactions, authenticity checks (ticket lifetimes),duplication detection, distributed debugging and b d t ti tgarbage detection, etc.  A device that count oscillations occurring in a crystal at a definite frequencyq y  Hardware time: Hi(t)  The counts of oscillation since an original point S ft ti C ( ) H ( )+ Software time: Ci(t) = Hi(t)+  Timestamp of an event
  • 3. Clock skew and clock drift  l k kClock skew Instantaneous difference between readings of any two clocks Clock drift Variations in how clocks count time (oscillations in a crystal), which cause divergence between clocks Network
  • 4. Clock synchronization using a time server: Cristian’s method mr mt p Time server,S Periodically, each machine sends a message to the time server asking for the current timeg Machine responds with CUTC as fast as it can
  • 5.
  • 6. The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again.
  • 7. 1 The master polls the slaves’ clocks The Berkeley algorithms 1. The master polls the slaves’ clocks 2. The master estimates the slaves’ clocks by round-trip time  Similar to Christian’s algorithmg 3. The master averages the slaves’ clock values  Cancel out the individual clock’s tendencies to run fast or lslow 4. The master sends back to the slaves the amount that the slaves’ clocks should adjust by  Positive or negative value  Avoid further uncertainty due to the message transmission timetime  Slave adjust its clock
  • 8. NTP: The Network Time Protocol- Mills  To provide a service enabling clients across the internet to be synchronized accurately to UTC  NTP employs techniques for filtering of timing data and it discriminates between the quality of timing data from differentdiscriminates between the quality of timing data from different servers.  To provide a reliable service that can survive lengthy losses of connectivity:  There are redundant servers and redundant paths between servers; server can reconfigure in case of failuresserver can reconfigure in case of failures.  scale to large number of clients and servers  To provide protection against interference with the time service To provide protection against interference with the time service whether accidental or malicious
  • 9.  Hierarchical structure for the time servers  NTP servers synchronize with each other in one of three modes: in the order of accuracy. 1. Multicast mode  Intend for use on a high speed LAN Intend for use on a high speed LAN  Assuming a small delay  Low accuracy but efficient 2. Procedure-call mode  Similar to Christian’s  Higher accuracy than multicast Higher accuracy than multicast 3. Symmetric mode  The highest accuracyg y  Reconfigure when servers become unreachable
  • 10. An example synchronization subnet in an NTP implementation 1 Primary servers are connected to a time source, 2 2 Secondary servers are synchronized with primary servers. 3 3 3 p y Note: Arrows denote synchronization control, numbers denote strata.
  • 11. Messages exchanged between a pair of NTP peers All messages use UDP and so deliver unreliably. Each message carries three time stamps: sent time, recd time, time of this message. Ti-1Ti-2Server B Time g m m' TiTi- 3Server A Time
  • 12. Logical Time and logical ClockLogical Time and logical Clock  Logical time is an alternative; it gives ordering of events, rather than exact timestamp of occurrence.  Happen-before relation (→) is a partial order on events that reflects a flow of information between them. Th l f ‘H B f ’ l ti Three rules for ‘Happen Before’ relation. The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again.
  • 13. Logical clocks (LC)Logical clocks (LC)  Logical clock is a monotonically increasing software counter that is updated according to the happened-before relationship between tevents.  Each process pi has a logical clock Li, which can be used to apply logical timestamps to events.logical timestamps to events.  Rules or Lamports algorithm for logical clocks:The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again.
  • 14. Events occurring at three processes The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again.
  • 15. Lamport timestamps  e  e`  L(e) < L(e`)  L(e) < L(e`)  e  e` or e||e` L(e) L(e )  e  e or e||e The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again.
  • 16. Vector Clock  A vector clock for a system of N processes is an array of N integersy p y g  Each process keeps its own vector clock Vi, which it uses to timestamp local event  Processes piggyback vector timestamps on the messages they send Processes piggyback vector timestamps on the messages they send to one another
  • 17. Global StateGlobal State  The global state of a distributed computation is the set of local states of all individual processes involved in the computation plus the state of the communication channels.  The set of local states for a global set called the “cut”. A cut represents the last event that has been recorded for each of severalrepresents the last event that has been recorded for each of several processes.  All recorded message receipts have a corresponding recorded send event
  • 18. A cut C is consistent if for each event it contains all the events that happened-before(HB) that event. An inconsistent cut would have a receipt of a message but no corresponding send event. A consistent global state is one that corresponds to a consistent cut p1 e 1 0 e 1 1 e 1 2 e 1 3 A consistent global state is one that corresponds to a consistent cut. m1 m2 p2 Physical p2 time Inconsistent cut e 2 0 e 2 1 e 2 2 Consistent cut Inconsistent cut
  • 19.  Distributed garbage collection Requirements of global states  Based on reference counting  Should include the state of communication channels.  referring object may be in a message in transit referring object may be in a message in transit. The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again.
  • 20.  Distributed deadlock detection  Look for “waits-for” relationship  Distributed termination detection.detection.  consider a system where each process is active or passive. h k b we check processes one-by- one; has the system terminated if all are passive?p  p2 is passive but there is a message for p1 in transit Distributed debuggingDistributed debugging Need collect values of distributed variables at the same time
  • 21. Chandy and Lamport’s Snapshot Algorithm  Assume the distributed system can be represented as a collection of Assume the distributed system can be represented as a collection of processes connected to each other through uni-directional point-to- point communication channels.  the algorithm may be initiated by any process. Consider two processes P and Q  P records its own local state P records its own local state  It sends a marker along each of its outgoing channels, indicating that the receiver should participate in recording the global state.  When process Q receives the marker through an incoming channel C, its action depends on whether or not it has already saved its local statesaved its local state
  • 22. Marker receiving rule for process pi On pi’s receipt of a marker message over channel c: if ( h t t d d it t t ) itif (pi has not yet recorded its state) it records its process state now; records the state of c as the empty set; turns on recording of messages arriving over other incoming channels; else pi records the state of c as the set of messages it has received over c since it saved its state. end ifend if Marker sending rule for process pi After pi has recorded its state, for each outgoing channel c: p sends one marker message over cpi sends one marker message over c (before it sends any other message over c).