A Quick Note on TinyOS Chris Merlin Group Meeting January 21 st, 2009.

Slides:



Advertisements
Similar presentations
TinyOS Tutorial, Part I Phil Levis et al. MobiSys 2003.
Advertisements

Chapter 16 Java Virtual Machine. To compile a java program in Simple.java, enter javac Simple.java javac outputs Simple.class, a file that contains bytecode.
Dynamic Memory Allocation in C.  What is Memory What is Memory  Memory Allocation in C Memory Allocation in C  Difference b\w static memory allocation.
Introduction to Memory Management. 2 General Structure of Run-Time Memory.
NesC Prepared for the Multimedia Networks Group University of Virginia.
Module R2 CS450. Next Week R1 is due next Friday ▫Bring manuals in a binder - make sure to have a cover page with group number, module, and date. You.
Feb 2007WSN Training: First Steps in nesC Programming1 First Steps in TinyOS and nesC Programming Topics  Timer Application: MyApp  Application directory.
1 Lab 3 Objectives  Case study: “Hello world” program on motes  Write you first program on mote.
Ad Hoc and Sensor Networks4/1 Ad Hoc and Sensor Networks Exercise 4 Sensor Network programming.
1 Starting a Program The 4 stages that take a C++ program (or any high-level programming language) and execute it in internal memory are: Compiler - C++
KFUPM, COE 499. Ayman Al Bassam COE 499 Wireless Sensor Networks LAB 1.
Overview: Chapter 7  Sensor node platforms must contend with many issues  Energy consumption  Sensing environment  Networking  Real-time constraints.
Chapter 1 OO using C++. Abstract Data Types Before we begin we should know how to accomplish the goal of the program We should know all the input and.
TOSSIM A simulator for TinyOS Presented at SenSys 2003 Presented by : Bhavana Presented by : Bhavana 16 th March, 2005.
CIS 101: Computer Programming and Problem Solving Lecture 8 Usman Roshan Department of Computer Science NJIT.
How to Code on TinyOS Xufei Mao Advisor: Dr. Xiang-yang Li CS Dept. IIT.
Programming Motes A TinyOS and TOSSIM Tutorial By: Brent Rood.
Development of a Mica2 Mote Sensor Network Cliff Macklin Bill Ehrbar December 8, 2004 University of Colorado, Colorado Springs.
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)
TinyOS Software Engineering Sensor Networks for the Masses.
PtinyOS: Simulating TinyOS in Ptolemy II Elaine Cheong Dec 10, 2004 EE290N Project Presentation (Initial NC code generator by Yang Zhao and Edward Lee)
Chess Review November 21, 2005 Berkeley, CA Edited and presented by Sensor Network Design Akos Ledeczi ISIS, Vanderbilt University.
. Memory Management. Memory Organization u During run time, variables can be stored in one of three “pools”  Stack  Static heap  Dynamic heap.
Pointers Applications
TOSSIM: Visualizing the Real World Philip Levis, Nelson Lee, Dennis Chi and David Culler UC Berkeley NEST Retreat, January 2003.
1 Lab 3 Objectives  Case study: “Hello world” program on motes  Write you first program on mote.
Overview Working directly with memory locations is beneficial. In C, pointers allow you to: change values passed as arguments to functions work directly.
1 I-Logix Professional Services Specialist Rhapsody IDF (Interrupt Driven Framework) CPU External Code RTOS OXF Framework Rhapsody Generated.
Implementation Yaodong Bi. Introduction to Implementation Purposes of Implementation – Plan the system integrations required in each iteration – Distribute.
Shahin Farshchi, Member, IEEE, Aleksey Pesterev, Paul Nuyujukian, Eric Guenterberg, Istvan Mody, and Jack W. Judy, Senior Member, IEEE, ” Structure of.
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.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-7 Memory Management (1) Department of Computer Science and Software.
Java Introduction Lecture 1. Java Powerful, object-oriented language Free SDK and many resources at
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
Wireless Sensor Networks MOTE-KITS TinyOS Crossbow UC Berkeley.
CIS 798 Sensor Network Implementation. Goals Learning sensor network programming with Crossbow motes Implement reasonable sized sensor applications Develop.
Lab 3 Introduction to TinyOS and nesC How to debug programs at PC Examples –Blink Timer –Blink –Hellow World Reference: 1.x/doc/tutorial/lesson1.html.
Simulation of Distributed Application and Protocols using TOSSIM Valliappan Annamalai.
Part 2 TinyOS and nesC Programming Selected slides from:
Replay Compilation: Improving Debuggability of a Just-in Time Complier Presenter: Jun Tao.
The LC-3 – Chapter 7 COMP 2620 Dr. James Money COMP
C++ Data Types Structured array struct union class Address pointer reference Simple IntegralFloating char short int long enum float double long double.
Introduction to Computers Rabie A. Ramadan, PhD. 2 About my self Rabie A. Ramadan My website and publications
Slide 1 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Task 2 Briefing The Design of a Computer.
Main Issues Three major issues that we are concerned with in sensor networks are – Clustering Routing and Security To be considered against the backdrop.
Introduction to Computers Rabie A. Ramadan, PhD. 2 Class Information Website ses/2011/summer/intro/
File Systems cs550 Operating Systems David Monismith.
TinyOS Sandeep Gupta. Operating System (OS) What is an OS? Main functions  Process management  Memory management  Resource management Traditional OSs.
1 Software Reliability in Wireless Sensor Networks (WSN) -Xiong Junjie
Freemote: A Wireless Sensor Networks Emulation System Raphael Kummer Timothée Maret Peter Kropf
HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 Lab1: LED Control ZigbeX mote has Red, Yellow, Green LED. This lab using LED control component provided by TinyOS.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 4.
Hello world !!! ASCII representation of hello.c.
Operating Systems A Biswas, Dept. of Information Technology.
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 Introduction to Programming Pritee Parwekar.
Do-more Technical Training
Chapter 2: The Linux System Part 4
Simulation of Distributed Application and Protocols using TOSSIM
Ad Hoc Networking using Flooding protocol
Security mechanisms and vulnerabilities in .NET
Memory Allocation CS 217.
An Introduction to nesC
Memory Management Overview
Introduction to Data Structure
PRIME/GreenLight project Miguel Erazo
Module 13 Dynamic Memory.
Presentation transcript:

A Quick Note on TinyOS Chris Merlin Group Meeting January 21 st, 2009

Outline TinyOS: What Is It? TOSSIM, The TinyOS Simulator Dynamic Memory Allocation in TinyOS Concluding Remarks TinyOS: What is it?TOSSIM, the TinyOS SimulatorDynamic Memory Allocation in TinyOS

TinyOS: A Quick Reminder A Simple and stripped down operating system for motes nesC language  C Based  For component-based programming Maybe a quarter million programmers in the world TinyOS: What is it?TOSSIM, the TinyOS SimulatorDynamic Memory Allocation in TinyOS

(…2) TinyOS: A Quick Reminder Components: black boxes whose input and output functions are known (interfaces) Configurations:  assemble other components together  link interfaces used by components to providers Modules:  Provide application code  Use and provide interfaces TinyOS: What is it?TOSSIM, the TinyOS SimulatorDynamic Memory Allocation in TinyOS

(…3) TinyOS: A Quick Reminder Consider a module called Application that needs to turn LEDs on and off The Leds interface provides functions to turn on/off, initialize, toggle LEDs Application would like to use that interface LedsC is a component that provides Leds interface Application.Leds -> LedsC.Leds; TinyOS: What is it?TOSSIM, the TinyOS SimulatorDynamic Memory Allocation in TinyOS

Outline TinyOS: What Is It? TOSSIM, The TinyOS Simulator Dynamic Memory Allocation in TinyOS Concluding Remarks TinyOS: What is it?TOSSIM, the TinyOS SimulatorDynamic Memory Allocation in TinyOS

TOSSIM: Generalities Simulator:  Built with make pc  Runs with DBG=[name], build/pc/main.exe [options] What it does:  Displays traces  Emulates mote+radio behavior What it doesn’t do:  Model radio propagation  Model power drain / energy consumption TinyOS: What is it?TOSSIM, the TinyOS SimulatorDynamic Memory Allocation in TinyOS

Compiling and Running a Simulation Execute: build/pc/main.exe [options] num_nodes -b= : time over which motes boot -l= : runs sim. at times real time -r= : radio model: simple, static, lossy -rf= : input file for lossy model -t= : runs sim. for virtual seconds num_nodes : number of nodes TinyOS: What is it?TOSSIM, the TinyOS SimulatorDynamic Memory Allocation in TinyOS

The Lossy Radio Model Input file can specify links’ bit error rates Lossy radio model can help create multi- hop networks of nodes : :ber TinyOS: What is it?TOSSIM, the TinyOS SimulatorDynamic Memory Allocation in TinyOS

Outline TinyOS: What Is It? TOSSIM, The TinyOS Simulator Dynamic Memory Allocation in TinyOS Concluding Remarks TinyOS: What is it?TOSSIM, the TinyOS SimulatorDynamic Memory Allocation in TinyOS

Dynamic Memory Allocation “TinyOS does not allow dynamic memory allocation” True: malloc will occasionally crash, realloc not supported on real motes False: malloc, realloc, free all work fine in TOSSIM. MemAlloc provides some DMA for real motes TinyOS: What is it?TOSSIM, the TinyOS SimulatorDynamic Memory Allocation in TinyOS

Memory Model of TinyOS Simplicity of TinyOS allows only static mem. alloc (no management of dynamic heap) malloc must find space of appropriate size: can be resource consuming, esp. when mem. very fragmented TinyOS: What is it?TOSSIM, the TinyOS SimulatorDynamic Memory Allocation in TinyOS

MemAlloc MemAlloc is provided by TinyAlloc Some commands are:  allocate(HandlePtr hptr, int size) : allocate memory region of size  reallocate(Handle h, int size)  free(Handle h) However, MemAlloc is split-phase Events:  allocComplete(HandlePtr hptr, result_t outcome) : indicate an allocation has completed  reallocComplete(Handle h, result_t outcome) TinyOS: What is it?TOSSIM, the TinyOS SimulatorDynamic Memory Allocation in TinyOS

MemAlloc Example TinyAlloc implements managed heap: simple array of handles Memory regions are referenced indirectly by another array Double dereferencing is needed TinyOS: What is it?TOSSIM, the TinyOS SimulatorDynamic Memory Allocation in TinyOS Handle array; call MemAlloc.allocate(&array, 2*sizeof(ArrayEntry)); ArrayEntry *entry = (ArrayEntry*)(*array+sizeof(ArrayEntry))

Outline TinyOS: What Is It? TOSSIM, The TinyOS Simulator Dynamic Memory Allocation in TinyOS Concluding Remarks TinyOS: What is it?TOSSIM, the TinyOS SimulatorDynamic Memory Allocation in TinyOS

Remarks If you have suggestions, pieces of code to add, let me know Compiled in Tutorial on WCNG website / my Academic page