Clock synchronization

The mean value algorithm is used to synchronize clocks of logic in distributed systems. So he does not care for a globally valid time, but only for a temporal order of events ( the so-called causal order ). In contrast to algorithms such as the Berkeley algorithm, it requires no central component, but works via broadcast.

Expiration

Each computer in a distributed system must send to all computers by means of broadcast at certain intervals his time. The points in time at which it sends are fixed by a priori known starting time T0 and a fixed interval R - called fixed length resynchronization interval. Send All hosts their time then at times T0, T0 ( 1 * R), T0 ( 2 * R ) ... After sending the own time waiting for the computer a predefined time S ( S is smaller R), where all incoming times for other computers are collected. Then, a mean value is calculated from the collected times and placed or slowed down until his own time coincides with the new time the own clock to the new time.

Possible averaging algorithms

The average value of the received times can be calculated by different approaches:

  • Calculate the arithmetic mean (ie, the average of all values)
  • Deleting the highest and lowest extreme values ​​and calculating the arithmetic mean
  • Weighting each received time with an expected value and calculate the weighted arithmetic mean. The expected value can be concluded from the network topology.
576345
de