Clock synchronization in distributed systems – a comparison


Bachelor Thesis, 2007

32 Pages, Grade: 1,0


Excerpt


Contents

1. Task Definition

2. Introduction

3. Clocks, Time and Frequency
3.1. Clock Basics
3.2. Current definition of a second of time
3.3. Coordinated Universal Time (UTC)
3.4. Types of Oscillators
3.5. Time Dissemination
3.5.1. Sources of Time Synchronization Errors

4. Selected Clock Synchronization Protocols and Mechanisms
4.1. The IEEE Standard 1588
4.1.1. Operational Overview
4.1.2. PTP Time Stamping Implementations
4.1.3. Accuracy under Real Conditions
4.1.4. Pros and Cons
4.1.5. Conclusion
4.2. The Network Time Protocol (NTP)
4.2.1. Technical Details
4.2.2. Accuracy
4.2.3. Pros and Cons
4.3. Clock Synchronization with the Global Positioning System (GPS)
4.3.1. Technical Details
4.3.2. Accuracy
4.3.3. Deployment
4.3.4. Pros and Cons
4.4. FlexRay
4.4.1. Technical Details
4.4.1.1. Topology
4.4.1.2. Media Access
4.4.1.3. Bit Rates
4.4.1.4. Synchronizing the Nodes
4.4.1.5. Structure of FlexRay Nodes
4.4.2. Pros and Cons
4.4.3. Conclusion
4.5. The Time-Triggered Protocol (TTP)
4.5.1. Technical Details
4.5.2. Pros and Cons

5. Conclusion

1. Task Definition

Means (e.g. IEEE1588, NTP, GPS, FlexRay, TTP) to synchronize the clocks of computers in a distributed system shall be compared in this work taking the most recent literature into account. Important properties of different approaches to clock synchronization shall be highlighted and discussed. The basic principles of the clock synchronization approaches under consideration in this work shall be presented. Finally the performance and cost of the different approaches shall be contrasted.

2. Introduction

"A man with a watch knows what time it is.

A man with two watches is never sure".

-- unknown.

We use clocks to synchronize ourselves with other people or procedures. How accurate the clock needs to be, depends on the circumstances: If one has to catch the train, accuracies of a couple of seconds or even a minute might be okay. Within sports milliseconds may decide who the winner is.

Modern distributed systems like measurement and automation systems, airplanes and even automobiles contain multiple networked devices and often require accurate timing in order to be able to synchronize events like coordinating distributed motion controllers and to correlate data.

Even when initially set accurately, real clocks will differ after some amount of time due to clock drift, caused by clocks counting time at slightly different rates. These clock drift rates differ over time, differ with temperature and even differ with aging of the clocks.

In a centralized system the solution to clock drift is trivial: the centralized server will dictate the system time because time is unambiguous. When a process wants to know the time, it makes a system call and the kernel tells it. If process A asks for the time, and then a little later process B asks for the time, the value that B gets will certainly be higher than the value A got (Tanenbaum / Van Steen 2002).

Situations get more difficult when changing to distributed systems where every node has its own internal clock and common agreement about time readings need to be established. Therefore synchronization of clocks, which can either be done in software, hardware or in a hybrid mixture of both, is necessary.

Clocks are checked periodically whether the inaccuracy is tolerable and are adjusted if necessary. This process is primarily done by communication between better and worse clocks. Inaccurate clocks and clocks which may not deviate that much have to be adjusted more frequently. (Weibel H., 2005)

3. Clocks, Time and Frequency

3.1. Clock Basics

Most clocks basically consist of an oscillator (a device that generates events at regular intervals), and a counting mechanism for determining the length of the second or some other desired time interval. The rate at which the oscillating events occur must be calibrated, so there must be standards set by convention or defined by some committee. (Clynch R., Allan D. et al.)

3.2. Current definition of a second of time

The unit of time, the second, was once considered to be the fraction 1/86400 of the mean solar day, however astronomical measurements showed that irregularities in the rotation of the Earth made this an unsatisfactory definition. Therefore the second was redefined at the 13th Conférence Générale des Poids et Mesures (CGPM) 1967/68 by the following: The second is the duration of 9 192 631 770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the caesium 133 atom. (BIPM)

3.3. Coordinated Universal Time (UTC)

UTC, the “Official Time for the World”. (Allan D. et al., 1997)

UTC is an international agreed upon time scale, it is the ultimate standard for time-of-day, time interval and frequency (Bishop R., 2002). It is maintained by the Bureau International des Poids et Mesures (BIPM) in France. The time scale forms the basis for the coordinated dissemination of standard frequencies and time signals. The UTC scale is adjusted by the insertion of leap seconds to ensure approximate agreement with the time derived from the rotation of the Earth. These leap seconds are inserted on the advice of the International Earth Rotation and Reference Systems Service (IERS). (Allan D. et al., BIPM).

3.4. Types of Oscillators

More than 2 billion (2x109) quartz crystal oscillators are manufactured annually; this means they are the most common used oscillators nowadays. (Bishop R., 2002)

Typical quartz wristwatches use a quartz-crystal tuning fork with an oscillation frequency of 32,768 Hz. This number of oscillations is very convenient for usage in associated digital electronic circuit, because if this number is divided by 215, which is easy for a digital chip divider, it results in one cycle per second (Allan D. et al.).

Many different types of crystal oscillators do exist, in this thesis the focus when comparing them will be on the following only:

- XO (crystal oscillator),
- OCXO (oven-controlled crystal oscillator),

In OCXO the crystal is enclosed in a small insulated container together with a heating element and a temperature sensor. This way the crystal is kept at a constant temperature and its frequency stability is increased.

- VCXO (voltage-controlled crystal oscillator),
- TCXO (temperature-compensated crystal oscillator),
- MCXO (microcomputer-compensated crystal oscillator)

When comparing the quality of oscillators with respect to its instabilities like

- aging,
- noise,
- frequency changes with temperature,
- acceleration,
- ionizing radiation,
- power supply voltage, etc.,

the terms accuracy, stability and precision are often used (Vig R. , Bishop R.). The meanings of these terms, for a frequency source, are illustrated in Fig. 1 (Bishop R., 2002, p. 17-6).

illustration not visible in this excerpt

Fig. 1 The relationship between accuracy and stability. (Bishop R., 2002, p. 17-6)

Table 1 shows a comparison of salient characteristics of various selected commercial off-the-shelf (COTS) quartz oscillators according to their datasheets by Horauer M. in 2004.

illustration not visible in this excerpt

Table 1 Salient characteristics of COTS Quartz Oscillators (from datasheets) (Horauer M., p. 30, 2004)

Atomic oscillators offer better long-term stability and accuracy than even the best quartz oscillators (Bishop R.). They are either based on using Rubidium or Cesium and sometimes they are even combined with other crystal oscillators like the RbXO (rubidium crystal oscillator), which consists of a crystal oscillator (for example a MCXO) which is synchronized with a built-in rubidium standard which is run only occasionally to save power.

Vig R. (as cited by Horauer M. in 2004) has done a comparison of salient characteristics of frequency standards including their accuracies, stabilities, power consumptions and prices as shown in Table 2.

illustration not visible in this excerpt

Table 2 Comparison of frequency standards’ salient characteristics (estimates). (Vig R. as cited by Horauer M., p. 30, 2004)

According to National Institute of Standards and Technology (NIST)[1] clock accuracies of 10-9 seconds per day can be maintained with atomic clocks, therefore atomic clocks are the most precise clocks on Earth (and space).

So far atomic clocks are still far too expensive and too big in size to be used in inexpensive computers. But this might change in near future, as scientists from NIST have demonstrated in 2004 that it is possible to build a chip-scaled atomic clock. According to the researchers, the clock was believed to be one hundredth the size of any other.

Fig. 2 shows the schematics of the assembly process plus a photograph of the miniature atomic clock which only has a volume of 9.5 mm³ and dissipates less than 75 mW of power (Knappe S. et al.)

illustration not visible in this excerpt

Fig. 2 Miniature atomic clock build by NIST researchers in 2004. Source: Knappe S. et al., 2004, p. 1461

3.5. Time Dissemination

Highest quality clocks are very expensive and generally used only by national time organizations, which know time very well. But they need to get it to the users, which want to synchronize their less precise clock to the time standards. Time needs to be disseminated. (Clynch R., 2002)

3.5.1. Sources of Time Synchronization Errors

Non-determinism is the main reason for time synchronization errors. For a better understanding it is helpful to characterize the sources of latencies into the following categories as done by Syed A./Heidemann J. in 2006:

[...]


[1] http://www.nist.gov/

Excerpt out of 32 pages

Details

Title
Clock synchronization in distributed systems – a comparison
College
University of Applied Sciences Technikum Vienna  (Informations- und Kommunikationssysteme)
Grade
1,0
Author
Year
2007
Pages
32
Catalog Number
V69617
ISBN (eBook)
9783638607445
ISBN (Book)
9783638673662
File size
2203 KB
Language
English
Keywords
Clock
Quote paper
Harald Bachner (Author), 2007, Clock synchronization in distributed systems – a comparison, Munich, GRIN Verlag, https://www.grin.com/document/69617

Comments

  • No comments yet.
Look inside the ebook
Title: Clock synchronization in distributed systems – a comparison



Upload papers

Your term paper / thesis:

- Publication as eBook and book
- High royalties for the sales
- Completely free - with ISBN
- It only takes five minutes
- Every paper finds readers

Publish now - it's free