Unit 2 Part 1
Unit 2 Part 1
Unit 2 Part 1
COMPUTING
Physical clock synchronization: NTP
● Need of Knowing Time:
○ The time of the day at which an event happened on a specific machine in the network.
○ The time interval between two events that happened on different machines in the network.
○ The relative ordering of events that happened on different machines in the network.
● Need for synchronization
○ In database systems, the order in which processes perform updates on a database is
important to ensure a consistent, correct view of the database.To ensure the right ordering of
events, a common notion of time between co-operating processes becomes imperative.
○ Improves the performance of distributed algorithms by replacing communication with local
computation.
○ Distributed protocols use timeouts, and their performance depends on how well physically
dispersed processors are time-synchronized. Design of such applications is simplified when
clocks are synchronized.
● Clock synchronization is the process of ensuring that physically distributed
processors have a common notion of time. It has a significant effect on many
problems like secure systems, fault diagnosis and recovery, scheduled
operations, database systems, and real-world clock values.
Definitions
Different Clocks
Offset Delay Estimation using Network Transmission Protocol
● In practice, a source node cannot accurately estimate the local time on the
target node due to varying message or network delays between the nodes.
● This protocol employs a very common practice of performing several trials
and chooses the trial with the minimum delay.
● The design of NTP involves a hierarchical tree of time servers.
○ The primary server at the root synchronizes with the UTC.
○ The next level contains secondary servers, which act as a backup to the primary server.
○ At the lowest level is the synchronization subnet which has the clients.
network delay
NTP Synch Protocol
offset
b(e)=a(e)-0
a(e)=b(e)+o
delay
CS 3551 DISTRIBUTED
COMPUTING
What is physical clock?
Faculty
HOD
Exam Dept
Benefits of Causal Precedence
CS 3551 DISTRIBUTED
COMPUTING
Framework for System of Logical Clocks
time domain (non negativ
consistent
Implementing Logical Clocks
Every process needs data structure(store logical time)+algorithms(updation)
updation
Scalar Time - non-negative integer
logical clock
doesn't take
Properties of Scalar Time
1. Consistency
2. Total Ordering
dif timestamps execute as same order
a. Case 1
b. Case 2 repeat values
P1
P2
P3
Rules
P1
P2
Properties on Comparing two Timestamps
Properties
1. Isomorphism