Implementation of any one clock synchronization algorithm
Clock synchronization is
a problem from
computer science and
engineering which deals
with the idea
that internal clocks
of several computers
may differ. Even
when initially set
accurately, real
clocks will
differ after some
amount of time
due to clock
drift, caused by
clocks counting time
at slightly different
rates. There are
several problems that
occur as a
repercussion of clock
rate
differences and
several solutions, some
being more appropriate
than others in
certain contexts.
The Berkeley
algorithm is a
method of clock
synchronisation in distributed
computing which assumes
no machine has
an accurate time
source.The algorithm Unlike Cristian's
algorithm, the server
process in the
Berkeley algorithm, called
the master, periodically
polls other slave
processes. Generally speaking,
the algorithm is: A master
is chosen via
an election process
such as Chang
and Roberts algorithm.
The master
polls the slaves
who reply with
their time in
a similar way
to Cristian's algorithm.The master
observes the round-trip
time (RTT) of
the messages and
estimates the time
of each slave
and its own.
The master then
averages the clock
times, ignoring any
values it receives
far outside the
values of the
others.
Instead of
sending the updated
current time back
to the other
process, the master
then sends out
the amount (positive
or negative) that
each slave must
adjust its clock.
This avoids further
uncertainty due
to RTT at the slave
processes.
Comments
Post a Comment