Clock Synchronization

Total Page:16

File Type:pdf, Size:1020Kb

Clock Synchronization Clock Synchronization Pedro F. Souto ([email protected]) April 28, 2021 1/41 Roadmap Synchronization Models Clock Synchronization Centralized Clock Synchronization NTP Applications Further Reading 2/41 Roadmap Synchronization Models Clock Synchronization Centralized Clock Synchronization NTP Applications Further Reading 3/41 Distributed System Model I A set of sequential processes that execute the steps of a distributed algorithm I DS are inherently concurrent, with real parallelism p p I Processes communicate and 1 2 synchronize by exchanging mn messages m I The communication is not instantaneous, but suffers delays H(t) I Processes may have access to a local clock I But local clocks may drift wrt real time t I DS may have partial failure modes I Some components may fail while others may continue to operate correctly 4/41 Fundamental Models Synchronism characterizes the system according to the temporal behavior of its components: I processes I local clocks I communication channels Failure characterizes the system according to the types of failures its components may exhibit 5/41 Models of Synchronism Synchronous iff: 1. there are known bounds on the time a process takes to execute a step 2. there are known bounds on the time drift of the local clocks 3. there are known bounds on message delays Asynchronous No assumptions are made regarding the temporal behavior of a distributed system I These 2 models are the extremes of a range of models of synchronism Dilemma I It is relatively simple to solve problems in the synchronous model, but these systems are very hard to build 6/41 Roadmap Synchronization Models Clock Synchronization Centralized Clock Synchronization NTP Applications Further Reading 7/41 Clock Synchronization Observation I In our every-day lives we use time to coordinate our activities I Distributed applications can do the same, as long as each process has access to a "sufficiently" synchronized clock Synchronized Clocks I Are essential for implementing: some basic services: Synchronous distributed algorithms i.e. rounds Communication protocols e.g. TDMA some distributed applications: Data collection and event correlation Control systems GPS I Enable to reduce communication and therefore improve performance (Liskov 93) 8/41 Applications (according to David Mills ) I Distributed database transaction journaling and logging I Stock market buy and sell orders I Secure document timestamps I Aviation traffic control and position reporting I Radio and TV programming launch I Real-time teleconferencing I Network monitoring, measurement and control I Distributed network gaming and training I Take it with a grain of salt src: David Mills, Network Time Protocol (NTP) General Overview 9/41 Local Clocks I Computers have hardware clocks based on quartz crystal oscillators, which provide a local measure of time, H(t). Often: I These clocks generate periodic interrupts I The OS uses these interrupts to keep the local time dH(t) I These clocks have a drift dt − 1 wrt a perfect clock I Quartz-based oscillators have drifts in theH(t) order of 10−6, i.e. they may run faster/slower a few µs per second I The clock drift of a quartz-based oscilator depends on the environmental conditions, especially temperature I Even if this drift is bounded, unless clocks synchronize, their values may diverge forever, i.e. their offset/skew (Hi (t) t− Hj (t)), may grow unbounded 10/41 What is Clock Synchronization? External Clock Synchronization (CS) I.e. synchronization wrt an external time reference (R) jCi (t) − R(t)j < α; 8i where α is known as the CS accuracy Internal Clock Synchronization I.e. synchronization among the local clocks in the system – needs not be related to real time jCi (t) − Cj (t)j < π; 8i; j where π is known as the CS precision Note that external clock synchronization implies internal clock synchronization. I What’s the precision? 11/41 Time Scales/Standards International Atomic Time (TAI) This is a weighted average of the time kept by around 300 atomic clocks in over 50 national labs I More stable clocks are given larger weights I It uses GPS satellites for clock comparisons that provide the data for the calculation of TAI Coordinated Universal Time (UTC) It is derived from the TAI, by adding leap seconds to compensate for variations in Earth’s rotation speed 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 TAI Solar 0 1 2 3 4 5 6 7 8 9 11 12 1314 15 16 17 18 19 21 22 23 24 25 seconds Leap seconds introduced into UTC to get it in synch with TAI GPS provides time with an accuracy better than 100 nanoseconds I Each satellite has its own atomic clocks (3 or 4), which are kept synchronized with the Master Clock at US Naval Observatory I The MC@USNO is a set of more than 40 atomic clocks that produces UTC(USNO), which is used for computing the UTC 12/41 Roadmap Synchronization Models Clock Synchronization Centralized Clock Synchronization NTP Applications Further Reading 13/41 Clock Synchronization: Centralized Algorithm Assumptions Each process has a local clock Master/server clock provides the time reference Slave/client clock synchronize with the master/server clock Local clock drifts are bounded −1 (1 + ρ) ≤ dCi (t)=dt ≤ 1 + ρ, for all correct processes i System is synchronous I There are known bounds (both lower and upper) for communication delays I The time a process requires to take a step is negligible with respect to the communication delays (and therefore bounded) 14/41 Clock Synchronization: Specification Accuracy jCi (t) − Cm(t)j ≤ α, for all correct processes i where Cm(t) is the master’s clock 15/41 Centralized Clock Synchronization: Idea Master I Periodically I read the local time I broadcast it in a SYNC message Slave I Upon reception of a SYNC message, I update the local clock 16/41 Master Time Estimation Issue There is a delay between the reading of the time @ the master, and its processing @ the slaves. By the time the slave gets the message, the time @ the master will be: Cm(t) Cs(t) Cs(t) = Cm(t) + delay Cm(t1) = T1 SYNC(T1) dey Problem What is the value of delay? Response Do not know, but can be estimated: Cm(t) Cs(t) mn min < delay < max m max is known because the system is synchronous I To minimize the error, should use [Cm(t) + min; Cm(t) + max] midpoint: min + max Cs(t) = Cm(t) + 2 17/41 SYNC Message Period To ensure accuracy, it must be; jCm(t) − Cs(t)j < α Because the clock drifts are bounded: dCs(t) dCm(t) − < 2ρ dt dt Hence, max − min + 2ρT < α 2 Observation The clock skew lower bound is determined by the delay jitter ((max − min)) I If T is large, the second term may dominate I NTP sometimes uses a T of 15 days, and ρ ∼ 10−6 18/41 Message Delay Estimation in Practical Systems (1/2) Issue Often, there is no known upper bound for the communications delay Approach (Christian) Estimate it based on the round-trip-delay, round Let min be the lower delay bound Then, when the slave receives the master’s clock reading, time at the master will be in the interval: mn [t + min; t + round − min] rond t midpoint By choosing the in this interval, i.e. t round mn by assuming that the delay is 2 , we bound the error to: round − min 2 19/41 Message Delay Estimation In Practical Systems (2/2) Insight By measuring the time the server takes to reply, we can reduce the error I This can be implemented by timestamping with the local clocks the sending/receiving of messages m T2 T3 Let Cs(t) = Cm(t) + O(t) Then, (T2,T3) T = T − O(t ) + d s 2 1 1 1 T1 round T4 T4 = T3 + O(t3) + d2 Note: Upper-case T’s are clock times, lower case are real-times Assume Synchronized rates O = O(t1) = O(t3) Symmetry del = (d1 + d2)=2 = ((T4 − T 1) − (T 3 − T 2))=2 20/41 Clock Offset Estimation Using Timestamps Let Cs(t) = Cm(t) + O(t) Then, T2 = T1 − O(t1) + d1 T4 = T3 + O(t3) + d2 Note: Upper-case T’s are clock times, lower case are real-times m T2 T3 Assume O = O(t1) = O(t3) (~T2,T3) Then O = O + (d1 − d2)=2 s ~ = (( − ) + ( − )) T1 Whereround O T4 T4 T3 T1 T2 =2 Remember: del = (d1 + d2)=2 = ((T4 − T 1) − (T 3 − T 2))=2 Because d1; d2 ≥ 0, then d1 − d2 ≤ d1 + d2 Therefore: O~ − del ≤ O ≤ O~ + del O~ can be seen as an estimate of the offset del can be seen as an estimate of O~ ’s error bound 21/41 Clock Offset and Delay Time Estimation Precision Precision depends on: Rate synchronization i.e. O(t1) = O(t3) Symmetry assumption i.e. d1 = d2, only in the case of delay estimation Timestamp accuracy I The lower in the protocol stack they are generated the better I In some cases, the timestamps are sent in later messages, PTP calls them FOLLOW-UP messages. 22/41 Precision Time Protocol (PTP - IEEE 1588) Description Protocol for clock synchronization with high precision on packet-based networks Goals I Precision of at least one microsecond I Minimum hardware resource requirements I Minimum administration on single subnet systems I Applicable, but not limited, to Ethernet Application domains I Test and measurement I Industrial automation I Power industry I Telecoms I Aerospace, navigation and positioning I Aujdio and video networks 23/41 Precision Time Protocol: Syntonization Goal To ensure that master and slaves have the same clock rate k I Two alternative ways to send the Ti timestamp Sync message: requires the ability to insert the timestamp into the message on the fly I This is an issue if the timestamps are generated in the lower layers (see below) Follow_up message: requires an additional message I Slave clock rate is adjusted so that: k+1 k k+1 k T1 − T1 = T2 − T2 k+1 k+1 k k T2 − T1 = T2 − T1 I Sync messages are sent periodically with a period of a few seconds I To correct variations due to changing environmental conditions, 24/41 e.g.
Recommended publications
  • C:\Data\My Files\WP\PTTI\Proceedings TOC For
    34th Annual Precise Time and Time Interval (PTTI) Meeting TIMEKEEPING AND TIME DISSEMINATION IN A DISTRIBUTED SPACE-BASED CLOCK ENSEMBLE S. Francis Zeta Associates Incorporated B. Ramsey and S. Stein Timing Solutions Corporation J. Leitner, M. Moreau, and R. Burns NASA Goddard Space Flight Center R. A. Nelson Satellite Engineering Research Corporation T. R. Bartholomew Northrop Grumman TASC A. Gifford National Institute of Standards and Technology Abstract This paper examines the timekeeping environments of several orbital and aircraft flight scenarios for application to the next generation architecture of positioning, navigation, timing, and communications. The model for timekeeping and time dissemination is illustrated by clocks onboard the International Space Station, a Molniya satellite, and a geostationary satellite. A mathematical simulator has been formulated to model aircraft flight test and satellite scenarios. In addition, a time transfer simulator integrated into the Formation Flying Testbed at the NASA Goddard Space Flight Center is being developed. Real-time hardware performance parameters, environmental factors, orbital perturbations, and the effects of special and general relativity are modeled in this simulator for the testing and evaluation of timekeeping and time dissemination algorithms. 1. INTRODUCTION Timekeeping and time dissemination among laboratories is routinely achieved at a level of a few nanoseconds at the present time and may be achievable with a precision of a few picoseconds within the next decade. The techniques for the comparison of clocks in laboratory environments have been well established. However, the extension of these techniques to mobile platforms and clocks in space will require more complex considerations. A central theme of this paper – and one that we think should receive the attention of the PTTI community – is the fact that normal, everyday platform dynamics can have a measurable effect on clocks that fly or ride on those platforms.
    [Show full text]
  • Chapter 7. Relativistic Effects
    Chapter 7. Relativistic Effects 7.1 Introduction This chapter details an investigation into relativistic effects that could cause clock errors and therefore position errors in clock coasting mode. The chapter begins with a description of relativistic corrections that are already taken into account for the GPS satellites. Though these corrections are known and implemented [ICD-GPS-200, 1991], no similar corrections are made for GPS receivers that are in motion. Deines derived a set of missing relativity terms for GPS receivers [Deines, 1992], and these are considered in great detail here. A MATLAB simulation was used to predict the relativity effects based on the derivation of Deines, and flight data were used to determine if these effects were present. 7.2 Relativistic Corrections for the GPS Satellite The first effect considered stems from a Lorentz transformation for inertial reference frames. This effect from special relativity is derived from the postulate that the speed of light is constant in all inertial reference frames [Lorentz et. al., 1923]. The correction accounts for time dilation, i.e. moving clocks beat slower than clocks at rest. A standard example is as follows [Ashby and Spilker, 1996]. Consider a train moving at velocity v along the x axis. A light pulse is emitted from one side of the train and reflects against a mirror hung on the opposite wall. The light pulse is then received and the round trip time recorded. If the train car has width w (see Fig. 7.1), then the round trip time according to an observer on the train is: 110 Mirror w Light Pulse Emit/Receive Light Pulse Experiment as Observed on Board the Train Mirror (at time of reflection) v w Emit Pulse Receive Pulse Light Pulse Experiment as Viewed by a Stationary Observer Figure 7.1 Illustration of Time Dilation Using Light Pulses 111 2w t ' (7.1) train c where c is the speed of light.
    [Show full text]
  • Lecture 12: March 18 12.1 Overview 12.2 Clock Synchronization
    CMPSCI 677 Operating Systems Spring 2019 Lecture 12: March 18 Lecturer: Prashant Shenoy Scribe: Jaskaran Singh, Abhiram Eswaran(2018) Announcements: Midterm Exam on Friday Mar 22, Lab 2 will be released today, it is due after the exam. 12.1 Overview The topic of the lecture is \Time ordering and clock synchronization". This lecture covered the following topics. Clock Synchronization : Motivation, Cristians algorithm, Berkeley algorithm, NTP, GPS Logical Clocks : Event Ordering 12.2 Clock Synchronization 12.2.1 The motivation of clock synchronization In centralized systems and applications, it is not necessary to synchronize clocks since all entities use the system clock of one machine for time-keeping and one can determine the order of events take place according to their local timestamps. However, in a distributed system, lack of clock synchronization may cause issues. It is because each machine has its own system clock, and one clock may run faster than the other. Thus, one cannot determine whether event A in one machine occurs before event B in another machine only according to their local timestamps. For example, you modify files and save them on machine A, and use another machine B to compile the files modified. If one wishes to compile files in order and B has a faster clock than A, you may not correctly compile the files because the time of compiling files on B may be later than the time of editing files on A and we have nothing but local timestamps on different machines to go by, thus leading to errors. 12.2.2 How physical clocks and time work 1) Use astronomical metrics (solar day) to tell time: Solar noon is the time that sun is directly overhead.
    [Show full text]
  • Distributed Synchronization
    Distributed Synchronization CIS 505: Software Systems Communication between processes in a distributed system can have Lecture Note on Physical Clocks unpredictable delays, processes can fail, messages may be lost Synchronization in distributed systems is harder than in centralized systems because the need for distributed algorithms. Properties of distributed algorithms: 1 The relevant information is scattered among multiple machines. 2 Processes make decisions based only on locally available information. 3 A single point of failure in the system should be avoided. Insup Lee 4 No common clock or other precise global time source exists. Department of Computer and Information Science Challenge: How to design schemes so that multiple systems can University of Pennsylvania coordinate/synchronize to solve problems efficiently? CIS 505, Spring 2007 1 CIS 505, Spring 2007 Physical Clocks 2 The Myth of Simultaneity Event Timelines (Example of previous Slide) time “Event 1 and event 2 at same time” Event 1 Node 1 Event 2 Event 1 Event 2 Node 2 Observer A: Node 3 Event 2 is earlier than Event 1 Observer B: Node 4 Event 2 is simultaneous to Event 1 Observer C: Node 5 Event 1 is earlier than Event 2 e1 || e2 = e1 e2 | e2 e1 Note: The arrows start from an event and end at an observation. The slope of the arrows depend of relative speed of propagation CIS 505, Spring 2007 Physical Clocks 3 CIS 505, Spring 2007 Physical Clocks 4 1 Causality Event Timelines (Example of previous Slide) time Event 1 causes Event 1 Event 2 Node 1 Event 2 Node 2 Observer A: Event 1 before Event 2 Node 3 Observer B: Event 1 before Event 2 Node 4 Observer C: Event 1 before Event 2 Node 5 Note: In the timeline view, event 2 must be caused by some passage of Requirement: We have to establish causality, i.e., each observer must see information from event 1 if it is caused by event 1 event 1 before event 2 CIS 505, Spring 2007 Physical Clocks 5 CIS 505, Spring 2007 Physical Clocks 6 Why need to synchronize clocks? Physical Time foo.o created Some systems really need quite accurate absolute times.
    [Show full text]
  • Clock Synchronization Clock Synchronization Part 2, Chapter 5
    Clock Synchronization Clock Synchronization Part 2, Chapter 5 Roger Wattenhofer ETH Zurich – Distributed Computing – www.disco.ethz.ch 5/1 5/2 Overview TexPoint fonts used in EMF. Motivation Read the TexPoint manual before you delete this box.: AAAA A • Logical Time (“happened-before”) • Motivation • Determine the order of events in a distributed system • Real World Clock Sources, Hardware and Applications • Synchronize resources • Clock Synchronization in Distributed Systems • Theory of Clock Synchronization • Physical Time • Protocol: PulseSync • Timestamp events (email, sensor data, file access times etc.) • Synchronize audio and video streams • Measure signal propagation delays (Localization) • Wireless (TDMA, duty cycling) • Digital control systems (ESP, airplane autopilot etc.) 5/3 5/4 Properties of Clock Synchronization Algorithms World Time (UTC) • External vs. internal synchronization • Atomic Clock – External sync: Nodes synchronize with an external clock source (UTC) – UTC: Coordinated Universal Time – Internal sync: Nodes synchronize to a common time – SI definition 1s := 9192631770 oscillation cycles of the caesium-133 atom – to a leader, to an averaged time, ... – Clocks excite these atoms to oscillate and count the cycles – Almost no drift (about 1s in 10 Million years) • One-shot vs. continuous synchronization – Getting smaller and more energy efficient! – Periodic synchronization required to compensate clock drift • Online vs. offline time information – Offline: Can reconstruct time of an event when needed • Global vs.
    [Show full text]
  • Clock Synchronization
    Middleware Laboratory Sapienza Università di Roma MIDLAB Dipartimento di Informatica e Sistemistica Clock Synchronization Marco Platania www.dis.uniroma1.it/~platania [email protected] Sapienza University of Rome Time notion Each computer is equipped with a physical (hardware) clock It can be viewed as a counter incremented by ticks of an oscillator i At time t, the Operating System (OS) of a process y r o t reads the hardware clock H(t) of the processor a r o b a L e r a C = a H(t) + b w Then, it generates the software clock e l d d i M C approximately measures the time t of process i B A L D I M notion among processes among notion isas known evolve executions distributed (DS) Distributed in Systems Time Problems: how to analyze a in DS factor Time a key is The technique used to coordinate a common time time common a techniqueThe used coordinate to common notion time common of a process state during distributed a computation However, it©s important processes for a share to However, Lacking of a global reference time: it©s hard to know Lackingthe time:it©sknow to hard of a global reference ClockSynchronization MIDLAB Middleware Laboratory Clock Synchronization [10] The hardware clock of a set of computers (system nodes) may differ because they count time with different frequencies Clock Synchronization faces this problem by means of synchronization algorithms y r Standard communication infrastructure o t a r o No additional hardware b a L e r a w e l Clock synchronization algorithms d d i External M Internal B
    [Show full text]
  • Time & Timers, and GPS Introduction
    FYS3240 PC-based instrumentation and microcontrollers Time & timers, and GPS introduction Spring 2014 – Lecture #11 Bekkeng, 20.12.2013 TAI and UTC time • International Atomic Time (TAI) as a time scale is a weighted average of the time kept by over 300 atomic clocks in over 60 national laboratories worldwide. • Coordinated Universal Time (UTC) is the primary time standard by which the world regulates clocks and time, and is based on TAI but with leap seconds added at irregular intervals to compensate for the slowing of the Earth's rotation. • Since 30 June 2012 when the last leap second was added TAI has been exactly 35 seconds ahead of UTC. The 35 seconds results from the initial difference of 10 seconds at the start of 1972, plus 25 leap seconds in UTC since 1972. • UTC is the time standard used for many internet and World Wide Web standards. The Network Time Protocol (NTP), designed to synchronize the clocks of computers over the Internet, encodes times using the UTC system. Synchronize PC clock to NTP server in Windows Note: this Internet time settings is not available when the computer is part of a domain (such as the domain UIO.no) Windows Time service Leap seconds • Time is now measured using stable atomic clocks • A leap second is a one-second adjustment that is occasionally applied to UTC time in order to keep its time of day close to the mean solar time. o Solar time is a reckoning of the passage of time based on the Sun's position in the sky.
    [Show full text]
  • PTP Background and Overview
    PTP Background and Overview by Jeff Laird, July 2012 Introduction Precision Time Protocol (PTP) allows computers in a local area network to synchronize their clocks to within a microsecond of each other. The standard was originally defined in 2002. The second and current version of the standard was published in 2008. It is known as “IEEE 1588-2008” (IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems). PTP compared to other synchronization methods PTP is more accurate than NTP but less accurate than GPS. NTP NTP (Network Time Protocol) was standardized in 1985 and is the most common clock synchronization method, being used by tens of millions of client computers to synchronize to NTP servers over the Internet. NTP is primarily used in wide-area networks, where it can achieve accuracy to 10 ms. On a local-area network NTP can achieve accuracy to 200 μs. NTP includes SNTP (Simple NTP), which is stateless (no averaging) and therefore suitable for embedded devices, but less accurate. In NTP terminology, stratum-0 clocks are atomic clocks, GPS satellites, and radio clocks not directly on a network. They provide the time to stratum-1 clocks (network time servers) using a PPS (pulse-per- second) signal over an RS-232 serial connection. Stratum-2 clocks typically synchronize with multiple stratum-1 clocks. Stratum-3 clocks synchronize with one or more stratum-2 clocks, and so on. An NTP timestamp is 64 bits long—32 bits for seconds (to 136 years) and 32 bits for fraction of a second (to <0.25 ns).
    [Show full text]
  • Relativity and the Universe Gravitational Potential
    Relativity and the Universe Gravitational Potential Arindam Sinha∗y February 5, 2014 Abstract This paper reconciles General Relativity (GR) and Mach's Principle into a consistent, simple and intuitive alternative theory of gravitation. The Universe's ubiquitous background gravi- tational potential plays an important role in relativity concepts. This gravitational potential (energy per unit mass) far from all massive bodies is c2, which determines unit rest mass/energy, and is the essence behind E = mc2. The Universal matter distribution creates a local inertial rest frame at every location, in which the Universe gravitational potential is a minimum. A velocity in this frame increases this gravitational potential through net blue shift of Universal gravity, causing velocity time dilation, which is a gravitational effect identical to gravitational time dilation. Velocity time dilation from this increase of gravitational potential is found to be same as computed from the low velocity approximation of Lorentz factor. The current Lorentz Factor is applicable only in situations where a local potential is dominant compared to the Universe potential. Time dilation increases with velocity, but does not become boundless for general rectilinear motion in the Universe. Speed of light is not the maximum possible speed in such situations, but only in circumstances where the Lorentz Factor is the appropriate metric. Gravitational time dilation is derived first, and velocity time dilation is derived from it. The mathematics becomes much simpler and more
    [Show full text]
  • A Nobel Prize Clock-Watching in Great Court Compromising With
    Issue 10 • Spring 2010 A Nobel Prize Clock-watching in Great Court Compromising with Apartheid Restoration in the Wren A Trinity Memoir New Fellows Ethics and the Genome French Cricket SPIDERS AND PIGEONS: THE PRESSURES ON THE GREAT COURT CLOCK By Hugh Hunt This is a double anniversary year for Smith’s mechanism to attain still the Great Court Clock. It was 400 greater accuracy. years ago in 1610 that the clock was At the heart of the monitoring first installed. Its dial was small and system is a tiny infrared beam that modest, but in 1726 our masterful is interrupted every 1½ seconds by master Bentley had it replaced by the swing of the pendulum—once something grander. The 1610 clock is per “tick”. The signal is recorded by still running in the tower of Orwell’s a PC which also records the one- village church. pulse-per-second output of a GPS As Graham Chinner reported in The receiver—accurate to 10 nanoseconds, Fountain of Autumn 2009, the Bentley so they say. A computer compares the clock mechanism was coincidentally ticks with the GPS to compute the replaced a century ago, in 1910, thanks drift of the clock and the amplitude to a bequest from Lord Grimthorpe. of the pendulum’s swing, producing a His “double three-legged gravity new data point every three seconds. escapement” was made famous in 1859 A weather station also records when installed in the Great Clock in temperature, barometric pressure is 104 milliseconds per day per gram. Westminster (“Big Ben”). In the 50 years and humidity.
    [Show full text]
  • STP Recommendations for the FINRA Clock Synchronization Requirements
    STP recommendations for the FINRA clock synchronization requirements This document can be found on the web, www.ibm.com/support/techdocs Search for document number WP102690 under the category of “White Papers". Version Date: January 20, 2017 George Kozakos [email protected] © IBM Copyright, 2017 Version 1, January 20, 2017 Web location of document ( www.ibm.com/support/techdocs ) ~ 1 ~ STP recommendations for the FINRA clock synchronization requirements Contents Configuring an external time source (ETS) via a network time protocol (NTP) server with pulse per second (PPS) ......................................................................................................... 3 Activating the z/OS time of day (TOD) clock accuracy monitor .............................................. 4 Maintaining time accuracy across power-on-reset (POR) ...................................................... 5 Specifying leap seconds ....................................................................................................... 6 Appendix ............................................................................................................................. 7 References ........................................................................................................................... 8 Trademarks ......................................................................................................................... 8 Feedback ............................................................................................................................
    [Show full text]
  • Distributed Systems: Synchronization
    Chapter 3: Distributed Systems: Synchronization Fall 2013 Jussi Kangasharju Chapter Outline n Clocks and time n Global state n Mutual exclusion n Election algorithms Kangasharju: Distributed Systems 2 Time and Clocks What we need? How to solve? Real time Universal time (Network time) Interval length Computer clock Order of events Network time (Universal time) NOTE: Time is monotonous Kangasharju: Distributed Systems 3 Measuring Time n Traditionally time measured astronomically n Transit of the sun (highest point in the sky) n Solar day and solar second n Problem: Earth’s rotation is slowing down n Days get longer and longer n 300 million years ago there were 400 days in the year ;-) n Modern way to measure time is atomic clock n Based on transitions in Cesium-133 atom n Still need to correct for Earth’s rotation n Result: Universal Coordinated Time (UTC) n UTC available via radio signal, telephone line, satellite (GPS) Kangasharju: Distributed Systems 4 Hardware/Software Clocks n Physical clocks in computers are realized as crystal oscillation counters at the hardware level n Correspond to counter register H(t) n Used to generate interrupts n Usually scaled to approximate physical time t, yielding software clock C(t), C(t) = αH(t) + β n C(t) measures time relative to some reference event, e.g., 64 bit counter for # of nanoseconds since last boot n Simplification: C(t) carries an approximation of real time n Ideally, C(t) = t (never 100% achieved) n Note: Values given by two consecutive clock queries will differ only if clock resolution is sufficiently smaller than processor cycle time Kangasharju: Distributed Systems 5 Problems with Hardware/Software Clocks n Skew: Disagreement in the reading of two clocks n Drift: Difference in the rate at which two clocks count the time n Due to physical differences in crystals, plus heat, humidity, voltage, etc.
    [Show full text]