Cristian's algorithm




Cristian's algorithm (introduced by Flaviu Cristian in 1989)[1] is a method for clock synchronization which can be used in many fields of distributive computer science but is primarily used in low-latency intranets. Cristian observed that this simple algorithm is probabilistic, in that it only achieves synchronization if the round-trip time (RTT) of the request is short compared to required accuracy. It also suffers in implementations using a single server, making it unsuitable for many distributive applications where redundancy may be crucial.



The algorithm


Cristian's algorithm works between a process P, and a time server S — connected to a source of UTC (Coordinated Universal Time). Put simply:



  1. P requests the time from S

  2. After receiving the request from P, S prepares a response and appends the time T from its own clock.

  3. P then sets its time to be T + RTT/2


This method assumes that the RTT (Round Trip Time) is split equally between request and response, which may not always be the case but is a reasonable assumption on a LAN connection.


Further accuracy can be gained by making multiple requests to S and using the response with the shortest RTT.


We can estimate the accuracy of the system as follows. Let min be the minimum time to transmit a message one-way. The earliest point at which S could have placed the time T, was min after P sent its request. Therefore, the time at S, when the message by P is received, is in the range (T + min) to (T + RTT - min). The width of this range is (RTT - 2*min). This gives an accuracy of (RTT/2 - min).



See also




  • Allan variance

  • Berkeley algorithm

  • Clock synchronization


  • Daytime protocol, older time synchronization protocol using TCP or UDP port 13


  • ICMP Timestamp and ICMP Timestamp Reply, older time synchronization protocol using ICMP

  • International Atomic Time


  • NTP pool, a collection of worldwide computers that provide a highly accurate time via the Network Time Protocol

  • NTP server misuse and abuse


  • ntpd, OpenNTPD and Ntpdate

  • Precision Time Protocol

  • Synchronization


  • Time Protocol, older time synchronization protocol using TCP or UDP port 37

  • Time server



References





  1. ^ Cristian, F. (1989), "Probabilistic clock synchronization", Distributed Computing, Springer, 3 (3): 146–158, doi:10.1007/BF01784024.mw-parser-output cite.citation{font-style:inherit}.mw-parser-output .citation q{quotes:"""""""'""'"}.mw-parser-output .citation .cs1-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/6/65/Lock-green.svg/9px-Lock-green.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .citation .cs1-lock-limited a,.mw-parser-output .citation .cs1-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/d/d6/Lock-gray-alt-2.svg/9px-Lock-gray-alt-2.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .citation .cs1-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Lock-red-alt-2.svg/9px-Lock-red-alt-2.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration{color:#555}.mw-parser-output .cs1-subscription span,.mw-parser-output .cs1-registration span{border-bottom:1px dotted;cursor:help}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Wikisource-logo.svg/12px-Wikisource-logo.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output code.cs1-code{color:inherit;background:inherit;border:inherit;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;font-size:100%}.mw-parser-output .cs1-visible-error{font-size:100%}.mw-parser-output .cs1-maint{display:none;color:#33aa33;margin-left:0.3em}.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration,.mw-parser-output .cs1-format{font-size:95%}.mw-parser-output .cs1-kern-left,.mw-parser-output .cs1-kern-wl-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right,.mw-parser-output .cs1-kern-wl-right{padding-right:0.2em}









Popular posts from this blog

Italian cuisine

Bulgarian cuisine

Carrot