Code Review Time Synchronization Presented by Yong Chen Department of Computer Science University of Virginia.

Slides:



Advertisements
Similar presentations
How to use TinyOS Jason Hill Rob Szewczyk Alec Woo David Culler An event based execution environment for Networked Sensors.
Advertisements

The Flooding Time Synchronization Protocol
Synchronization.
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.
More on protocol implementation Version walks Timers and their problems.
Time and Clock Primary standard = rotation of earth De facto primary standard = atomic clock (1 atomic second = 9,192,631,770 orbital transitions of Cesium.
Sensor Network-Based Countersniper System Gyula S, Gyorgy B, Gabor P, Miklos M, Branislav K, Janos S, Akos L, Andras N, Ken F Presented by Vikram Reddy.
Max-Min D-Cluster Formation in Wireless Ad Hoc Networks - Alan Amis, Ravi Prakash, Thai Vuong, Dung Huynh Presenter: Nirav Shah.
Computer Science 425 Distributed Systems CS 425 / ECE 428  2013, I. Gupta, K. Nahrtstedt, S. Mitra, N. Vaidya, M. T. Harandi, J. Hou.
Termination Detection. Goal Study the development of a protocol for termination detection with the help of invariants.
Time in Embedded and Real Time Systems Lecture #6 David Andrews
Teaching material based on Distributed Systems: Concepts and Design, Edition 3, Addison-Wesley Copyright © George Coulouris, Jean Dollimore, Tim.
The Flooding Time Synchronization Protocol
Time Synchronization Murat Demirbas SUNY Buffalo.
1 University of Freiburg Computer Networks and Telematics Prof. Christian Schindelhauer Wireless Sensor Networks 13th Lecture Christian Schindelhauer.
Layered Diffusion based Coverage Control in Wireless Sensor Networks Wang, Bang; Fu, Cheng; Lim, Hock Beng; Local Computer Networks, LCN nd.
PtinyOS: Simulating TinyOS in Ptolemy II Elaine Cheong Dec 10, 2004 EE290N Project Presentation (Initial NC code generator by Yang Zhao and Edward Lee)
5/5/2003MobiSys 2003 Tutorial TinyOS Tutorial, Part II Robert Szewczyk, Joe Polastre, Phil Levis, David Culler Mobisys 2003.
Scalable and Distributed GPS free Positioning for Sensor Networks Rajagopal Iyengar and Biplab Sikdar Department of ECSE, Rensselaer Polytechnic Institute.
Lecture 12 Synchronization. EECE 411: Design of Distributed Software Applications Summary so far … A distributed system is: a collection of independent.
Inside The CPU. Buses There are 3 Types of Buses There are 3 Types of Buses Address bus Address bus –between CPU and Main Memory –Carries address of where.
Lecture 2-1 CS 425/ECE 428 Distributed Systems Lecture 2 Time & Synchronization Reading: Klara Nahrstedt.
1 Code Review of SOWN Demo --- SentrySelection Model By: Gang Zhou Computer Science Department University of Virginia May 2004.
1 Software Development Infrastructure for Sensor Networks  Operating systems ( TinyOS )  Resource (device) management  Basic primitives  Protocols.
Routing Information Protocol (RIP). Intra-and Interdomain Routing An internet is divided into autonomous systems. An autonomous system (AS) is a group.
ARM Timers.
April 15, 2005TinyOS: A Component Based OSPage 1 of 27 TinyOS A Component-Based Operating System for Networked Embedded Systems Tom Bush Graduate College.
2008/2/191 Customizing a Geographical Routing Protocol for Wireless Sensor Networks Proceedings of the th International Conference on Information.
Adaptive Control-Based Clock Synchronization in Wireless Sensor Networks Kasım Sinan YILDIRIM *, Ruggero CARLI +, Luca SCHENATO + * Department of Computer.
RID: Radio Interference Detection in Wireless Sensor Networks Gang Zhou, Tian He, John A. Stankovic, Tarek Abdelzaher Department of Computer Sceince University.
Using the CPO timer All of the items below should be in the “Little Black Box of Science”
CIS 798 Sensor Network Implementation. Goals Learning sensor network programming with Crossbow motes Implement reasonable sized sensor applications Develop.
Simulation of Distributed Application and Protocols using TOSSIM Valliappan Annamalai.
HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 TinyOS & NesC.
Part 2 TinyOS and nesC Programming Selected slides from:
Termination Detection
Ryan Sites – CEG 790 Paper Presentation The Flooding Time Synchronization Protocol The Flooding Time Synchronization Protocol (SenSys ’04, November 3-5,
1 Clock Synchronization for Wireless Sensor Networks: A Survey Bharath Sundararaman, Ugo Buy, and Ajay D. Kshemkalyani Department of Computer Science University.
Minimizing Energy Consumption in Sensor Networks Using a Wakeup Radio Matthew J. Miller and Nitin H. Vaidya IEEE WCNC March 25, 2004.
Time Management.  Time management is concerned with OS facilities and services which measure real time, and is essential to the operation of timesharing.
Outline for Today Objectives: –Time and Timers Administrative details: –Talk on learning at 4 in 130 North Building –Questions?
CS 546: Intelligent Embedded Systems Gaurav S. Sukhatme Robotic Embedded Systems Lab Center for Robotics and Embedded Systems Computer Science Department.
Time synchronization for UWSN. Outline Time synchronization knowledge Typical time sync protocol Time sync in UWSN Discussion.
Computer Science 1 TinySeRSync: Secure and Resilient Time Synchronization in Wireless Sensor Networks Speaker: Sangwon Hyun Acknowledgement: Slides were.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
CLOCK SYNCHRONIZATION SUSMITHA KOTA 21- SEP-2015.
COLONYWIRELESS September 26, Outline 1.Motivation and Goals 2.Introduction to the XBee 3.The Wireless Library 4.Example Packet Group 5.The Token.
Active Message Application: CONNECT Presented by Xiaozhou David Zhu Oommen Regi July 6, 2001.
TinyOS Sandeep Gupta. Operating System (OS) What is an OS? Main functions  Process management  Memory management  Resource management Traditional OSs.
Global Clock Synchronization in Sensor Networks Qun Li, Member, IEEE, and Daniela Rus, Member, IEEE IEEE Transactions on Computers 2006 Chien-Ku Lai.
Firewalls A brief introduction to firewalls. What does a Firewall do? Firewalls are essential tools in managing and controlling network traffic Firewalls.
HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 Gossiping Protocol.
1 VLM 2 : A Very Lightweight Mobile Multicast System For Wireless Sensor Networks Anmol Sheth, Brian Shucker and Richard Han University of Colorado, Department.
Time Synchronization in Ad Hoc Networks Kay R¨omer MobiHOC 2001 Speaker : hsiwei.
PC-based L0TP Status Report “on behalf of the Ferrara L0TP Group” Ilaria Neri University of Ferrara and INFN - Italy Ferrara, September 02, 2014.
Why does it need? [USN] ( 주 ) 한백전자 Background Wireless Sensor Network (WSN)  Relationship between Sensor and WSN Individual sensors are very limited.
TinyOS Sandeep Gupta. TinyOS basics TinyOS is  Single tasking OS  Interrupt driven Written using a Component based language A set of components put.
1 CMPT 471 Networking II OSPF © Janice Regan,
Prof. Leonardo Mostarda University of Camerino
Simulation of Distributed Application and Protocols using TOSSIM
Routing Information Protocol (RIP)
Code Review Time Synchronization
Time and Clock Primary standard = rotation of earth
Time and Clock.
Time and Clock.
Viet Nguyen Jianqing Liu Yaqin Tang
Chapter 9 Transmission Modes
Aug Project: IEEE P Working Group for Wireless Personal Area Networks (WPANs) Submission Title: [Explanation and Revision of Previous Time.
Aug Project: IEEE P Working Group for Wireless Personal Area Networks (WPANs) Submission Title: [Explanation and Revision of Previous Time.
Presentation transcript:

Code Review Time Synchronization Presented by Yong Chen Department of Computer Science University of Virginia

Outline Clock Timer GlobalAbsoluteTimer TimeStamping Time Synchronization

Clock Local time source CPU clock: high resolution (7.37MHz), not stable, stops in power-down mode (SysTimeC) External clock: low resolution, stable, keeps running in power-down mode ClockC component A high precision real time clock (with 1/32768 sec resolution) The Clock interface (Clock.nc) has been extended to support the setting and retrieval of the current (actual) clock rate in 1/32768 second units.

Timer The new Timer component provides timers with 1/32768 sec resolution. If two timers use the same timer id, timer["id"], only the later timer takes effect, the previous one would not work. so timer should be used like TimerC.Timer[unique("Timer")]; Provide as many timers as needed Change the setting of TIMER_NUM_TIMERS

GlobalAbsoluteTimer Triggered at the absolute time point instead of time interval as previous timer The resolution is 1/1000 or 1/32768 second If two timers use the same timer id, like GlobalAbsoluteTimer[id], only the later timer takes effect, the previous one would not work. so timer should be used like GlobalAbsoluteTimer[unique("AbsoluteTimer")] Provide as many timers as needed Change the setting of MAX_NUM_ABS_TIMERS

TimeStamping Time stamping is a time synchronization primitive: establishing time reference points between a sender and receiver(s) using a single radio message Sender Sender obtains timestamp when the message was actually sent in its own local time The message can contain the local time of the sender at the time of transmission Method addStamp() Adds a time stamp to the next message sent by the radio. This method must be called immediatelly after SendMsg.send() returns SUCCESS. Receiver Receiver obtains timestamp when the message was received in its own local time Method getStamp() Returns the time stamp of the last received message. This method should be called when the ReceiveMsg.receive() is fired. The returned value contains the local time when the message was received.

Time Synchronization Flooding Time Synchronization Protocol for Sensor Networks, VU Each node maintains two time variables Local Time  Represents the local physical time  Never reset or adjusted Global Time  learns from its neighboring nodes.  Reflects the time of the network Formula for Global Time and Local Time  globalTime = localTime + offsetAverage + skew* (localTime – localAverage)  variable offsetAverage, skew, and localAverage are decided by messages from neighboring nodes

Time Synchronization Root The network is synchronized to the root node Sends out synchronization beacon messages periodically Other nodes are synchronized to the root, after synchronized, it will send out synch beacons periodically Who can be the root The node Set isForceRoot = 1  The node is set to be the root The node Set isForceRoot = -1  The node is never to be a root The node Set isForceRoot = 0  The node can be a root if it doesn’t receive any aynchronization message for a period of time  It is possible there are several roots simultaneously, if so, the root with smaller ID would dominate the network.

Time Synchronization Comments Actually, in the code, the isForceRoot is set to be either 1 or -1, so the code on isForceRoot == 0 can be eliminated. some repeated statements in command result_t StdControl.init() outgoingMsg->rootID = 0xFFFF; outgoingMsg->nodeID = TOS_LOCAL_ADDRESS; in command result_t StdControl.start() outgoingMsg->rootID = 0xFFFF; outgoingMsg->nodeID = TOS_LOCAL_ADDRESS; They can appear once in StdControl.init() only once