Outline for Today Objectives: –Time and Timers Administrative details: –Talk on learning at 4 in 130 North Building –Questions?

Slides:



Advertisements
Similar presentations
The Flooding Time Synchronization Protocol
Advertisements

Time Synchronization - using Reference-Broadcast Synchronization
Gradient Clock Synchronization in Wireless Sensor Networks
HIERARCHY REFERENCING TIME SYNCHRONIZATION PROTOCOL Prepared by : Sunny Kr. Lohani, Roll – 16 Sem – 7, Dept. of Comp. Sc. & Engg.
Wireless Sensor Networks Clock Synchronization Professor Jack Stankovic University of Virginia.
Distributed Systems CS Synchronization Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud.
Operating Systems Process Scheduling (Ch 3.2, )
Computer Science 425 Distributed Systems CS 425 / ECE 428  2013, I. Gupta, K. Nahrtstedt, S. Mitra, N. Vaidya, M. T. Harandi, J. Hou.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Time and Synchronization Steve Ko Computer Sciences and Engineering University at Buffalo.
A. Frank - P. Weisberg Operating Systems Process Scheduling and Switching.
Time in Embedded and Real Time Systems Lecture #6 David Andrews
Distributed Systems Fall 2010 Time and synchronization.
Time Synchronization (RBS, Elson et al.) Presenter: Peter Sibley.
1 Soft Timers: Efficient Microsecond Software Timer Support For Network Processing Mohit Aron and Peter Druschel Rice University Presented By Jonathan.
1 University of Freiburg Computer Networks and Telematics Prof. Christian Schindelhauer Wireless Sensor Networks 15th Lecture Christian Schindelhauer.
Time Synchronization Murat Demirbas SUNY Buffalo.
Soft Timers: Efficient Microsecond Software Timer Support For Network Processing Mohit Aron and Peter Druschel Rice University Presented by Reinette Grobler.
Supporting Time-sensitive Application on a Commodity OS By Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole Presenter: Shuping Tien.
1 University of Freiburg Computer Networks and Telematics Prof. Christian Schindelhauer Wireless Sensor Networks 13th Lecture Christian Schindelhauer.
Soft Timers Efficient Microsecond Software Timer Support for Network Processing MOHIT ARON and PETER DRUSCHEL Rice University Published in ACM Transactions.
Fine-Grained Network Time Synchronization using Reference Broadcasts Jeremy Elson, Lewis Girod, and Deborah Estrin U.C.L.APresenter: Todd Fielder.
1 Physical Clocks need for time in distributed systems physical clocks and their problems synchronizing physical clocks u coordinated universal time (UTC)
Fine-Grained Network Time Synchronization Using Reference Broadcasts Jeremy Elson, Lew Girod, and Deborah Estrin University of California, Los Angeles.
Jennifer Rexford Fall 2014 (TTh 3:00-4:20 in CS 105) COS 561: Advanced Computer Networks Locations.
Enhanced NTP IETF – TicToc BOF Greg Dowd – Jeremy Bennington –
Clock Synchronization in Sensor Networks Mostafa Nouri.
Adaptive Control-Based Clock Synchronization in Wireless Sensor Networks Kasım Sinan YILDIRIM *, Ruggero CARLI +, Luca SCHENATO + * Department of Computer.
On-Demand Traffic-Embedded Clock Synchronization for Wireless Sensor Networks Sang Hoon Lee.
GPS based time synchronization of PC hardware Antti Gröhn
Real Time Operating Systems Lecture 10 David Andrews
Real-Time Systems Design1 Priority Inversion When a low-priority task blocks a higher-priority one, a priority inversion is said to occur Assume that priorities:
Why Visual Sensor Network & SMAC Implementation Group Presentation Raghul Gunasekaran.
Parallel and Distributed Simulation Synchronizing Wallclock Time.
1 Clock Synchronization for Wireless Sensor Networks: A Survey Bharath Sundararaman, Ugo Buy, and Ajay D. Kshemkalyani Department of Computer Science University.
Time Management.  Time management is concerned with OS facilities and services which measure real time, and is essential to the operation of timesharing.
Data Collection and Dissemination. Learning Objectives Understand Trickle – an data dissemination protocol for WSNs Understand data collection protocols.
Time synchronization for UWSN. Outline Time synchronization knowledge Typical time sync protocol Time sync in UWSN Discussion.
Fasika Assegei Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.
Fine-Grained Network Time Synchronization using Reference Broadcasts Jeremy Elson, Lew Girod, and Deborah Estrin OSDI Boston, MA Speaker : hsiwei-Chen.
Software Development Infrastructure for Sensor Networks Operating systems (TinyOS) –Resource (device) management –Basic primitives –Protocols (MAC, routing)
1 Soft Timers: Efficient Microsecond Software Timer Support For Network Processing Mohit Aron and Peter Druschel Rice University Presented By Oindrila.
Time This powerpoint presentation has been adapted from: 1) sApr20.ppt.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.
Time Synchronization Protocols in Wireless Sensor Networks.
An Energy-Efficient MAC Protocol for Wireless Sensor Networks Speaker: hsiwei Wei Ye, John Heidemann and Deborah Estrin. IEEE INFOCOM 2002 Page
UNIT IV INFRASTRUCTURE ESTABLISHMENT. INTRODUCTION When a sensor network is first activated, various tasks must be performed to establish the necessary.
6 SYNCHRONIZATION. introduction processes synchronize –exclusive access. –agree on the ordering of events much more difficult compared to synchronization.
Managing Processors Jeff Chase Duke University. The story so far: protected CPU mode user mode kernel mode kernel “top half” kernel “bottom half” (interrupt.
Computer Network Design EEL 6785 Dr. Janusz Zalewski University of Central Florida.
Time Management.  Time management is concerned with OS facilities and services which measure real time.  These services include:  Keeping track of.
Time Sources and Timing David Ferry, Chris Gill CSE 522S - Advanced Operating Systems Washington University in St. Louis St. Louis, MO
CORE Lab. E.E. 1 Soft timers : efficient microsecond so ftware timer support for network proc essing Mohit Aron and Peter Druschel 17 th ACM Symposium.
Distributed Systems Lecture 5 Time and synchronization 1.
CSE 486/586 CSE 486/586 Distributed Systems Time and Synchronization Steve Ko Computer Sciences and Engineering University at Buffalo.
Soft Timers : Efficient Microsecond Software Timer Support for Network Processing - Mohit Aron & Peter Druschel CS533 Winter 2007.
Timers and Time Management Ok-Kyun Ha
Outline for Today Objectives: –Time and Timers Administrative details: –About the final…
Mohit Aron Peter Druschel Presenter: Christopher Head
Synchronizing Processes
Time Sources and Timing
Presented by Kristen Carlson Accardi
Distributed Computing
Lecture 5 Time and synchronization
Time Sources and Timing
Net 435: Wireless sensor network (WSN)
Dept. of Computer Science
Time Sources and Timing
Supporting Time-Sensitive Applications on a Commodity OS
Presentation transcript:

Outline for Today Objectives: –Time and Timers Administrative details: –Talk on learning at 4 in 130 North Building –Questions?

Uses of Time Coordinating events –Synchronized clocks Measurements – durations of activities –Stability – ability to maintain constant frequency Environmental factors (temperature) or age Synchronization protocols that adjust clock Driving periodic events –Granularity (frequency) Scheduling dynamic events at a particular time in the future. –Accuracy –Relative or absolute time?

Time Definitions Clock stability – how well it maintains a constant frequency –Short term – temperature –Long term – aging of oscillator Clock accuracy – how well its frequency and time compare with standard

Time Definitions Offset – time difference between 2 clocks Skew – frequency difference between 2 clocks

Timer Basics (Linux) Real time clock (RTC) keeps track of time even when system is off – boot-time initialization System timer – provide periodic interrupts –Programmable interrupt timer running at tick rate of HZ frequency Time update (jiffies, wall clock time), do accounting (resource usage), dispatch events that are due (dynamic timers), rescheduling –Jiffies – number of ticks since reboot –Time of day xtime structure – contains seconds since Jan ; wall clock time based on that. Delaying execution by looping udelay(us) or sleeping schedule_timeout(s*HZ)

Dynamic Timers Created and destroyed dynamically Handler is run when tick count is >= expiration time. init_timer(&mytimer); mytimer.expires = jiffies + delay; mytimer.data = 0; //arg passed to handler mytimer.function =myhandler; add_timer(&mytimer); Can change mod_timer or remove del_timer_sync timers Timers are stored in buckets depending on how far into the future they should expire. Run asynchronously with respect to other code – protect shared data appropriately.

Soft Timers Aron & Druschel Goal: to provide usec granularity events with low overhead. –Do not want timer interrupts at that granularity Approach: To leverage trigger points when execution has already been interrupted – amortize context switch and cache pollution already incurred by other causes. –End of syscall processing, end of exception handler, end of executing interrupt handler, during CPU idle loop –Bounded overrun if a trigger point doesn’t happen – backup hardware interrupt set

Accuracy X = cycles/interrupt

Overhead Timer costs with synthetic event handler scheduled every 10usec Synthetic event handler touches 50 cache lines, 2 instr cache lines

Trigger Occurrence

Trigger Sources

Impact of Trigger Sources (ST-Apache)

Target Applications Rate-based clocking in the networking system –Schedule transmissions according to desired rate –If achieved rate falls below target, schedule to allow maximal allowable burst Polling network interfaces

Reference Broadcast Time Synchronization Elston, Girod, Estrin Goal: precise (1 us) relative time scale among wireless sensor nodes. Exploits (requires) broadcast medium Synchronizes among common receivers of the same beacon –I got it at time t 1 on my clock; you got it at time t 2 on your clock -> phase offset between clock values for this individual pulse is Offset[i,j] = t j -t i Must also deal with clock skew – clocks drift apart by ticking at slightly different rates

Naive Clock Synchronization request reply(timestamp) timestamp=localclock localclock = timestamp+rtt/2

How NTP works Multiple synchronization peers provide redundancy and diversity Clock filters select best from a window of eight clock offset samples Intersection and clustering algorithms pick best subset of servers believed to be accurate and fault-free Combining algorithm computes weighted average of offsets for best accuracy Phase/frequency-lock feedback loop disciplines local clock time and frequency to maximize accuracy and stability NTP Messages Peer 1 Peer 2 Filter 1 Peer 3 Filter 2 Filter 3 Intersection and Clustering Algorithms Combining Algorithm Loop Filter VFO Timestamps P/F-Lock Loop © Mills

Critical Path Nondeterminism RBS removes many causes of nondeterminism from critical path

Multiple Broadcasts Why Pairwise error: 2 receiver (bottom line); 20 receiver (top line)

Fixing Clock Skew Perform least- squares linear regression – best fit line over time; recover frequency and phase of local clock wrt remote one from slope and intercept Also an effective post-facto synchronization scheme – extrapolate backward Evaluation comparing RBS to NTP: 8 times better wrt average error (light load)

Multi-Hop Intersecting receivers can relate clocks from both A and B E i (R j ) means time of event i according to j’s clock. 1. Receivers R1 and R7 observe events at times E 1 (R 1 ) and E 7 (R 7 ), respectively. 2. R4 uses A’s reference broadcasts to establish the best-fit line needed for converting clock values from R1 to R4. This line is used to convert E 1 (R 1 ) to E 1 (R 4 ). 3. R4 similarly uses B’s broadcasts to convert E 1 (R 4 ) to E 1 (R 7 ). 4. The time elapsed between the events is computed as E 1 (R 7 ) – E 7 (R 7 )