System Architecture Directions for Networked Sensors Qiuhua Cao Computer Science Department University of Virginia.

Slides:



Advertisements
Similar presentations
A System Architecture for Networked Sensors Jason Hill, Robert Szewczyk, Alec Woo, Seth Hollar, David Culler, Kris Pister
Advertisements

David Culler, Jason Hill, Robert Szewczyk, Alec Woo U.C. Berkeley 2/9/2001 TinyOS Programming Boot Camp Part IV – Tiny OS 4.3 Component Overview.
How to use TinyOS Jason Hill Rob Szewczyk Alec Woo David Culler An event based execution environment for Networked Sensors.
A System Architecture for Tiny Networked Devices
Towards System Architecture for Tiny Networked Devices Jason Hill U.C. Berkeley.
Overview: Chapter 7  Sensor node platforms must contend with many issues  Energy consumption  Sensing environment  Networking  Real-time constraints.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
System Architecture Directions for Networked Sensors Jason Hill, Rober Szewczyk, Alec Woo, Seth hollar, David Culler & Kristofer Pister Presented by Israel.
Towards System Architecture for Tiny Networked Devices David Culler U.C. Berkeley Wireless hoo-hah 5/30/2000.
Contiki A Lightweight and Flexible Operating System for Tiny Networked Sensors Presented by: Jeremy Schiff.
How to Code on TinyOS Xufei Mao Advisor: Dr. Xiang-yang Li CS Dept. IIT.
Jason Hill, Robert Szewczyk, Alec Woo Spring 2000 TinyOS Operating System for Networked Sensors Networked SensorsSystem Structure Composing Components.
1 Concurrent and Distributed Systems Introduction 8 lectures on concurrency control in centralised systems - interaction of components in main memory -
Generic Sensor Platform for Networked Sensors Haywood Ho.
A System Architecture for Tiny Networked Devices Jason Hill U.C. Berkeley 9/22/2000.
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.
2008EECS Embedded Network Programming nesC, TinyOS, Networking, Microcontrollers Jonathan Hui University of California, Berkeley.
Sensor Node Architecture Issues Stefan Dulman
Introduction to TinyOS. Networking Open Experimental Platform Small microcontroller 8 kB code 512 B data Simple, low-power radio 10 kbps ASK EEPROM (32.
1 EE249 Discussion System Architecture Directions for Networked Sensors (J. Hill, et al) Presented By: Sarah Bergbreiter EE249 Discussion Section October.
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Operating System Organization.
Source : System Architecture Directions or Networked Sensors - Jason Hill, Robert Szewcyk, Alec Woo, Seth Hollar, David Culler, Kristofer Pister The Mica.
OMNET++. Outline Introduction Overview The NED Language Simple Modules.
1 Software Development Infrastructure for Sensor Networks  Operating systems ( TinyOS )  Resource (device) management  Basic primitives  Protocols.
TinyOS Tutorial Jianping Wang (merge several tutorials found online)
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
1 System Architecture Directions for Networked Sensors (TinyOS & Mica2) Presented by Jang Young, Kim (Chris)
April 15, 2005TinyOS: A Component Based OSPage 1 of 27 TinyOS A Component-Based Operating System for Networked Embedded Systems Tom Bush Graduate College.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
TinyOS By Morgan Leider CS 411 with Mike Rowe with Mike Rowe.
◦ What is an Operating System? What is an Operating System? ◦ Operating System Objectives Operating System Objectives ◦ Services Provided by the Operating.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Vishal Jain, TinyOS Design Viewpoint “TinyOS” Design Viewpoint.
Extreme Networked Systems: Large Self-Organized Networks of Tiny Wireless Sensors David Culler Computer Science Division U.C. Berkeley Intel
Component-Based Development of Networked Embedded Applications Peter Volgyesi and Akos Ledeczi Institute for Software Integrated Systems, Vanderbilt University.
Overview of: System Architecture Directions for Networked Sensors John Kerwin CSE 291 Sensor Networks Paper by: Jason Hill, Robert Szewczyk, Alec Woo,
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.
Part 2 TinyOS and nesC Programming Selected slides from:
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
© 2004, D. J. Foreman 1 Computer Organization. © 2004, D. J. Foreman 2 Basic Architecture Review  Von Neumann ■ Distinct single-ALU & single-Control.
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.
Operating Systems 1 K. Salah Module 1.2: Fundamental Concepts Interrupts System Calls.
Xiong Junjie Node-level debugging based on finite state machine in wireless sensor networks.
WSN Software Platforms - concepts Vinod Kulathumani Lecture uses some slides from tutorials prepared by authors of these platforms.
Lab 3, Part 2 Selected slides from: Wireless Sensor Networks Hardware/Software Tiny OS & NesC Programming borrowed from Turgay Korkmaz.
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.
Implementing Context Aware Applications Class 5. Agenda Review of TinyOS execution model Tutorial on TinyOS Code walk through Code quiz Assignment 2.
Introduction to Operating Systems Concepts
INTRODUCTION TO WIRELESS SENSOR NETWORKS
Simulation of Distributed Application and Protocols using TOSSIM
Elaine Cheong Yang Zhao December 8, 2001
Operating Systems (CS 340 D)
CS 286 Computer Organization and Architecture
A Network-Centric Approach to Embedded Software for Tiny Devices
TinyOS CSE466 Final Project Presentation
Process Description and Control
Process Description and Control
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:

System Architecture Directions for Networked Sensors Qiuhua Cao Computer Science Department University of Virginia

Outline  Hardware Organization of Berkeley Motes  Critical Issues of Sensor Networks  Does an OS for the Motes exsit?  Design Goals of TinyOS  Concepts in TinyOS  Examples  Evaluation and Critiques

Hardware Platform-Motes  Assembled from off-the-shelf components  4Mhz, 8bit MCU (ATMEL 90LS8535) –512 bytes RAM, 8K ROM  900Mhz Radio (RF Monolithics) – ft. range  Temperature & Light Sensor  LED outputs  Serial Port

Critical Issues for Sensor Networks  Highly Limited Device  power, memory, bandwith  Inherently Distributed  large number of nodes coordinate, cooperate with each other to fulfill an job  Devices themselves are the infrastructure  ad hoc, self-organized  Highly Dynamic  failure in common  variation in connectivity over time

Does an OS for the Motes exist?  Traditional OS design  wait request, act, respond loop  monolithic event processing  full thread/socket POSIX regime  Alternative  concurrency and modularity  never poll, never block  data flows, events, power management interact

Design Goals of TinyOS  Concurrency-Intensive Operations  flow information from place to place on-the-fly  Example: simultaneously capture data from sensors, processing the data, then send out to the network

Design Goals of TinyOS (cont.)  Limited Physical Parallelism and Controller Hierarchy  Less independent controllers  Less processor-memory-switch level  Sensor and Actuator directly interact with the single-chip micro controller

Design Goals of TinyOS (cont.)  Diversity in Design and Usage  Sensor network application specific design  But wide range potential applications  deep modularity of software needed

Design Goals of TinyOS (cont.)  Robust Operations  Cross devices redundancy prohibitive  Individual reliable devices desired  Application tolerant individual device failures

Concepts in TinyOS  Application = graph of components + scheduler  Example: INT_TO_LEDS MIAN COUNTER CLOCK INT_TO_LEDS LED

Concepts in TinyOS (cont.)  Component  Implementation (.c file) Frame a set of commands a set of handlers a set of tasks  Interface (.comp)  Description file (.desc)

Concepts in TinyOS (cont.)  Frame  Contains all permanent state for component (lives across events, commands, and threads)  Threads, events, and commands execute inside the component’s frame  Only one per component Like static class variables, not internal class variables.  Fixed size  Statically allocated at compile time

Concepts in TinyOS  Frame example:  Frame declaration #define TOS_FRAME_TYPE AM_obj_frame TOS_FRAME_BEGIN(AM_obj_frame) { int addr; char type; char state; char* data; char msgbuf[30]; } TOS_FRAME_END(AM_obj_frame); VAR(state) = 0;  Use of frame Variables:

 Commands:  Commands deposit request parameters into its frame  Commands can call lower level commands  Commands can post tasks  Commands no-blocking  Commands needed to return status  Declaration TOS_COMMAND(cmd_name)(cmd_args_list);  USE: TOS_CALL_COMMAND(cmd_name)(cmd_args_list);

 Events  Deposit information into frame  Events can call lower level commands  Post tasks and fire higher level events.  Events can not be signaled by commands,  Declaration char TOS_EVENT(evnt_name)(evnt_arg_list);  Use TOS_SIGNAL_EVENT(evnt_name)(evnt_arg_list);

 Tasks  Tasks perform work that is computationally intensive.  FIFO scheduler  Run-to-completion  Non-preemptable among tasks (concurrent)  Preemptable by events  Task declaration: TOS_TASK(task_name){….}  Posting a task: –Asynchronous call to schedule the task for later execution –USE: TOS_POST_TASK(avg_task);

Commands, Events, Tasks  Relationship Graph Higher Level Component Lower Level Component Signal events Issue cmds Commands can not signal Events Both event and cmd can schedule tasks Tasks preemptive by Envents Tasks non preemptive by Tasks

An Component Example Messaging Component init Power(mode) TX_packet(buf) TX_packet_done (success) RX_packet_done (buffer) Internal State init power(mode) send_msg(addr, type, data) msg_rec(type, data) msg_send_done (success) send_msg_thread Cmd Issued Cmd accepted Events handled Events signaled

An Component Example (cont. ) .comp file interface definition TOS_MODULE name; ACCEPTS{ command_signatures }; HANDLES{ event_signatures }; USES{ command_signatures }; SIGNALS{ event_signatures };

An Component Example (cont. ) .comp file interface definition //ACCEPTS: char TOS_COMMAND(AM_send_msg)(int addr, int type, char* data); void TOS_COMMAND(AM_power)(char mode); char TOS_COMMAND(AM_init)(); //SIGNALS: char AM_msg_rec(int type, char* data); char AM_msg_send_done(char success);

An Component Example (cont.) //HANDLES: char AM_TX_packet_done(char success); char AM_RX_packet_done(char* packet); //USES: char TOS_COMMAND(AM_SUB_TX_packet)(char* data); void TOS_COMMAND(AM_SUB_power)(char mode); char TOS_COMMAND(AM_SUB_init)();

An Component Example (cont.) .c file frame, commands, events implementation #define TOS_FRAME_TYPE AM_obj_frame TOS_FRAME_BEGIN(AM_obj_frame) { char state; TOS_MsgPtr msg; }TOS_FRAME_END(AM_obj_frame); // This task schedules the transmission of the Active Message TOS_TASK(AM_send_task) { //construct the packet to be sent,fill in dest and type if(!TOS_CALL_COMMAND(AM_SUB_TX_PACKET)(VAR(msg))) { VAR(state) = 0; TOS_SIGNAL_EVENT(AM_MSG_SEND_DONE)(VAR(msg)); return; } }

.c file frame, commands, events implementation // Command to be used for power management char TOS_COMMAND(AM_POWER)(char mode){ TOS_CALL_COMMAND(AM_SUB_POWER)(mode); VAR(state) = 0; return 1; } // Handle the event of the completion of a message transmission char TOS_EVENT(AM_TX_PACKET_DONE)(TOS_MsgPtr msg){ //return to idle state. VAR(state) = 0; //fire send done event. TOS_SIGNAL_EVENT(AM_MSG_SEND_DONE)(msg); return 1; }

An Component Example (cont. ) .desc file  component modules specified  the wiring of commands and events across component interfaces  Example: include modules{ module list }; connection list

Storage Model  One frame per component, shared stack Previous frame Current frame Next frame %sp %fp(old %sp) variable data Stack Growth

Storage Model (cont.)  Message Buffer  Strict alternating ownership protocol  Only TOS_MSG type pointer across component AM send_msg AM is owner of message buffer, the requesting component can not access this message buffer send_done AM gives up the owner of message buffer,

Storage Model (cont.) char TOS_COMMAND(INT_TO_RFM_OUTPUT)(int val){... if (!VAR(pending)) { VAR(pending) = 1; message->val = val; message->src = TOS_LOCAL_ADDRESS; if (TOS_COMMAND(INT_TO_RFM_SUB_SEND_MSG)(TOS_BC AST_ADDR, AM_MSG(INT_READING), &VAR(data))) { return 1; } else { VAR(pending) = 0; /* request failed, free buffer */ } } return 0; }

Scheduler  Two-level scheduling structure –Tasks, Events  FSM execution model –Each task is like a state in the state machine, which the events are like input signals  Events model –When there is no event, CPU is put in idle

An example of Execution Model Get_Light Send_MsgSleep Light done event / Msg send command Msg sent event / Power down command Clock Event / Light Request Command

Add a task Get_Light Send_MsgSleep Clock Event / Light Request Command Thread Schedule / Msg send command Msg sent event / Power down command Calc. Average Light done event / Post Task

An Composition Example RFM Radio Byte Radio Packet I2C photo Messaging Layer clocks bit byte packet Routing Layer sensing application HW SW ADC routing Temp

An Composition Example RFM Radio Byte Radio Packet I2C photo Messaging Layer clocks Routing Layer sensing application HW SW ADC Temp Send_message

An Composition Example RFM Radio Byte Radio Packet I2C photo Messaging Layer clocks Routing Layer sensing application HW SW ADC Temp TX_Packet

An Composition Example RFM Radio Byte Radio Packet I2C photo Messaging Layer clocks Routing Layer sensing application HW SW ADC Temp TX_byte

An Composition Example RFM Radio Byte Radio Packet I2C photo Messaging Layer clocks Routing Layer sensing application HW SW ADC Temp TX_Bit_Event

An Composition Example RFM Radio Byte Radio Packet I2C photo Messaging Layer clocks Routing Layer sensing application HW SW ADC Temp TX_Bit_Done

An Composition Example RFM Radio Byte Radio Packet I2C photo Messaging Layer clocks Routing Layer sensing application HW SW ADC Temp TX_Byte_Done

An Composition Example RFM Radio Byte Radio Packet I2C photo Messaging Layer clocks Routing Layer sensing application HW SW ADC Temp TX_Packet_Done

An Composition Example RFM Radio Byte Radio Packet I2C photo Messaging Layer clocks Routing Layer sensing application HW SW ADC Temp Msg_Send_Done

Evaluation  meet power constraints? ActiveIdleSleep CPU5 mA2 mA5 μA Radio7 mA (TX)4.5 mA (RX)5 μA EE-Prom3 mA00 LED’s4 mA00 Photo Diode200 μA00 Temperature200 μA00

Evaluation  meet power save? Battery Lifetime for sensor reporting every minute Duty Cycle Estimated Battery Life Full Time Listening100%3 Days Full Time Low Power Listening 100% 6.54 Days Periodic Multi-Hop Listening 10%65 Days No Listening0.01%Years

Evaluation  meet memory constraints?

Evaluation  Meet concurrent-intensive operations?  Event-driven architecture  Efficient interrupts/events handling (function calls, no user/kernel boundary)  Modularity?  Function call (event, command) interface between components

Critique  Real-time not addressed  Non-preemptable FIFO task scheduling  NO real-time guarantees or overload protection  Tasks are dispatched to either software or hardware to best utilize the whole system resources but in TinyOS, all tasks go into software.  Adding event queues at the lowest layers can reduce the external event losses  The OS should collect runtime profiles and statistics, perform periodic system maintenance operations and maintain system level power state  No opposite argument

Thanks!! Any Question??