A Scalable Simulator for TinyOS Applications

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

1 Tomás Sánchez López July 9, 2004 Real-time & Embedded Systems Laboratory TinyOS … in deep.
NesC Prepared for the Multimedia Networks Group University of Virginia.
Overview: Chapter 7  Sensor node platforms must contend with many issues  Energy consumption  Sensing environment  Networking  Real-time constraints.
TOSSIM A simulator for TinyOS Presented at SenSys 2003 Presented by : Bhavana Presented by : Bhavana 16 th March, 2005.
Chapter 13 Embedded Systems Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Contiki A Lightweight and Flexible Operating System for Tiny Networked Sensors Presented by: Jeremy Schiff.
1 Efficient Memory Safety for TinyOS Nathan Cooprider Will Archer Eric Eide David Gay † John Regehr University of Utah School of Computing † Intel Research.
How to Code on TinyOS Xufei Mao Advisor: Dr. Xiang-yang Li CS Dept. IIT.
IEEE OpComm 2006, Berlin, Germany 18. September 2006 A Study of On-Off Attack Models for Wireless Ad Hoc Networks L. Felipe Perrone Dept. of Computer Science.
Reconfigurable Sensor Networks Chris Elliott Honours in Digital Systems Charles Greif and Nandita Bhattacharjee.
7/13/2007AIIT Summer Course - D#1 Wireless Embedded Systems and Networking Lab Day 5: Part 1: TinyOS Programming on Open Source Distribution Jaein Jeong.
A Quick Note on TinyOS Chris Merlin Group Meeting January 21 st, 2009.
1 Efficient Memory Safety for TinyOS 2.1 Yang Chen Nathan Cooprider Will Archer Eric Eide David Gay † John Regehr University of Utah School of Computing.
1 TinyOS Mohammad Rahimi CSCI599-Spring Motivation  The new class of distributed tiny devices  The new generation of software.
TinyOS Software Engineering Sensor Networks for the Masses.
1 EE249 Discussion System Architecture Directions for Networked Sensors (J. Hill, et al) Presented By: Sarah Bergbreiter EE249 Discussion Section October.
Evolving Real-Time Systems using Hierarchical Scheduling and Concurrency Analysis John Regehr Alastair Reid Kirk Webb Michael Parker Jay Lepreau School.
Get Start with TinyOS From technique perspective
Spring 2000, 4/27/00 Power evaluation of SmartDust remote sensors CS 252 Project Presentation Robert Szewczyk Andras Ferencz.
1 Software Development Infrastructure for Sensor Networks  Operating systems ( TinyOS )  Resource (device) management  Basic primitives  Protocols.
A System Architecture for Networked Sensors Jason Hill, Robert Szewczyk, Alec Woo, Seth Hollar, David Culler, Kris Pister
Shahin Farshchi, Member, IEEE, Aleksey Pesterev, Paul Nuyujukian, Eric Guenterberg, Istvan Mody, and Jack W. Judy, Senior Member, IEEE, ” Structure of.
DESIGN & IMPLEMENTATION OF SMALL SCALE WIRELESS SENSOR NETWORK
By: R Jayampathi Sampath
April 15, 2005TinyOS: A Component Based OSPage 1 of 27 TinyOS A Component-Based Operating System for Networked Embedded Systems Tom Bush Graduate College.
TinyOS By Morgan Leider CS 411 with Mike Rowe with Mike Rowe.
Wireless Sensor Networks MOTE-KITS TinyOS Crossbow UC Berkeley.
Overview of Sensor Networks David Culler Deborah Estrin Mani Srivastava.
Component-Based Development of Networked Embedded Applications Peter Volgyesi and Akos Ledeczi Institute for Software Integrated Systems, Vanderbilt University.
Dhanshree Nimje Smita Khartad
System Architecture Directions for Networked Sensors Jason Hill, Robert Szewczyk, Alec Woo, Seth Hollar, David Culler, Kris Pister Presented by Yang Zhao.
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:
Simon Han – Ram Kumar Rengaswamy – Roy Shea – Mani Srivastava – Eddie Kohler –
@ nesC Programming KETI / Ubiquitous Computing Center Jeonghoon Kang
TinyOS and UC Berkeley Motes Hardware and Programming Tools Some slides and information was taken from Boot1.ppt and Boot2.ppt on the Berkeley TinyOS website.
System Architecture Directions for Networked Sensors Jason Hill, Robert Szewczyk, Alec Woo, Seth Hollar, David Culler, Kris Pister Presenter: James.
Main Issues Three major issues that we are concerned with in sensor networks are – Clustering Routing and Security To be considered against the backdrop.
Xiong Junjie Node-level debugging based on finite state machine in wireless sensor networks.
A Dynamic Operating System for Sensor Nodes Chih-Chieh Han, Ram Kumar, Roy Shea, Eddie Kohler, Mani, Srivastava, MobiSys ‘05 Oct., 2009 발표자 : 김영선, 윤상열.
SWAN simulation A Simulation Study of Denial of Service Attacks on Wireless Ad-Hoc Networks Samuel C. Nelson, Class of 2006, Dept. of Computer Science,
TinyOS Sandeep Gupta. Operating System (OS) What is an OS? Main functions  Process management  Memory management  Resource management Traditional OSs.
System Architecture Directions for Networked Sensors.
TinyOS By Valliappan Annamalai. Hardware Mica motes (Mica2 and Mica2Dot) Hardware –Radio –Microcontroller –Flash memory –ADC –Sensor Board (MTA310)
Why does it need? [USN] ( 주 ) 한백전자 Background Wireless Sensor Network (WSN)  Relationship between Sensor and WSN Individual sensors are very limited.
Software Architecture of Sensors. Hardware - Sensor Nodes Sensing: sensor --a transducer that converts a physical, chemical, or biological parameter into.
TinyOS Sandeep Gupta. TinyOS basics TinyOS is  Single tasking OS  Interrupt driven Written using a Component based language A set of components put.
TinyOS and nesC. Outline ● Wireless sensor networks and TinyOS ● Networked embedded system C (nesC) – Components – Interfaces – Concurrency model – Tool.
Tinyos Introduction to Programming Pritee Parwekar.
INTRODUCTION TO WIRELESS SENSOR NETWORKS
Muen Policy & Toolchain
TrueTime.
Simulation of Distributed Application and Protocols using TOSSIM
Operating System for Sensor Network
Elaine Cheong Yang Zhao December 8, 2001
Discussion 2: More to discuss
OO Methodology OO Architecture.
The Assembly Language Level
CS294-1 Reading Aug 28, 2003 Jaein Jeong
TinyOS CSE466 Final Project Presentation
An Introduction to Software Architecture
Chapter 4: Operating Systems
Distributed Control Applications Within Sensor Networks
Multithreaded Programming
Developing different types of Motes in WSN
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
A Study of On-Off Attack Models for Wireless Ad Hoc Networks
Modeling Event-Based Systems in Ptolemy II EE249 Project Status Report
Presentation transcript:

A Scalable Simulator for TinyOS Applications L. Felipe Perrone (perrone@ists.dartmouth.edu) David M. Nicol (nicol@ists.dartmouth.edu) ISTS Dartmouth College

Winter Simulation Conference 2002 Motivation The Smart Dust project UC Berkeley macro scale micro scale 12/3/2018 Winter Simulation Conference 2002

The need for simulation Network features: Massively parallel, large-scale, self-configurable, application diversity, wireless, dynamic, mobility, behavior dependent on environmental conditions. Environment features: Diversity of independent and inter-dependent dynamic processes. Difficulties: Development, testing, debugging, performance evaluation. Chemical sensor Traffic sensor Monitor/sensor 12/3/2018 Winter Simulation Conference 2002

Wish list for a simulator Simulates: The processes that drive the sensors in the motes The programs that run on motes The communication medium Supports: Very large numbers of motes Direct-execution of programs that run on motes Different applications in the same environment Accurate radio propagation model 12/3/2018 Winter Simulation Conference 2002

Winter Simulation Conference 2002 TinyOS The operating system on the mote platform. Frames represent the internal state of the component and are statically allocated. events to higher components commands from higher components … … Events are analogous to signals or hardware interrupts. They may signal other events or call commands. TOS Component frame task Commands can call other commands or post tasks. … … events from lower components Tasks may be interrupted by events, but not by other tasks. They may signal events and call commands. commands to lower components Within a mote, tasks are scheduled in FIFO order. 12/3/2018 Winter Simulation Conference 2002

A TinyOS application description include modules{ MAIN; COUNTER; INT_TO_LEDS; CLOCK; }; MAIN:MAIN_SUB_INIT COUNTER:COUNTER_INIT MAIN:MAIN_SUB_START COUNTER:COUNTER_START COUNTER:COUNTER_CLOCK_EVENT CLOCK:CLOCK_FIRE_EVENT COUNTER:COUNTER_SUB_CLOCK_INIT CLOCK:CLOCK_INIT COUNTER:COUNTER_SUB_OUTPUT_INIT INT_TO_LEDS:INT_TO_LEDS_INIT COUNTER:COUNTER_OUTPUT INT_TO_LEDS:INT_TO_LEDS_OUTPUT app.desc file CLOCK INT_TO_LEDS MAIN COUNTER main_sub_init main_sub_start MAIN.comp COUNTER.comp CLOCK.comp INT_TO_LEDS.comp counter_init counter_start counter_sub_output_init counter_output clock_init clock_event clock_fire_event int_to_leds_init 12/3/2018 Winter Simulation Conference 2002

Toward direct execution simulation Application code for one mote: components are wired together through compilation and linking. MAIN or Application Components Directly executed on a simulator … RFM ADC CLOCK ADC UART Unnecessary replication of the same code within the simulator. 12/3/2018 Winter Simulation Conference 2002

Frames and local variables Frame declaration: Simulator’s memory space: #define TOS_FRAME_TYPE mycomp_frame TOS_FRAME_BEGIN(mycomp_frame) { int x; } TOS_FRAME_END(mycomp_frame); One instance of the application code Frame variable reference: VAR(x)=0; … Frame declaration: mote 0 Multiple instances of the component frames in the application struct BLINK_frame : public TOSSF_Frame { char state; }; … mote 1 … Frame variable reference: registerFrame("BLINK", new BLINK_frame, moteId); BLINK_frame* TOSSFptr = (BLINK_frame*) getFrame("BLINK", moteId); (TOSSFptr->state)=0; … mote n 12/3/2018 Winter Simulation Conference 2002

Application / Component linkage To each application associate an object that maps the outbound wires of a component to the inbound wires of another. This object can be initialized at run time: applications can be defined at run time from a definition file or script. char BLINK_INIT_COMMAND(long moteId) { registerFrame("BLINK", new BLINK_frame, moteId); BLINK_frame* TOSSFptr = (BLINK_frame*) getFrame("BLINK", moteId); (*TOSSFwiringMap(“BLINK”,“BLINK_LEDr_off_COMMAND”)) (moteId); (*TOSSFwiringMap(“BLINK”,“BLINK_LEDy_off_COMMAND”)) (moteId); (*TOSSFwiringMap(“BLINK”,“BLINK_LEDg_off_COMMAND”)) (moteId); (TOSSFptr->state)=0; (*TOSSFwiringMap(“BLINK”,“BLINK_SUB_INIT_COMMAND”)) (moteId, tick1ps); return 1; } REGISTER_COMMAND(“BLINK”, BLINK_INIT_COMMAND); REGISTER_COMMAND(“BLINK”, BLINK_LEDr_off_COMMAND); REGISTER_COMMAND(“BLINK”, BLINK_LEDy_off_COMMAND); REGISTER_COMMAND(“BLINK”, BLINK_LEDg_off_COMMAND); 12/3/2018 Winter Simulation Conference 2002

The simulation substrate Environmental processes Mobility (SWAN) … mobile computing nodes Terrain (SWAN) RF Channel (SWAN) DaSSF 12/3/2018 Winter Simulation Conference 2002

Winter Simulation Conference 2002 A simple TOSSF model MODEL [ ARENA [ MOBILITY [ model "mobility.stationary" deployment "preset" seed 12345 xdim 5000 ydim 5000 ] NETWORK [ model "network.fixed-range" cutoff 200 ] ] MOTE [ ID 1 xpos 0 ypos 0 battery 500 _extends .APPLICATION_TYPES.BLINK … APPLICATION_TYPES [ BLINK [ components [ session [name "LEDS" use "system.LEDS"] session [name "MAIN" use "core.MAIN"] session [name "CLOCK" use "core.CLOCK"] session [name “BLINK" use "app.BLINK"] ] wiring [ map [MAIN MAIN_SUB_INIT BLINK BLINK_INIT] map [MAIN MAIN_SUB_START BLINK BLINK_START] map [BLINK BLINK_LEDy_on LEDS YELLOW_LED_ON] … DML script describing the application and the simulation scenario 12/3/2018 Winter Simulation Conference 2002

Winter Simulation Conference 2002 Limitations of TOSSF All interrupts are serviced after a task, command or event finishes executing. Commands and event handlers execute in zero simulation time units. No preemption. 12/3/2018 Winter Simulation Conference 2002

Winter Simulation Conference 2002 Scalability The complete SWAN code occupies 1.5M bytes of memory. A workstation with 256M bytes memory can hold roughly 32,500 motes. The memory overhead associated with each application type definition is that of a wiring map definition. The processing overhead involves table lookups for every variable reference and every function call (command or event). The cost incurred is application dependent. The model can be broken up for parallel simulation in SWAN: we’ll be able to experiment with very large network. 12/3/2018 Winter Simulation Conference 2002

Winter Simulation Conference 2002 Future work on TOSSF Mote platforms got a lot more powerful: memory has increased from 8K to 128K. One can code up a single executable containing different applications to be deployed in all motes. A new generation of motes slated to be released soon will use different radio technology. With the release of TinyOS 1.0, applications are described in a different way in a dialect of C: nesC. All the source-to-source translation in TOSSF needs to be rethought. The nesC language is said to be a transient solution: a more powerful programming language are a work in progress. 12/3/2018 Winter Simulation Conference 2002