Elaine Cheong Yang Zhao December 8, 2001

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

MotoHawk Training Model-Based Design of Embedded Systems.
PTIDES: Programming Temporally Integrated Distributed Embedded Systems Yang Zhao, EECS, UC Berkeley Edward A. Lee, EECS, UC Berkeley Jie Liu, Microsoft.
System Architecture Directions for Networked Sensors Qiuhua Cao Computer Science Department University of Virginia.
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.
Timed Simulation with Multiple Resource Schedulability Analysis Yang Zhao and Slobodan Matic University of California, BerkeleyDec 10, 2004.
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
A System Architecture for Tiny Networked Devices Jason Hill U.C. Berkeley 9/22/2000.
Mixing Models of Computation Jie Liu Palo Alto Research Center (PARC) 3333 Coyote Hill Rd., Palo Alto, CA joint work with Prof. Edward.
TinyOS Software Engineering Sensor Networks for the Masses.
2008EECS Embedded Network Programming nesC, TinyOS, Networking, Microcontrollers Jonathan Hui University of California, Berkeley.
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 PTIDES: A Programming Model for Time- Synchronized Distributed Real-time Systems Yang.
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.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley The Ptolemy II Framework for Visual Languages Xiaojun Liu.
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.
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.
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:
Fall 2013 SILICON VALLEY UNIVERSITY CONFIDENTIAL 1 Introduction to Embedded Systems Dr. Jerry Shiao, Silicon Valley University.
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.
32-Bit-Digital Signal Controller Texas Instruments Incorporated
System Architecture Directions for Networked Sensors Jason Hill, Robert Szewczyk, Alec Woo, Seth Hollar, David Culler, Kris Pister Presenter: James.
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.
Embedded Computer - Definition When a microcomputer is part of a larger product, it is said to be an embedded computer. The embedded computer retrieves.
1.  System Characteristics  Features of Real-Time Systems  Implementing Real-Time Operating Systems  Real-Time CPU Scheduling  An Example: VxWorks5.x.
CONCEPTS OF REAL-TIME OPERATING SYSTEM. OBJECTIVE  To Understand Why we need OS?  To identify Types of OS  To Define Real - Time Systems  To Classify.
Real-Time Operating Systems RTOS For Embedded systems.
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.
FreeRTOS synopsis 김백규 -. FreeRTOS is … Real Time Kernel portable (ARM, AVR, x86, MSP430 etc.) open source ( mini size.
Implementing Context Aware Applications Class 5. Agenda Review of TinyOS execution model Tutorial on TinyOS Code walk through Code quiz Assignment 2.
Real-time Software Design
REAL-TIME OPERATING SYSTEMS
TrueTime.
Lazy Preemption to Enable Path-Based Analysis of Interrupt-Driven Code
Simulation of Distributed Application and Protocols using TOSSIM
Advantages of FSM Their simplicity make it easy for inexperienced developers to implement with little to no extra knowledge (low entry level)
CS501 Advanced Computer Architecture
Basic Processor Structure/design
Topics Covered What is Real Time Operating System (RTOS)
EEE 6494 Embedded Systems Design
Real-time Software Design
Shanna-Shaye Forbes Ben Lickly Man-Kit Leung
OverView of Scheduling
CSCI1600: Embedded and Real Time Software
A Scalable Simulator for TinyOS Applications
Chapter 2: The Linux System Part 3
Operating Systems.
TinyOS CSE466 Final Project Presentation
Software testing and configuration : Embedded software testing
EE 472 – Embedded Systems Dr. Shwetak Patel.
Computer Science & Engineering Electrical Engineering
Model Transformation with the Ptera Controller
CSE 451: Operating Systems Autumn 2001 Lecture 2 Architectural Support for Operating Systems Brian Bershad 310 Sieg Hall 1.
An Introduction to Embedded Software Architecture and Design
ECE 352 Digital System Fundamentals
Chapter 10 Multiprocessor and Real-Time Scheduling
Instructor: Alexander Stoytchev
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:

Elaine Cheong Yang Zhao December 8, 2001 Modeling Event-Based Systems in Ptolemy II EE249: Design of Embedded Systems: Models, Validation, and Synthesis Elaine Cheong Yang Zhao December 8, 2001

Outline Project Goals TinyOS Architecture Demo 1 Demo 2 Conclusions

Our Goals Problem: Our Project: TinyOS applications can be difficult to program and debug. Our Project: Understand TinyOS architecture. Model TinyOS in Ptolemy II. Investigate different models of computation. If you want to change a connection between 2 components, must modify 3 files. Concurrency means it is hard to figure out what portion of the code is currently executing. Simulation and debugging support very primitive.

TinyOS Architecture Component Frame Command handlers Event handlers Messaging Component init Power (mode) TX_packet (buf) TX_packet_done (success) RX_packet_done (buffer) Internal State power(mode) (addr, type, data) send_msg msg_rec (type, data) msg_send_done (success) send_msg_thread Commands Events Component Frame Command handlers Event handlers Tasks

Sample TinyOS Application Component B Internal State event2 Component A Internal State Task 1 Here is a sample application again. The HW clock will trigger event1, the event1 handler of Component A then post task1 to run later and signal event2 to Component B. Then the event 2 handler of Component B will issue a LEDs_ON command down to Component C, which will control a LED to blink. So the function of this app. is pretty simple: once there is a clock interrupt, the LED will have a blink after a short time delay due to the propagation through the components graph. event1 Component C Clock Internal State Internal State LEDs HW clock

Sample TinyOS Code // Component A char TOS_EVENT (Event_1) () { TOS_POST_TASK (Task_1); TOS_SIGNAL_EVENT (Event_2); return 1; }   TOS_TASK () { delay (2s); // Component B char TOS_EVENT (Event_2) () { TOS_CALL_COMMAND (LEDS_on)(); // Component C char TOS_COMMAND (LEDS_on)() { VAR(LEDS_on) = 1;

Demo 1: DE/FSM Discrete Event (DE) domain New actor: PreemptableTask Inputs: Input, Interrupt Output: Output Finite State Machine (FSM) domain Models component logic

Demo 2: TM/FSM Timed Multitasking (TM) domain Formerly known as RTOS Priority-driven multitasking Prioritized event queue Preemption Finite State Machine (FSM) domain Models component logic The timed multitasking (TM) domain, offers a model of computation based on priority-driven multitasking, as common in real-time operating systems. The domain assumes there is a single resource, the CPU, shared by the execution of all actors. At one particular time, only one of the actors can get the resource and execute. The domain provides an event dispatcher, which maintains a prioritized event queue. In TM, one can specify <i>executionTime</i> and <i>priority</i> of an actor. Execution of one actor may be preempted by another eligible actor with a higher priority. If an actor is preempted, it will take some extra time, which equals to the interruption time, to complete. // Showing the model in TM Each component in TinyOS can be modeled by an actor or composite actor. The clock has a period of 2 unit time. It triggers the event1 handler in component A, which post a task in it and signal event2 to component B. Component B then call the LEDs_ON command of component C to control the led to blink. (look inside of Component A), The actor Event_1 models the event1 handler of Cpt A, it is a FSM actor. In fact, generally speaking, each Command or event handler can be modeled by a FSM actor. here we assume command or event handle takes 0.1 unit time to post a task or signal a event or call a command. By setting a higher priority to event handler actors and command actors, setting a lower priority to task actors, we can easily model the feature of the two level scheduling, and the preemption of tasks. It is also able to have a more sophisticated priority-based scheduler for tasks rather than a simple FIFO scheduler currently used in TinyOS.

Conclusions DE/FSM TM/FSM Future Work