Berkeley algorithm

from Wikipedia, the free encyclopedia

The Berkeley algorithm is used to synchronize physical clocks in distributed systems . It requires a central component, the so-called time daemon or time server .

procedure

In contrast to other algorithms, the time server or time demon (whose time is regularly set by the administrator) in the Berkeley algorithm is not passive. This means that the time daemon and not the client takes care of distributing the correct system time.

  1. The time server queries the local time from all participating clients at regular intervals.
  2. The time of the queried machines is calculated analogously to Cristian's algorithm.
  3. The time server then calculates the internal time of the distributed system as the arithmetic mean of all time stamps, excluding strong deviations. The time of day of the time server is also included in the calculation.
  4. The time server now informs the clients of the respective time difference by which the local times have to be changed. If the client's clock advances (e.g. client time 1:20, server time 1:00), it slows down its clock until the server and client times match again. If the client's clock slows down (e.g. client time 1:00, server time 1:20), then it accelerates its clock accordingly. Sending the difference saves you from having to re-estimate the transit times on the respective clients.

See also