SlideShare a Scribd company logo
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
Distributed computing time
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).
Ad

More Related Content

What's hot (20)

Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
Ashita Agrawal
 
Case Study - SUN NFS
Case Study - SUN NFSCase Study - SUN NFS
Case Study - SUN NFS
Ashish KC
 
Asynchronous programming in C#
Asynchronous programming in C#Asynchronous programming in C#
Asynchronous programming in C#
Bohdan Pashkovskyi
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocols
JUW Jinnah University for Women
 
SOA
SOASOA
SOA
Indeevari Ramanayake
 
Communication in Distributed Systems
Communication in Distributed SystemsCommunication in Distributed Systems
Communication in Distributed Systems
Dilum Bandara
 
The CAP Theorem
The CAP Theorem The CAP Theorem
The CAP Theorem
Aleksandar Bradic
 
Distributed web based systems
Distributed web based systemsDistributed web based systems
Distributed web based systems
Reza Gh
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure calls
Ashish Kumar
 
Peer to Peer services and File systems
Peer to Peer services and File systemsPeer to Peer services and File systems
Peer to Peer services and File systems
MNM Jain Engineering College
 
6.Distributed Operating Systems
6.Distributed Operating Systems6.Distributed Operating Systems
6.Distributed Operating Systems
Dr Sandeep Kumar Poonia
 
Distributed DBMS - Unit 6 - Query Processing
Distributed DBMS - Unit 6 - Query ProcessingDistributed DBMS - Unit 6 - Query Processing
Distributed DBMS - Unit 6 - Query Processing
Gyanmanjari Institute Of Technology
 
Distributed System-Multicast & Indirect communication
Distributed System-Multicast & Indirect communicationDistributed System-Multicast & Indirect communication
Distributed System-Multicast & Indirect communication
MNM Jain Engineering College
 
Software Defined Networks
Software Defined NetworksSoftware Defined Networks
Software Defined Networks
Shreeya Shah
 
Process Management-Process Migration
Process Management-Process MigrationProcess Management-Process Migration
Process Management-Process Migration
MNM Jain Engineering College
 
Group Communication (Distributed computing)
Group Communication (Distributed computing)Group Communication (Distributed computing)
Group Communication (Distributed computing)
Sri Prasanna
 
Domain name system
Domain name systemDomain name system
Domain name system
Siddique Ibrahim
 
Fault tolerance in distributed systems
Fault tolerance in distributed systemsFault tolerance in distributed systems
Fault tolerance in distributed systems
sumitjain2013
 
Operators php
Operators phpOperators php
Operators php
Chandni Pm
 
Name Services and Domain Name System
Name Services and Domain Name SystemName Services and Domain Name System
Name Services and Domain Name System
Ashish KC
 
Case Study - SUN NFS
Case Study - SUN NFSCase Study - SUN NFS
Case Study - SUN NFS
Ashish KC
 
Asynchronous programming in C#
Asynchronous programming in C#Asynchronous programming in C#
Asynchronous programming in C#
Bohdan Pashkovskyi
 
Communication in Distributed Systems
Communication in Distributed SystemsCommunication in Distributed Systems
Communication in Distributed Systems
Dilum Bandara
 
Distributed web based systems
Distributed web based systemsDistributed web based systems
Distributed web based systems
Reza Gh
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure calls
Ashish Kumar
 
Distributed System-Multicast & Indirect communication
Distributed System-Multicast & Indirect communicationDistributed System-Multicast & Indirect communication
Distributed System-Multicast & Indirect communication
MNM Jain Engineering College
 
Software Defined Networks
Software Defined NetworksSoftware Defined Networks
Software Defined Networks
Shreeya Shah
 
Group Communication (Distributed computing)
Group Communication (Distributed computing)Group Communication (Distributed computing)
Group Communication (Distributed computing)
Sri Prasanna
 
Fault tolerance in distributed systems
Fault tolerance in distributed systemsFault tolerance in distributed systems
Fault tolerance in distributed systems
sumitjain2013
 
Name Services and Domain Name System
Name Services and Domain Name SystemName Services and Domain Name System
Name Services and Domain Name System
Ashish KC
 

Viewers also liked (20)

Clock Synchronization in Distributed Systems
Clock Synchronization in Distributed SystemsClock Synchronization in Distributed Systems
Clock Synchronization in Distributed Systems
Zbigniew Jerzak
 
LDAP
LDAPLDAP
LDAP
Chandanapriya Sathavalli
 
Flexible Symmetric Global Snapshot
Flexible Symmetric Global Snapshot Flexible Symmetric Global Snapshot
Flexible Symmetric Global Snapshot
Ashutosh Jaiswal
 
Distributed Snapshots
Distributed SnapshotsDistributed Snapshots
Distributed Snapshots
awesomesos
 
network filesystem briefs
network filesystem briefsnetwork filesystem briefs
network filesystem briefs
bergwolf
 
Global state recording in Distributed Systems
Global state recording in Distributed SystemsGlobal state recording in Distributed Systems
Global state recording in Distributed Systems
Arsnet
 
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_algorithms
VI Ni
 
AD & LDAP
AD & LDAPAD & LDAP
AD & LDAP
Cynoteck Technology Solutions Private Limited
 
LDAP - Lightweight Directory Access Protocol
LDAP - Lightweight Directory Access ProtocolLDAP - Lightweight Directory Access Protocol
LDAP - Lightweight Directory Access Protocol
S. Hasnain Raza
 
Coda file system tahir
Coda file system   tahirCoda file system   tahir
Coda file system tahir
Mohammad Faizan
 
Posix Threads
Posix ThreadsPosix Threads
Posix Threads
Doug Abbott
 
The Ldap Protocol
The Ldap ProtocolThe Ldap Protocol
The Ldap Protocol
Glen Plantz
 
Coda file system
Coda file systemCoda file system
Coda file system
Sneh Pahilwani
 
Ldap introduction (eng)
Ldap introduction (eng)Ldap introduction (eng)
Ldap introduction (eng)
Anatoliy Okhotnikov
 
Lamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusionLamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusion
Neelamani Samal
 
LDAP Theory
LDAP TheoryLDAP Theory
LDAP Theory
cyberleon95
 
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 Presentation
cyberleon95
 
Clock Synchronization in Distributed Systems
Clock Synchronization in Distributed SystemsClock Synchronization in Distributed Systems
Clock Synchronization in Distributed Systems
Zbigniew 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 Snapshots
awesomesos
 
network filesystem briefs
network filesystem briefsnetwork filesystem briefs
network filesystem briefs
bergwolf
 
Global state recording in Distributed Systems
Global state recording in Distributed SystemsGlobal state recording in Distributed Systems
Global state recording in Distributed Systems
Arsnet
 
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_algorithms
VI Ni
 
LDAP - Lightweight Directory Access Protocol
LDAP - Lightweight Directory Access ProtocolLDAP - Lightweight Directory Access Protocol
LDAP - Lightweight Directory Access Protocol
S. Hasnain Raza
 
The Ldap Protocol
The Ldap ProtocolThe Ldap Protocol
The Ldap Protocol
Glen Plantz
 
Lamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusionLamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusion
Neelamani 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 Presentation
cyberleon95
 
Ad

Similar to Distributed computing time (20)

Chap 5
Chap 5Chap 5
Chap 5
suks_87
 
Time in distributed systmes
Time in distributed systmesTime in distributed systmes
Time in distributed systmes
mohammad amid abbasi
 
Physical and Logical Clocks
Physical and Logical ClocksPhysical and Logical Clocks
Physical and Logical Clocks
Dilum Bandara
 
Chapter 6 synchronization
Chapter 6 synchronizationChapter 6 synchronization
Chapter 6 synchronization
Alagappa Government Arts College, Karaikudi
 
Tta protocolsfinalppt-140305235749-phpapp02
Tta protocolsfinalppt-140305235749-phpapp02Tta protocolsfinalppt-140305235749-phpapp02
Tta protocolsfinalppt-140305235749-phpapp02
Hrudya Balachandran
 
Clock.pdf
Clock.pdfClock.pdf
Clock.pdf
MohdAbdulHaque
 
Synch
SynchSynch
Synch
Mohannad Shishani
 
DC UNIT 1 cs 3551 DISTRIBUTED COMPUTING.pptx
DC UNIT 1 cs 3551 DISTRIBUTED COMPUTING.pptxDC UNIT 1 cs 3551 DISTRIBUTED COMPUTING.pptx
DC UNIT 1 cs 3551 DISTRIBUTED COMPUTING.pptx
NusrathFarheen1
 
slides.06.pptx
slides.06.pptxslides.06.pptx
slides.06.pptx
balewayalew
 
Pdp12
Pdp12Pdp12
Pdp12
Vincenzo De Florio
 
Clocks
ClocksClocks
Clocks
guesta013ed8
 
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
Jim Webb
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system
Sunita Sahu
 
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
Subhajit Sahu
 
Computer network (13)
Computer network (13)Computer network (13)
Computer network (13)
NYversity
 
Stream Processing Overview
Stream Processing OverviewStream Processing Overview
Stream Processing Overview
Maycon Viana Bordin
 
CS6601-Unit 4 Distributed Systems
CS6601-Unit 4 Distributed SystemsCS6601-Unit 4 Distributed Systems
CS6601-Unit 4 Distributed Systems
Nandakumar P
 
Os3
Os3Os3
Os3
issbp
 
Chapter 14 slides Distributed System Presentation
Chapter 14 slides Distributed System PresentationChapter 14 slides Distributed System Presentation
Chapter 14 slides Distributed System Presentation
Nehal668249
 
Distributed System
Distributed SystemDistributed System
Distributed System
Praveen Penumathsa
 
Physical and Logical Clocks
Physical and Logical ClocksPhysical and Logical Clocks
Physical and Logical Clocks
Dilum Bandara
 
Tta protocolsfinalppt-140305235749-phpapp02
Tta protocolsfinalppt-140305235749-phpapp02Tta protocolsfinalppt-140305235749-phpapp02
Tta protocolsfinalppt-140305235749-phpapp02
Hrudya Balachandran
 
DC UNIT 1 cs 3551 DISTRIBUTED COMPUTING.pptx
DC UNIT 1 cs 3551 DISTRIBUTED COMPUTING.pptxDC UNIT 1 cs 3551 DISTRIBUTED COMPUTING.pptx
DC UNIT 1 cs 3551 DISTRIBUTED COMPUTING.pptx
NusrathFarheen1
 
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
Jim Webb
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system
Sunita Sahu
 
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
Subhajit 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 Systems
Nandakumar P
 
Chapter 14 slides Distributed System Presentation
Chapter 14 slides Distributed System PresentationChapter 14 slides Distributed System Presentation
Chapter 14 slides Distributed System Presentation
Nehal668249
 
Ad

More from Deepak John (20)

Network concepts and wi fi
Network concepts and wi fiNetwork concepts and wi fi
Network concepts and wi fi
Deepak John
 
Web browser week5 presentation
Web browser week5 presentationWeb browser week5 presentation
Web browser week5 presentation
Deepak John
 
Information management
Information managementInformation management
Information management
Deepak John
 
It security,malware,phishing,information theft
It security,malware,phishing,information theftIt security,malware,phishing,information theft
It security,malware,phishing,information theft
Deepak John
 
Email,contacts and calendar
Email,contacts and calendarEmail,contacts and calendar
Email,contacts and calendar
Deepak John
 
Module 1 8086
Module 1 8086Module 1 8086
Module 1 8086
Deepak 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 computers
Deepak 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 4
Deepak John
 
Module 4 network and computer security
Module  4 network and computer securityModule  4 network and computer security
Module 4 network and computer security
Deepak 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 3
Deepak 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 security
Deepak John
 
Computer security module 2
Computer security module 2Computer security module 2
Computer security module 2
Deepak John
 
Computer security module 1
Computer security module 1Computer security module 1
Computer security module 1
Deepak John
 
Network and Computer security
Network and Computer securityNetwork and Computer security
Network and Computer security
Deepak John
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logic
Deepak John
 
Module 2 logic gates
Module 2  logic gatesModule 2  logic gates
Module 2 logic gates
Deepak John
 
Network concepts and wi fi
Network concepts and wi fiNetwork concepts and wi fi
Network concepts and wi fi
Deepak John
 
Web browser week5 presentation
Web browser week5 presentationWeb browser week5 presentation
Web browser week5 presentation
Deepak John
 
Information management
Information managementInformation management
Information management
Deepak John
 
It security,malware,phishing,information theft
It security,malware,phishing,information theftIt security,malware,phishing,information theft
It security,malware,phishing,information theft
Deepak John
 
Email,contacts and calendar
Email,contacts and calendarEmail,contacts and calendar
Email,contacts and calendar
Deepak 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 computers
Deepak 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 4
Deepak John
 
Module 4 network and computer security
Module  4 network and computer securityModule  4 network and computer security
Module 4 network and computer security
Deepak 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 3
Deepak 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 security
Deepak John
 
Computer security module 2
Computer security module 2Computer security module 2
Computer security module 2
Deepak John
 
Computer security module 1
Computer security module 1Computer security module 1
Computer security module 1
Deepak John
 
Network and Computer security
Network and Computer securityNetwork and Computer security
Network and Computer security
Deepak John
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logic
Deepak John
 
Module 2 logic gates
Module 2  logic gatesModule 2  logic gates
Module 2 logic gates
Deepak John
 

Recently uploaded (20)

Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM & Mia eStudios
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)
Mohamed Rizk Khodair
 
Transform tomorrow: Master benefits analysis with Gen AI today webinar, 30 A...
Transform tomorrow: Master benefits analysis with Gen AI today webinar,  30 A...Transform tomorrow: Master benefits analysis with Gen AI today webinar,  30 A...
Transform tomorrow: Master benefits analysis with Gen AI today webinar, 30 A...
Association for Project Management
 
Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)
Mohamed Rizk Khodair
 
The History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptxThe History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptxTERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
PoojaSen20
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
Chemotherapy of Malignancy -Anticancer.pptx
Chemotherapy of Malignancy -Anticancer.pptxChemotherapy of Malignancy -Anticancer.pptx
Chemotherapy of Malignancy -Anticancer.pptx
Mayuri Chavan
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM & Mia eStudios
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)
Mohamed Rizk Khodair
 
Transform tomorrow: Master benefits analysis with Gen AI today webinar, 30 A...
Transform tomorrow: Master benefits analysis with Gen AI today webinar,  30 A...Transform tomorrow: Master benefits analysis with Gen AI today webinar,  30 A...
Transform tomorrow: Master benefits analysis with Gen AI today webinar, 30 A...
Association for Project Management
 
Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)
Mohamed Rizk Khodair
 
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptxTERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
PoojaSen20
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
Chemotherapy of Malignancy -Anticancer.pptx
Chemotherapy of Malignancy -Anticancer.pptxChemotherapy of Malignancy -Anticancer.pptx
Chemotherapy of Malignancy -Anticancer.pptx
Mayuri Chavan
 

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
  • 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).
  翻译: