We begin by considering the simplest possible case: of internal synchronization between two processes in a synchronous distributed system. In a synchronous system, bounds are known for the drift rate of clocks, the maximum message transmission delay, and the time required to execute each step of a process (see Section 2.4.1).One process sends the time t on its local clock to the other in a message m. In principle, the receiving process could set its clock to the time (t + Ttrans) , where (Ttrans) is the time taken to transmit m between them. The two clocks would then agree (since the aim is internal synchronization, it does not matter whether the sending process’s clock is accurate).Unfortunately, Ttrans is subject to variation and is unknown. In general, other processes are competing for resources with the processes to be synchronized at their respective nodes, and other messages compete with m for the network resources. Nonetheless, there is always a minimum transmission time, min, that would be obtained if no other processes executed and no other network traffic existed; min can be measured or conservatively estimated.In a synchronous system, by definition, there is also an upper bound max on the time taken to transmit any message. Let the uncertainty in the message transmission time be u, so that u = max - min. If the receiver sets its clock to be t + min, then the clock skew may be as much as u, since the message may in fact have taken time max to arrive. Similarly, if it sets its clock to t + max, the skew may again be as large as u. If, however, it sets its clock to the halfway point, t + (max + min)/2 , then the skew is at most u/2 . In general, for a synchronous system, the optimum bound that can be achieved on clock skew when synchronizing N clocks is u (1 - 1)/N [Lundelius and Lynch 1984].Most distributed systems found in practice are asynchronous: the factors leading to message delays are not bounded in their effect, and there is no upper bound max on message transmission delays. This is particularly so for the Internet. For an asynchronous system, we may say only that Ttrans = min + x , where x > 0. The value of x is not known in a particular case, although a distribution of values may be measurable for a particular installation.
đang được dịch, vui lòng đợi..