Berkeley algorithm
Encyclopedia
The Berkeley algorithm is a method of clock synchronisation in distributed computing
Distributed computing
Distributed computing is a field of computer science that studies distributed systems. A distributed system consists of multiple autonomous computers that communicate through a computer network. The computers interact with each other in order to achieve a common goal...

 which assumes no machine has an accurate time source. It was developed by Gusella and Zatti at the University of California, Berkeley in 1989 and like Cristian's algorithm
Cristian's algorithm
Cristian's Algorithm is a method for clock synchronisation which can be used in many fields of distributive computer science but is primarily used in low-latency intranets...

 is intended for use within intranets.

The algorithm

Unlike Cristian's algorithm
Cristian's algorithm
Cristian's Algorithm is a method for clock synchronisation which can be used in many fields of distributive computer science but is primarily used in low-latency intranets...

 the server process in Berkeley algorithm, called the master periodically polls other slave process. Generally speaking the algorithm is as follows:
  1. A master is chosen via an election process such as Chang and Roberts algorithm
    Chang and Roberts algorithm
    Chang and Roberts is a ring-based election algorithm used to find a process with the largest identification. It is a useful method of election in decentralised distributed computing.- The algorithm :...

    .
  2. The master polls the slaves who reply with their time in a similar way to Cristian's algorithm
    Cristian's algorithm
    Cristian's Algorithm is a method for clock synchronisation which can be used in many fields of distributive computer science but is primarily used in low-latency intranets...

    .
  3. The master observes the round-trip time (RTT) of the messages and estimates the time of each slave and its own.
  4. The master then averages the clock times, ignoring any values it receives far outside the values of the others.
  5. 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, but this simplistic solution can also cause problems, although they are less severe. For minor corrections, most systems slow the clock (known as "clock slew"), applying the correction over a longer period of time.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK