1 / 1

PtidyOS: An Operating System based on the PTIDES Programming Model

Shanna-Shaye Forbes Jia Zou Slobodan Matic Edward A. Lee. Actuator 1. Sensor 1. Model Delay 1. PtidyOS: An Operating System based on the PTIDES Programming Model. Actuator 2. Sensor 2. Model Delay 2. Sensor 1. Model Delay 1. Work In Progress. Merge. Actuator. Methodology.

Télécharger la présentation

PtidyOS: An Operating System based on the PTIDES Programming Model

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Shanna-Shaye Forbes Jia Zou Slobodan Matic Edward A. Lee Actuator 1 Sensor 1 Model Delay 1 PtidyOS: An Operating System based on the PTIDES Programming Model Actuator 2 Sensor 2 Model Delay 2 Sensor 1 Model Delay 1 Work In Progress Merge Actuator Methodology Sensor 2 Model Delay 2 Preliminary Results sdfdsfsdfdsfdsfds Introduction 100 Hz Blue, Model Delay1: 5ms WCET1: 1ms 10Hz red, Model Delay2: 50ms, WCET 2: 2ms • PTIDES - Programming Temporally Integrated Distributed Embedded Systems is based on Discrete-Event model of computation. PTIDES relates model time to physical time at specific points in the system and leverages time synchronization across distributed platforms. • PtidyOS -a lightweight operating system aimed at distributed real-time embedded systems. Our approach combines PTIDES semantics with traditional scheduling methods. The first implementation leverages EDF scheduling scheme and guarantees correct event order defined by PTIDES. This is achieved without requiring totally ordered event processing. We describe a preliminary • implementation on an ARM based microcontroller. Microkernel Scheduling Combines PTIDES semantics with traditional scheduling algorithms (for example Earliest-Deadline-First(EDF)). -- goal is to enable the user to specify which scheduling algorithm they wish to use. EDF is currently implemented. Memory Management -- No dynamic memory allocation. For events, seek time O(n) , n is the number of events in the queue Multitasking -- All event processing is implemented within interrupt service routines. -- All interrupts are reentrant, interrupts do not have priority only events do. Figure 4: Simple PTIDES Model Sensor-actuator edge-to-edge delays are exactly 5ms and 50ms. We saw a maximum jitter of 60usecs. Figure 1: A multi-platform PTIDES model -------------------------------------------------------------------------------------------------------------------------------- • PtidyOS’s PTIDES implementation • Implements the single event queue per platform version of PTIDES. • Divides the local execution strategy into a safe to process analysis and local resource scheduling layer. • PtidyOS at a glance Figure 5:Simple PTIDES Preemption Model Periods of both input signals: 5ms modelDelay1 = WCET: 0.5ms modelDelay2 = WCET: 1ms Merge WCET: 1ms Background Purple: Actuator invocations (output signals, given high priority) Red: Invocations of model delay and merge actors. • Is a library linked against application C code. • Steps away from threading model • Current implementation uses a Single Stack* • To ensure event of highest priority is always processed first, interrupts play an important role: • Event processing is done within Interrupt service routines • Reentrant interrupts In the diagram one actuation preempted the processing of a merge actor (purple pulse inside the red pulse). When given the same path delays there is no preemption because the absolute deadlines are different when the inputs occur after one another. Figure 2: A simple PTIDES model[1] • PTIDES defines a “safe to process” analysis for events within the system. • By relating timestamps of events to physical time of the system, and by leveraging time synchronization across multiple platforms, an event can be determined to be “safe to process” by comparing the timestamp of the event to current physical time. Discussion and Future Work A PTIDES model is specified in C and causality analysis of the model is performed during system initialization. • PtidyOS is still under development. Preliminary results indicate that out-of-order execution can satisfy timing requirements at the millisecond level, however there are still some unanswered questions. • Does the ability to process events out-of-order save you any time, or does the overhead associated with it equal to or greater than a standard RTOS? • Future Work: • Extending causality analysis to more complex models and using a code generation framework to generate code for PtidyOS automatically. • Driver support for PtidyOS, including support for protocol stacks to enable IEEE 1588 to use in a distributed real-time system. • Enabling hibernation for power saving model. Event Processing Algorithm Sequence Diagram Which platform is PtidyOS running on? • Cortex-M3 ARM 7 32-bit processor • Hardware assistance for IEEE 1588 [3] PTP. • Ethernet, CAN, PWM support • Reentrant Interrupts with stack manipulation References *The use of a single stack and interrupts for mutual exclusion was done in TinyOS. PtidyOS uses these concepts and introduces time semantics. [1] J. Zou, S. Matic, E. A. Lee, T. H. Feng, and P. Derler. “Execution strategies for PTIDES, a programming model for distributed embedded systems”. 15th IEEE Real-Time and Embedded Technology and Applications Symposium, April, 2009. [2] http://www.luminarymicro.com/products/LM3S8962.html [3] J. C. Eidson. Recent Advances in IEEE 1588., http://ieee802.org/3/re\_study/public/200507/eidson\_1\_050719.pdf, July 2005. Figure 3: High level block diagram of Cortex-M3 Luminary board {sssf,jiazou,matic,eal}@eecs.berkeley.edu Center for Hybrid and Embedded Software Systems http://chess.eecs.berkeley.edu/ptides/

More Related