ALL > Computer and Education > courses > university courses > graduate courses > modern operating system > zstu 2018-2019-2 class > student homework directory > L20182E060114 >
Homework 2: Clock Synchronization Algorithms Version 0
👤 Author: by aeonorbitgmailcom 2019-04-30 09:10:33 last modified by aeonorbitgmailcom




If one machine has a WWV receiver, the goal becomes keeping all the other machines synchronized to it. If no machines have WWV receivers, each machine keeps track of its own time, and the goal is to keep all the machines together as well as possible. Many algorithms have been proposed for doing this synchronization (e.g., Cristian, 1989; Drummond and Babaoglu, 1993; and Kopetz and Ochsenreiter, 1987). A survey is given in (Ramanathan et al., 1990b).

All the algorithms have the same underlying model of the system, which we will now describe. Each machine is assumed to have a timer that causes an interrupt times a second. When this timer goes off, the interrupt handler adds 1 to a software clock that keeps track of the number of ticks (interrupts) since some agreed-upon time in the past. Let us call the value of this clock C. More specifically, when the UTC time is t, the value of the clock on machine is Cp(t). In a perfect world, we would have Cp(t)=t for all and all t. In other words, dC/dt ideally should be 1.

Real timers do not interrupt exactly times a second. Theoretically, a timer with = 60 should generate 216,000 ticks per hour. In practice, the relative error obtainable with modern timer chips is about 10-5, meaning that a particular machine can get a value in the range 215,998 to 216,002 ticks per hour. More precisely, if there exists some constant  such that

Distributed operating systems
the timer can be said to be working within its specification. The constant is specified by the manufacturer and is known as the maximum drift rate. Slow, perfect, and fast clocks are shown in Fig. 3-5.

Distributed operating systems
                                                         Fig. 1 . Not all clocks tick precisely at the correct rate.
If two clocks are drifting from UTC in the opposite direction, at a time t after they were synchronized, they may be as much as 2 t apart. If the operating system designers want to guarantee that no two clocks ever differ by more than , clocks must be resynchronized (in software) at least every /2 seconds. The various algorithms differ in precisely how this resynchronization is done.




Please login to reply. Login

Reversion History

Loading...
No reversions found.