- Berkeley algorithm
The Berkeley algorithm is a method of
clock synchronisation indistributed computing which assumes no machine has an accurate time source. It was developed by Gusella and Zatti at the University of California, Berkeley in 1989 [Citation
authors=Gusella and Zatti
title= The accuracy of the clock synchronization achieved by TEMPO in Berkeley UNIX 4.3BSD
journal=Software Engineering, IEEE Transactions on
volume=15
issue=7
year=1989
pages=847-853
url=http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=29484
publisher=IEEE ] and likeCristian's algorithm is intended for use withinintranets .The algorithm
Unlike
Cristian's algorithm the server process in Berkeley algorithm, called the "master" periodically polls other "slave" process. Generally speaking the algorithm is as follows:# A "master" is chosen via an
election process such asChang and Roberts algorithm .
# The "master" polls the "slaves" who reply with their time in a similar way toCristian's algorithm .
# The "master" observes theround-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.With this method the average cancels out individual clock's tendencies to drift. Gusella and Zatti released results involving 15 computers whose clocks were synchronised to within about 20-25 milliseconds using their protocol.
Computer systems normally avoid rewinding their clock when they receive a negative clock alteration from the master. Doing so would break the property of monotonic time, which is a fundamental assumption in certain algorithms in the system itself or in programs such as make. A simple solution to this problem is to halt the clock for the duration specified by the master.
References
Wikimedia Foundation. 2010.