TinyOS Software Engineering Sensor Networks for the Masses.

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

NesC Prepared for the Multimedia Networks Group University of Virginia.
Sensor Network Platforms and Tools
1 Architectural Complexity: Opening the Black Box Methods for Exposing Internal Functionality of Complex Single and Multiple Processor Systems EECC-756.
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.
ECE 526 – Network Processing Systems Design Software-based Protocol Processing Chapter 7: D. E. Comer.
Static Analysis of Embedded C Code John Regehr University of Utah Joint work with Nathan Cooprider.
Jason Hill, Robert Szewczyk, Alec Woo Spring 2000 TinyOS Operating System for Networked Sensors Networked SensorsSystem Structure Composing Components.
Generic Sensor Platform for Networked Sensors Haywood Ho.
Tiny OS Optimistic Lightweight Interrupt Handler Simon Yau Alan Shieh CS252, CS262A, Fall The.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
Generic Sensor Platform for Networked Sensors Haywood Ho.
Active Messages: a Mechanism for Integrated Communication and Computation von Eicken et. al. Brian Kazian CS258 Spring 2008.
TOSSIM 17.ix.2001 TOSSIM v01.a. TOSSIM 17.ix.2001 TOSSIM Capabilities Simulates large mote networks under Linux Uses existing TinyOS code (different compilation)
1 TinyOS Mohammad Rahimi CSCI599-Spring Motivation  The new class of distributed tiny devices  The new generation of software.
2008EECS Embedded Network Programming nesC, TinyOS, Networking, Microcontrollers Jonathan Hui University of California, Berkeley.
Matnet – Matlab Network Simulator for TinyOS Alec WooTerence Tong July 31 st, 2002.
August 7, 2003 Sensor Network Modeling and Simulation in Ptolemy II Philip Baldwin University of Virginia Motivation With.
1 EE249 Discussion System Architecture Directions for Networked Sensors (J. Hill, et al) Presented By: Sarah Bergbreiter EE249 Discussion Section October.
TOSSIM: Visualizing the Real World Philip Levis, Nelson Lee, Dennis Chi and David Culler UC Berkeley NEST Retreat, January 2003.
Evolving Real-Time Systems using Hierarchical Scheduling and Concurrency Analysis John Regehr Alastair Reid Kirk Webb Michael Parker Jay Lepreau School.
Chapter 13 Embedded Operating Systems Eighth Edition By William Stallings Operating Systems: Internals and Design Principles.
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Sensor Network Simulation Simulators and Testbeds Jaehoon Kim Jeeyoung Kim Sungwook Moon.
Evolution of Microcontroller Firmware Development David Benjamin.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
Spring 2000, 4/27/00 Power evaluation of SmartDust remote sensors CS 252 Project Presentation Robert Szewczyk Andras Ferencz.
NetBurner MOD 5282 Network Development Kit MCF 5282 Integrated ColdFire 32 bit Microcontoller 2 DB-9 connectors for serial I/O supports: RS-232, RS-485,
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
A System Architecture for Networked Sensors Jason Hill, Robert Szewczyk, Alec Woo, Seth Hollar, David Culler, Kris Pister
April 15, 2005TinyOS: A Component Based OSPage 1 of 27 TinyOS A Component-Based Operating System for Networked Embedded Systems Tom Bush Graduate College.
Interrupts and DMA CSCI The Role of the Operating System in Performing I/O Two main jobs of a computer are: –Processing –Performing I/O manage and.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
OPERATING SYSTEMS Goals of the course Definitions of operating systems Operating system goals What is not an operating system Computer architecture O/S.
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.
Reference: Ian Sommerville, Chap 15  Systems which monitor and control their environment.  Sometimes associated with hardware devices ◦ Sensors: Collect.
Simulation of Distributed Application and Protocols using TOSSIM Valliappan Annamalai.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
System Architecture Directions for Networked Sensors Jason Hill, Robert Szewczyk, Alec Woo, Seth Hollar, David Culler, Kris Pister Presenter: James.
Xiong Junjie Node-level debugging based on finite state machine in wireless sensor networks.
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
An Efficient Gigabit Ethernet Switch Model for Large-Scale Simulation Dong (Kevin) Jin.
Proposal for an Open Source Flash Failure Analysis Platform (FLAP) By Michael Tomer, Cory Shirts, SzeHsiang Harper, Jake Johns
An Efficient Gigabit Ethernet Switch Model for Large-Scale Simulation Dong (Kevin) Jin.
1 Software Reliability in Wireless Sensor Networks (WSN) -Xiong Junjie
Source Level Debugging of Parallel Programs Roland Wismüller LRR-TUM, TU München Germany.
بسم الله الرحمن الرحيم MEMORY AND I/O.
1 Why Threads are a Bad Idea (for most purposes) based on a presentation by John Ousterhout Sun Microsystems Laboratories Threads!
Building Wireless Efficient Sensor Networks with Low-Level Naming J. Heihmann, F.Silva, C. Intanagonwiwat, R.Govindan, D. Estrin, D. Ganesan Presentation.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
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.
INTRODUCTION TO WIRELESS SENSOR NETWORKS
Simulation of Distributed Application and Protocols using TOSSIM
Threads vs. Events SEDA – An Event Model 5204 – Operating Systems.
Elaine Cheong Yang Zhao December 8, 2001
Parallel Programming By J. H. Wang May 2, 2017.
Part 3 Design What does design mean in different fields?
CSCI 315 Operating Systems Design
I/O Systems I/O Hardware Application I/O Interface
CS 501: Software Engineering Fall 1999
Lecture Topics: 11/1 General Operating System Concepts Processes
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Modeling Event-Based Systems in Ptolemy II EE249 Project Status Report
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

TinyOS Software Engineering Sensor Networks for the Masses

Outline Software engineering in sensor networks Characteristics of TinyOS TOSSIM and TOSSER Systems in development Future Ideas Conclusion

Sensor Network Domain Wide range of users Highly distributed algorithms Limited resources Individual motes have minimal I/O Combination of usually separate difficulties

Sensor Network Domain Wide range of users Highly distributed algorithms Limited resources Individual motes have minimal I/O Combination of usually separate difficulties

Highly Distributed Algorithms Individual motes have limited computational capability –Efficient algorithms require distributed processing over a network of motes Inter-mote concurrency Hard to write and debug Unable to inspect mote state

Characteristics of TinyOS Abstractions: frames, commands, events, tasks Event-based non-blocking design Intra-mote concurrency Single stack User code handles interrupts (e.g. ADC)

TOSSIM TinyOS mote execution simulator Scalable to one thousand motes Compiles directly from TinyOS source Allows use of traditional tools (e.g. gdb ) Extensible radio, ADC and spatial models External interface to network (monitor traffic, inject packets)

TOSSIM Benefits One can debug implementations, not just algorithms Bit-level radio simulation requires modifications to only one component Complexity of real-world simulation (e.g. radio) configurable by user Debug inter-mote and intra-mote concurrency

TOSSIM: Inter-mote Concurrency Implement distributed algorithm Run in TOSSIM, examine algorithm component state as messages propagate Discover and fix bugs Implement noisy radio model, see how algorithm holds up

Bug Example: Intra-mote concurrency RADIO RADIO_STATE SEC_DEDMAC CRCPACKETOBJ AM Addressing Packet, CRC Data encoding/decoding FSM, event demux Radio bits, timing MAC, packet detection Experimental Radio Stack

New Radio Stack Bug Packets sent in PACKET_DONE event handler would usually (95% of the time) not be heard by other motes These packets heard with old radio stack Quick simulator output result: packets sent in handler don’t go through MAC component (no backoff, start symbol, etc.)

Bug: Implicit State Transition CRCPACKETOBJ signaled PACKET_DONE when it received BYTE_DONE event after last byte has been sent to SEC_DED Problem: SEC_DED has a two byte pipeline Sending a new packet before SEC_DED thinks it’s done appends the new data (not sent in a new packet) Fix: Signal packet done when SEC_DED signals its byte queue is empty

TOSSER Developed with Emil Ong (not here) Visual programming environment Displays component graph as a circuit –Components are chips –Links are wires Hooks up to TOSSIM for visual simulation Different view of program source –Finding some bugs becomes trivial

TOSSER Screenshot

Systems in Development TinyOS component graph validation –Commands cannot signal events Asynchronous vs. synchronous events –Defining the task boundary

Adding Qualifiers to Functions (cqual from Berkeley) Specify a qualifier lattice Annotate functions Check qualifier propagation $command $aevent $sevent $aevent < $command $sevent < $command char sync_event() $sevent { return async_event(); } char async_event() $aevent { return $command_two(); } char command_one() $command { return sync_event(); } char command_two() $command { return 0; }

Future Work Real-time requirement warnings –Interfacing with AVR studio –Instruction counts Debugging motes as threads –Is this a good idea? Building efficient abstractions –Traditional design patterns too heavyweight –Timers vs. clocks –ILP in radio stack for power conservation

Conclusions TinyOS domain is distinct from traditional software engineering For TinyOS to be widely used, it must be easy to use Reducing programming complexity and providing tools is necessary

Questions

Extra Slides

Sensor Network Users Small number of knowledgeable hackers –Systems work: protocols, services, power Large number of novice users –Developing applications: animal behavior logging, agricultural information collection, workspace monitoring –Weak programming and debugging skills

Mote I/O Network and physical indicators (e.g. LEDs) Difficult to inspect mote state –Can’t hook every mote up to a PC What if the bug is in the radio stack?

Limited Resources Weak processors (4 MHz) Small amounts of RAM (4 KB) Low network bandwidth (10-50 Kb) Radio start symbol detection: 80% CPU utilization Traditional layer of abstraction approach currently unfeasible

Radio Bug Visualized SEND_BYTE BYTE_DONE SEND_BYTE PACKET_DONE CRCPACKETOBJSEC_DEDAM SEND_PACKETSEND_BYTE