Computer
Network
Synchronization
Time
Time Synchronization Basics
Computer clocks can drift and
must
be
periodically
synchronized over a network
The happens-before
relation states that events on
one computer happen before
news of those events reaches
another computer
Servers
send
their
current time in messages
Clients advance their
clock if a received time is
later than their clock
Clocks are never set
backwards
to
avoid
violating happens-before
Network time protocols like
NTP and DTSS synchronize
clocks accounting for network
delays
NTP goal is to synchronize
clocks
to
within
a
few
milliseconds
of Coordinated
Universal Time (UTC)
Time Synchronization Protocols
Persistent: Always on
Preemptable:
Demobilize
if
no
response after timeout
Ephemeral: Create ondemand, demobilize after
timeout
Common modes:
Client/Server:
Client
polls stateless server
Symmetric: Peers sync
each other
Broadcast: Single server
syncs many clients
Lamport's algorithm:
Three association modes:
Protocols estimate client's time
offset versus server clocks
Offset is estimated by client
sending
a
request
and
measuring round-trip delay
Protocols operate over multiple
stratum levels - servers at one
level synchronize clients at the
next level
Configuration management is
needed to find servers and
balance load
Computer Clocks
Clocks
based
on
quartz
oscillators
that
tick
at
millisecond intervals
Clock error has systematic
offset and random
jitter components
NTP estimates both time offset
and frequency offset terms
Sync protocols adjust clock to
minimize offset
Small poll
intervals
(<15
min) needed for millisecond
accuracy
Processing Time Values
NTP
uses engineered
algorithms like
cliques,
clustering, combining to select
good time values
Key NTP principle: Worst-case
error reading remote clock is
half the round-trip delay
NTP acts as a digital signal
processor using
techniques
like filtering and feedback
Highlights
Synchronizing computer clocks
is critical for distributed systems
Protocols like NTP and DTSS
synchronize clocks accounting
for network delays
NTP uses advanced algorithms
to filter noise and provide robust
synchronization
Typical goal is to synchronize
clocks
to
within
a
few
milliseconds of UTC