Clock Synchronization

Slides:



Advertisements
Similar presentations
Christoph Lenzen Philipp Sommer Philipp Sommer Roger Wattenhofer Roger Wattenhofer Optimal Clock Synchronization in Networks.
Advertisements

Causal Delivery (Thomas) Matt Guinn CS523, Spring 2006.
Lecture 1: Logical, Physical & Casual Time (Part 2) Anish Arora CSE 763.
Gradient Clock Synchronization in Wireless Sensor Networks
* Distributed Algorithms in Multi-channel Wireless Ad Hoc Networks under the SINR Model Dongxiao Yu Department of Computer Science The University of Hong.
5/5/20151 Mobile Ad hoc Networks COE 549 Transmission Scheduling II Tarek Sheltami KFUPM CCSE COE
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
Packet Leashes: Defense Against Wormhole Attacks Authors: Yih-Chun Hu (CMU), Adrian Perrig (CMU), David Johnson (Rice)
Christoph PODC 2009 Tight Bounds for Clock Synchronization Christoph Lenzen, Thomas Locher, and Roger Wattenhofer.
Broadcasting Protocol for an Amorphous Computer Lukáš Petrů MFF UK, Prague Jiří Wiedermann ICS AS CR.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
Distributed Systems Fall 2010 Time and synchronization.
Roger SOFSEM 2010 –1 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AAA A A A Theory Meets Practice.
LSRP: Local Stabilization in Shortest Path Routing Hongwei Zhang and Anish Arora Presented by Aviv Zohar.
1 Shared Access Networks Outline Bus (Ethernet) Token ring (FDDI) Wireless (802.11)
Leveraging Linial's Locality Limit Christoph Lenzen, Roger Wattenhofer Distributed Computing Group.
Teaching material based on Distributed Systems: Concepts and Design, Edition 3, Addison-Wesley Copyright © George Coulouris, Jean Dollimore, Tim.
Ad Hoc and Sensor Networks – Roger Wattenhofer –9/1Ad Hoc and Sensor Networks – Roger Wattenhofer – Clock Synchronization Chapter 8 TexPoint fonts used.
1 University of Freiburg Computer Networks and Telematics Prof. Christian Schindelhauer Wireless Sensor Networks 15th Lecture Christian Schindelhauer.
Time Synchronization Murat Demirbas SUNY Buffalo.
Theory Meets Practice …it's about TIME! TexPoint fonts used in EMF.
Spring 2002CS 4611 Shared Access Networks Outline Bus (Ethernet) Token ring (FDDI) Wireless (802.11)
1 University of Freiburg Computer Networks and Telematics Prof. Christian Schindelhauer Wireless Sensor Networks 13th Lecture Christian Schindelhauer.
Algorithmic Models for Sensor Networks Stefan Schmid and Roger Wattenhofer WPDRTS, Island of Rhodes, Greece, 2006.
MAC Layer Protocols for Sensor Networks Leonardo Leiria Fernandes.
Improved results for a memory allocation problem Rob van Stee University of Karlsruhe Germany Leah Epstein University of Haifa Israel WADS 2007 WAOA 2007.
Time of arrival(TOA) Prepared By Sushmita Pal Roll No Dept.-CSE,4 th year.
Ad Hoc and Sensor Networks – Roger Wattenhofer –9/1Ad Hoc and Sensor Networks – Roger Wattenhofer – Time Synchronization Chapter 9 TexPoint fonts used.
PODC Distributed Computation of the Mode Fabian Kuhn Thomas Locher ETH Zurich, Switzerland Stefan Schmid TU Munich, Germany TexPoint fonts used in.
1 Clock Synchronization for Wireless Sensor Networks: A Survey Bharath Sundararaman, Ugo Buy, and Ajay D. Kshemkalyani Department of Computer Science University.
11/25/2015 Wireless Sensor Networks COE 499 Localization Tarek Sheltami KFUPM CCSE COE 1.
Computer Science 1 TinySeRSync: Secure and Resilient Time Synchronization in Wireless Sensor Networks Speaker: Sangwon Hyun Acknowledgement: Slides were.
Time This powerpoint presentation has been adapted from: 1) sApr20.ppt.
UNIT IV INFRASTRUCTURE ESTABLISHMENT. INTRODUCTION When a sensor network is first activated, various tasks must be performed to establish the necessary.
Introduction Wireless Ad-Hoc Network  Set of transceivers communicating by radio.
Ad Hoc and Sensor Networks – Roger Wattenhofer –9/1– Clock Synchronization TexPoint fonts used in EMF. Read the TexPoint manual before you delete this.
William Stallings Data and Computer Communications
Proof of liveness: an example
Impact of Interference on Multi-hop Wireless Network Performance
New Characterizations in Turnstile Streams with Applications
Monitoring Churn in Wireless Networks
Packet Leashes: Defense Against Wormhole Attacks
Topology Control –power control
Distributed Computing
Wireless Sensor Network Architectures
Leveraging Linial's Locality Limit
Introduction to Wireless Sensor Networks
Medium Access Control (MAC) Sub-layer
Time and Clock.
Georg Oberholzer, Philipp Sommer, Roger Wattenhofer
Georg Oberholzer, Philipp Sommer, Roger Wattenhofer
Clock Synchronization
Clock Synchronization Chapter 9
Hidden Terminal Decoding and Mesh Network Capacity
Agreement Protocols CS60002: Distributed Systems
TexPoint fonts used in EMF.
High Throughput Route Selection in Multi-Rate Ad Hoc Wireless Networks
Research: algorithmic solutions for networking
Time and Clock.
Fault-tolerant Consensus in Directed Networks Lewis Tseng Boston College Oct. 13, 2017 (joint work with Nitin H. Vaidya)
mEEC: A Novel Error Estimation Code with Multi-Dimensional Feature
Coverage Approximation Algorithms
Introduction Wireless Ad-Hoc Network
Capacity of Ad Hoc Networks
Physical clock synchronization
Architectures of distributed systems
Overview: Chapter 4 Infrastructure Establishment
Compute-and-Forward Can Buy Secrecy Cheap
Dr. John P. Abraham Professor UTPA
Presentation transcript:

Clock Synchronization Tight Bounds for Clock Synchronization Christoph Lenzen, Thomas Locher, and Roger Wattenhofer Disclaimer: (again) no dynamic communication networks, sorry. But: we have communication networks, and even if the nodes are not dynamic, the clock

Time in Networks Common time is essential for many applications: Assigning a timestamp to a globally sensed event (e.g. earthquake) Precise event localization (e.g. shooter detection, multiplayer games) TDMA-based MAC layer in wireless networks Generating clock pulses driving a CPU or chip Global Local Local Local

Clock Synchronization in Practice? Radio Clock Signal: Clock signal from a reference source (atomic clock) is transmitted over a long wave radio signal DCF77 station near Frankfurt, Germany transmits at 77.5 kHz with a transmission range of up to 2000 km Accuracy limited by the distance to the sender, Frankfurt-Zurich is about 1 ms. Special antenna/receiver hardware required Global Positioning System (GPS): Satellites continuously transmit own position and time code Line of sight between satellite and receiver required ) (At least one) motivation to study the problem in multi-hop environments

Clock Synchronization in Theory? ...is a surprisingly versatile and persistent topic some facets: 1970 one-shot, single-hop 1980 failures, drifting clocks, multi-hop 1990 varying drifts and delays 2000 gradient property now ...? We can have this and more!

Error sources Inaccurate hardware clocks Unknown message delays rate Clock drift: both systematic and random deviations from the nominal rate dependent on power supply, temperature, etc. Drift is typically small E.g. TinyNodes have a maximum drift of ² < 10-5 at room temperature Unknown message delays Asymmetric packet delays due to non-determinism Simplification: Assume messages take between 0 and 1 time unit We analyze the worst-case Drifts and delays vary arbitrarily within these bounds Oscillator t rate 1 1+² 1-²

Problem Summary Given a communication network Goal: Synchronize Clocks Nodes are equipped with drifting hardware clocks Message delays vary Goal: Synchronize Clocks Both global and local synchronization!

Problem Summary (continued) 1. Global property: Minimize clock skew between any two nodes. 2. Local (gradient) property: Small clock skew between neighbors. Clocks should not be allowed to stand still or jump. ...but let's be more careful (and ambitious): 3. Clocks shall behave similar to real clocks: Sometimes running a bit faster or slower is OK. But there should be a minimum and a maximum speed. As close to correct time as possible!

A Lower Bound on the Global Skew (5-second-proof) Messages between two neighboring nodes may be fast in one direction and slow in the other, or vice versa. A constant skew between neighbors may be „hidden“. Create skew by manipulating clock drifts. ) Global skew of (D). 2 3 4 5 6 7 u v 2 3 4 5 6 7 vs 2 3 4 5 6 7 2 3 4 5 6 7 8

Synchronization Algorithms: Amax How to update logical clocks based on the neighbors' messages? First idea: Minimize skew to fastest neighbor Set the clock to the maximum clock value received from any neighbor (if greater than local clock value) forward new values immediatly ) Optimal global skew of ¼D Poor local property: Fast propagation of the largest clock value could lead to a large skew between two neighboring nodes First all messages take 1 time unit, then we have a fast message! New time is D+x New time is D+x skew D! Time is D+x Time is D+x Time is D+x … Clock value: D+x Old clock value: D+x-1 Old clock value: x+1 Old clock value: x

Local Skew: Result Overview Everybody‘s expectation, five years ago („obviously constant“) “Kappa algorithm” [FOCS'08] Blocking algorithm [DISC'06] 1 log D √D D … Many natural algorithms [DISC'06] Many natural algorithms [DISC'06] Tight lower bound Lower bound of log D / log log D [Fan & Lynch, PODC'04] Dynamic Networks [Kuhn et al., SPAA'09]

Local Skew: Lower Bound There's more to it: The bound depends also on the maximum logical clock rate ¯ ! We get the following picture: Can these bounds be matched with clock rates · ¯ ? Yes, up to small constants! max rate ¯ 1+² 1+£(²) 1+√² 2 large local skew 1 (log D) (log1/² D) Can we have both smooth and accurate clocks? ...because too large clock rates will amplify the clock drift ². 11

Some Simplifications In order to keep things easy, we make a few simplifications: Permit logical clock rates of (1+²)¯ Abstract communication: at any time t, node i has an estimate Ei,j(t) 2 (Lj(t-1),Lj(t)] of neighbor j's clock value The graph is a list of D nodes L1(t) ¸ L2(t) ¸ ... ¸ LD(t) at any time t node D "removes" skew, node 1 "creates" it, other nodes "move" it ) node i struggles to keep up with Li-1 while not outrunning Li+1 Ok when considering "reasonable" algorithms! On a general graph, the clocks most ahead and behind take these roles

Synchronization Algorithms: Aavg Amax failed because it locally accumulated clock skews ) Idea: Locally balance them! ) Increase Li at rate hi ¢ ¯ whenever Ei,i-1 - Li > Li - Ei,i+1 ) Skew to clock behind is only increased if skew to clock ahead is worse Problem: delays prevent nodes from acting ) catastrophic failure: (D2) global and (D) local skew [DISC'06] Time is 4 Li-1 = 5 Li = 2 Li+1 = 1 Time is 1 Time is 0 Time is 9 Li-2 = 10

Synchronization Algorithms: Aagg Apparently we need to be more aggressive ) Increase Li at rate hi¢¯ whenever Ei,i-1 - Li + ¯ > Li - Ei,i+1 - ¯ ) Nodes will always react if left neighbor is further ahead than right neighbor is behind Problem: Nodes may run faster even if skew is well-balanced ) (D) local skew Time is 3 Li-1 = 3 Li = 2 Li+1 = 1 Time is 2 Time is 1 Time is 4 Li-2 = 4

Synchronization Algorithms: Aopt ...totally lost?!? No, but we need to combine the advantages of both algorithms. ) Idea: Run fast whenever d(Ei,i-1-Li)/(2¯)e > b(Li-Ei,i+1)/(2¯)c Acts like Aavg if differences are even multiples of ¯: d(Ei,i-1-Li)/(2¯)e = (Ei,i-1-Li)/(2¯) and b(Li-Ei,i+1)/(2¯)c = (Li-Ei,i+1)/(2¯) ...but like Aagg if they are odd multiples of ¯: d(Ei,i-1-Li)/(2¯)e = (Ei,i-1-Li)/(2¯) + ¯ and b(Li-Ei,i+1)/(2¯)c = (Li-Ei,i+1)/(2¯) - ¯ ) In some "skew ranges" Aopt moves skew quickly, in others it plays defensively in order to buy time ...it's that simple? Yes and no. It works, but the proof gets quite involved.

Aopt – Trivia Message frequency? O(1/(¯-1)) Message size? O(1) Approximation ratio? asymptotically 2 Memory required? roughly #neighbors Must max. delay be known? no Fault tolerance? crash failures ok

Summary/Contributions Lower bounds taking into account hardware clock drifts, message delays, and constraints on logical clock rates Matching upper bounds attained by a simple, oblivous algorithm ) Local skew of O(1) can be achieved in spite of smooth progress of logical clocks for any practical diameters Bounds proving optimality of global skew Algorithm is efficient and adaptable to quite a few other models Some questions remain open, e.g.: What if delays are random? What about dynamic networks? How to cope with Byzantine failures?

Thank You! Questions & Comments?