The present invention relates to synchronization of clocks. More specifically, the present invention relates to estimation and correction of clock offset in distributed resources interconnected by a network, such as the Internet.
Accurate and reliable time information is necessary for many systems and applications involving distributed resources, including networked systems and processes typified by the Internet. In such systems, different functional elements are required to have their clocks synchronized. Clock synchronization involves two aspects: frequency synchronization and time synchronization. The former means that element clocks run at the same frequency, and the latter means that elements agree at a particular epoch with respect to the coordinated universal time (UTC), i.e., there is no offset between element clocks. For many purposes, it is appropriate to focus on estimating clock offset and to assume higher order effects, such as the frequency offset, can be ignored or provided for separately.
Clock synchronization issues have been extensively addressed in the literature. See, for example, D. Mills, Internet time synchronization: the Network Time Protocol, IEEE Trans. Communications, Vol. 39, No. 10, October 1991; D. Mitra, Network synchronization: analysis of a hybrid of master-slave and mutual synchronization, IEEE Trans. Communications, COM-28, 8 (August 1980), pp. 1245-1259; and N. W. Rickert, Non Byzantine clock synchronization—a programming experiment, ACM Operating Systems Review 22,1 (January 1988), pp. 73-78.
A well-known clock synchronization protocol that has been successfully deployed in the Internet is the Network Time Protocol (NTP), described, for example, in D. Mills, Network Time Protocol (version 3) Specification, Implementation and Analysis RFC 1305, March 1992. One of the most important network clock synchronization issues addressed by NTP is how to use the collected data to estimate the clock offset between a pair of network elements.
In V. Paxson, On Calibrating Measurements of Packet Transit Times, LBNL-41535, ftp://ftp.ee.lbl.gov/papers/vp-clocks-sigmetrics98.ps.gz, March, 1998 (and in a shortened paper with the same title published in Proc. ACM Sigmetrics98, June 22-26, 1998), the author proposed a new algorithm for clock offset estimation. For easy reference, this algorithm will be referred to as the Separate Direction Estimation Algorithm (SDEA). While SDEA can provide improved performance relative to the NTP algorithm, SDEA nevertheless suffers from significant limitations, especially in applying SDEA to contexts in which loading is different for each of the directional links between pairs of network elements.
Limitations of the prior art are overcome and a technical advance is made in accordance with the present invention, illustrative embodiments of which are presented in the following detailed description. In particular, limitations of the NTP algorithm and SDEA are overcome and SDEA techniques are extended and improved in accordance with present inventive teachings.
In addition to estimating the clock offset, present inventive techniques also estimate the bias of the estimation and attempt to correct any such bias. As a result, present inventive algorithms show significant improvement in terms of convergence speed and accuracy. Illustrative embodiments of present inventive algorithms will be referred to as Separate Direction Estimation Algorithms with Bias Correction (SDEABC).
In accordance with one aspect of present inventive methods, messages are exchanged (bi-directionally) between pairs of network elements, such messages including timestamps indicative of sending and receiving times noted at each stop. Because variable components of delay for each message direction need not be characterized by identical probability distribution functions, e.g., when links in each direction are differently loaded, undesired bias of estimates for clock offset can emerge. Illustrative embodiments of the present invention avoid errors in estimates of variable delay minimums by separately determining these minimums, e.g., by advantageously employing separate empirical probability distributions for each direction.
Separate Direction Estimation Algorithm
In network clock synchronization, each of a pair of network elements exchanges data packets (timing messages) with the other of the pair. One of such a pair is referred to as a sender, and the other as a receiver with respect to a particular packet. Based on time stamps contained in these timing messages, the clock offset between the sender and the receiver is estimated.
More specifically, timing messages are sent between network elements as shown in
Let θ be the receiver's clock offset from the sender. That is, if at a given instant the receiver's clock shows time ts and the sender's clock shows time tc, then θΔts−tc. It proves convenient to denote the fixed delay from the sender to the receiver (called upward direction) by du and the fixed delay from the receiver to the sender (called downward direction) by dd. In this representation, the fixed delay includes all non-variable components of the delay such as transmission delay and propagation delay.
Let eiu denote the variable component of the delay of the i-th message from the sender to the receiver and eid denote the variable component of delay from the receiver to the sender. The variable delay component is the part of the delay that would not occur under ideal conditions, and includes such delays as packet queuing delay and delay due to the unavailability of shared resources (e.g., CPU or bandwidth).
We then have the following equations
For ease of further description of present inventive algorithms, it proves convenient to define XiΔTi1−Ti0 and YiΔTi3−Ti2, where i=1, . . . , n after the exchange of n messages.
The above-cited SDEA keeps the smallest values of Xi and Yi, viz., it keeps variables
The estimate for θ using n samples is then computed as
{circumflex over (θ)}n=(Un−Vn)/2. (3)
Separate Direction Estimation Algorithm with Bias Correction (SDEABC)
From (3), with E[·] as the expected value operator we can see that, assuming du=dd,
Therefore, the SDEA is asymptotically unbiased if the pdf of both eiu≧0 and eid≧0 is positive near 0. However, with a finite number of samples, the estimator is biased if
a not unlikely event because of differences between uplink and downlink traffic loading. As will be seen, illustrative embodiments of the present invention reduce such errors in estimates due to bias.
The empirical distribution of a random variable R≧0 is illustratively constructed in a manner now to be described. Suppose R is independently sampled n times with the result being r1, . . . , rn. We rearrange the n samples so that r1:n<r2:n≦ . . . ≦rn:n, where each ri:n is from the original sample set. Further, let ro:n=0 and rn+1:n=∞. The empirical distribution of R is then
where I(·) is an indicator function, i.e., I(·)=1 when the argument of I is satisfied, and is 0 otherwise. Equivalently, the complementary distribution function is
Note that since the intervals [ri−1:n, ri:n) are non-overlapping,
Suppose that independent, identically distributed (i.i.d.) random variables Ri, i=1,2, . . . ,n have a distribution function F(x). Then, mini=1n{Ri} has the complementary distribution functions (1−F(x))n. Define
By using the empirical distribution function Fn(x) to replace F(x), an estimate of
is obtained as
As shown in (4), the bias of the SDEA estimator is
and an estimate of this bias, {circumflex over (b)}n, is given by
Based on the foregoing, it can readily be seen that a more accurate determination can be made of clock offset by correcting for bias of estimates made using SDEA. That is, by determining analytically what the bias in an estimate using SDEA is in a particular environment, correcting by an amount equal to the bias achieves a more accurate estimate of clock offset. This more accurately estimated correction is then advantageously applied to the out-of-synchronization clock. Moreover, the expected value of the bias provides a monitor for the analytical process; variations of this expected value over time can signal conditions in a network that may indicate greater or lesser confidence in clock offset estimates.
In accordance with an approach that is preferred for some applications, a method again proceeds from evaluation of {circumflex over (θ)}n=(Un−Vn)/2, as in Eq. (3). Since
forming the expected value of each side of Eq. (3) and employing the notation from Eq. (8) for each of random variables Un and Vn yields
but in forming an estimate of bn, the bias in the estimate of θ after n samples, we employ
Then, in accordance with the present approach, a bias-corrected (BC) estimate (SDEABC) for θ is given by
By exchanging messages with nodes 220-i, time server 200 will provide clock offset estimates and estimate bias information as described above, which information is available at nodes 220-i for correcting clock offset. Of course, N may have a value of 1, so that only a single network node device may interact with a particular time server. While time server 200 is shown as a separate dedicated function network node, it will be understood that the function of network node 200 may be included in a node performing other functions. Likewise, many network arrangements will have a plurality of time servers, each serving network nodes connected on a respective network or sub-network 210.
In operation, time server 330 exchanges time-stamped messages with each of the time servers 340-i to provide the latter with offset estimates and estimate bias information of the type illustrated above to permit clock correction at the illustrative (second-level) time servers 340-i. Each of the time servers 340-i then serves the clock correction requirements of respective nodes 350-xx in the same manner. Of course, when more than two hierarchical levels of time servers are used, each level (after the first or highest) derives clock synchronization information from a time server at the next highest level. The number of nodes will generally vary from one network 310-i to another, and all or some of networks 310-i may be sub-networks of a larger network. Some time servers may be connected to nodes such as 350-xx and to a next lower order node as well. Some or all time servers may be located in the same local area or distributed over a wide area (including globally) to meet load and geographic distribution requirements for clock synchronization service.
Access to respective time servers by particular nodes (or subordinate time servers) may be scheduled (e.g., periodic), dependent upon availability of time server resources, dependent on prior clock offset behavior at particular nodes (or subsidiary time servers) or detected conditions at such nodes or subsidiary time servers. Exchange of messages and derivation of correction information in accordance with present inventive teachings may be initiated, in appropriate cases, by a particular time server or by a node (or subsidiary time server) for which the particular time server provides clock synchronization services. In each case, however, the time server acts as the reference source of time in determining offset using exchanges of time-stamped messages of the types described above. Thus, for example, a particular node (routinely, or in response to conditions detected at that node) may request that an associated time server initiate a synchronization sequence and supply the results to the particular node. Numerous and varied particular applications of the present inventive principles, all within
the spirit of the present description and scope of the attached claims, will prove useful to those skilled in the art.
Number | Name | Date | Kind |
---|---|---|---|
4142069 | Stover | Feb 1979 | A |
5907685 | Douceur | May 1999 | A |
6023769 | Gonzalez | Feb 2000 | A |
6587875 | Ogus | Jul 2003 | B1 |
6661810 | Skelly et al. | Dec 2003 | B1 |
20020163932 | Fischer et al. | Nov 2002 | A1 |
Number | Date | Country | |
---|---|---|---|
20020131370 A1 | Sep 2002 | US |