Synchronization
IT4371: Distributed Systems
Spring 2016
Until now, we have looked at:
how entities are named and identified
Synchronization - 1 how entities communicate with each other
1
3/17/2016
Todays lecture
Reason for Entities have to agree on Entities have to share
synchronization and
Time Synchronization
ordering of events common resources
cooperation Physical Clock Synchronization (or, simply, Clock Synchronization)
Here, actual time on computers are synchronized
e.g., Vehicle tracking in a Camera Sensor e.g., Reading and writing in a Logical Clock Synchronization
Examples Network, Financial transactions in Distributed Distributed File System
eCommerce Systems Computers are synchronized based on relative ordering of events
Time Synchronization
Clock Synchronization
Logical Clock Synchronization Clock Synchronization is a mechanism to synchronize the time
of all the computers in a DS
Mutual Exclusion
We will study
Election Algorithms Coordinated Universal Time
Tracking Time on a Computer
Clock Synchronization Algorithms
Cristians Algorithm
Berkeley Algorithm
Network Time Protocol
2
3/17/2016
3
3/17/2016
Frequency of the clock is defined as the ratio of the number of seconds counted by the software
When the UTC time is t, let the clock on the computer have a time clock for every UTC second
C(t) Frequency = dC/dt
Skew of the clock is defined as the extent to which the frequency differs from that of a perfect
Three types of clocks are possible clock
Perfect clock: Skew = dC/dt 1
The timer ticks H interrupts a second dC/dt > 1 dC/dt = 1
15
Hence,
Clock time, Cp(t)
4
3/17/2016
5
3/17/2016
Physical clocks on computers are not accurate Remaining topics in Time Synchronization
Clock Synchronization
Clock synchronization algorithms provide mechanisms to synchronize Berkeley algorithm, Network Time Protocol
Logical Clock Synchronization
clocks on networked computers in a DS Computers are synchronized based on relative ordering of events
Computers on a local network use various algorithms for synchronization
Some algorithms (e.g, Cristians algorithm) synchronize time with by contacting
centralized time servers Mutual Exclusion
How to coordinate between processes that access the same resource?