Giotto and TMO Yerang Hur System Design Research Lab. Dept. of Computer and Information Science.

Slides:



Advertisements
Similar presentations
Time Safety Checking for Embedded Programs Thomas A. Henzinger, Christoph M. Kirsch, Rupak Majumdar and Slobodan Matic.
Advertisements

Introduction to Operating Systems CS-2301 B-term Introduction to Operating Systems CS-2301, System Programming for Non-majors (Slides include materials.
Event Driven Real-Time Programming CHESS Review University of California, Berkeley, USA May 10, 2004 Arkadeb Ghosal Joint work with Marco A. Sanvido, Christoph.
ECE 526 – Network Processing Systems Design Software-based Protocol Processing Chapter 7: D. E. Comer.
Operating Systems High Level View Chapter 1,2. Who is the User? End Users Application Programmers System Programmers Administrators.
Presenter : Shih-Tung Huang Tsung-Cheng Lin Kuan-Fu Kuo 2015/6/15 EICE team Model-Level Debugging of Embedded Real-Time Systems Wolfgang Haberl, Markus.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
Architectural Support for Operating Systems. Announcements Most office hours are finalized Assignments up every Wednesday, due next week CS 415 section.
DISTRIBUTED CONSISTENCY MANAGEMENT IN A SINGLE ADDRESS SPACE DISTRIBUTED OPERATING SYSTEM Sombrero.
1 Concurrent and Distributed Systems Introduction 8 lectures on concurrency control in centralised systems - interaction of components in main memory -
Chess Review May 11, 2005 Berkeley, CA Composable Code Generation for Distributed Giotto Tom Henzinger Christoph Kirsch Slobodan Matic.
CSE Fall Introduction - 1 What is an Embedded Systems  Its not a desktop system  Fixed or semi-fixed functionality (not user programmable)
Scheduling with Optimized Communication for Time-Triggered Embedded Systems Slide 1 Scheduling with Optimized Communication for Time-Triggered Embedded.
Expressing Giotto in xGiotto and related schedulability problems Class Project Presentation Concurrent Models of Computation for Embedded Software University.
Giotto A Time-Triggered Language for Embedded Programming Thomas A. Henzinger, Benjamin Horowitz Christoph M. Kirsch, Rupak Majumdar UC Berkeley.
Chapter 11 Operating Systems
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Operating System Organization.
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
Dreams in a Nutshell Steven Sommer Microsoft Research Institute Department of Computing Macquarie University.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 1 Real-time Systems 1.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
System Calls 1.
Real-Time Software Design Yonsei University 2 nd Semester, 2014 Sanghyun Park.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
1 COMPSCI 110 Operating Systems Who - Introductions How - Policies and Administrative Details Why - Objectives and Expectations What - Our Topic: Operating.
UNIX SVR4 COSC513 Zhaohui Chen Jiefei Huang. UNIX SVR4 UNIX system V release 4 is a major new release of the UNIX operating system, developed by AT&T.
OPERATING SYSTEM OVERVIEW. Contents Basic hardware elements.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
Upgrade to Real Time Linux Target: A MATLAB-Based Graphical Control Environment Thesis Defense by Hai Xu CLEMSON U N I V E R S I T Y Department of Electrical.
1 CS 501 Spring 2003 CS 501: Software Engineering Lecture 16 System Architecture and Design II.
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
1. Introduction 1.1 Background 1.2 Real-time applications 1.3 Misconceptions 1.4 Issues in real-time computing 1.5 Structure of a real-time system.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
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.
(More) Interfacing concepts. Introduction Overview of I/O operations Programmed I/O – Standard I/O – Memory Mapped I/O Device synchronization Readings:
Giotto A tool-supported design methodology for developing hard real-time applications Cyber Physical Systems Lab Ramtin Raji Kermani.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
Reference: Ian Sommerville, Chap 15  Systems which monitor and control their environment.  Sometimes associated with hardware devices ◦ Sensors: Collect.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Tutorial Robot: an implementation of the Embedded Machine Daniel Jhin Yoo EECS (Senior) Alvin AuYoung EECS (Junior)
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
1 VERTAF: An Object-Oriented Application Framework for Embedded Real-Time Systems Pao-Ann Hsiung*, Trong-Yen Lee, Win-Bin See, Jih-Ming Fu, and Sao-Jie.
Real-time Software Design King Saud University College of Computer and Information Sciences Department of Computer Science Dr. S. HAMMAMI.
Abstract A Structured Approach for Modular Design: A Plug and Play Middleware for Sensory Modules, Actuation Platforms, Task Descriptions and Implementations.
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.
Department of Computer Science and Software Engineering
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
What is a Process ? A program in execution.
1.  System Characteristics  Features of Real-Time Systems  Implementing Real-Time Operating Systems  Real-Time CPU Scheduling  An Example: VxWorks5.x.
Giotto Embedded Control Systems Development with Thomas A. Henzinger Ben Horowitz Christoph M. Kirsch University of California, Berkeley
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Embedded Control System Development with Giotto Thomas A. Henzinger, Benjamin Horowitz, Christoph Meyer Kirsch UC Berkeley.
Chapter 4 – Thread Concepts
Processes and threads.
Mobile Operating System
Protection of System Resources
Chapter 4 – Thread Concepts
Real-time Software Design
Shanna-Shaye Forbes Ben Lickly Man-Kit Leung
CS703 - Advanced Operating Systems
CS 501: Software Engineering Fall 1999
Lecture Topics: 11/1 General Operating System Concepts Processes
Threads Chapter 4.
Threads Chapter 5 2/17/2019 B.Ramamurthy.
Threads Chapter 5 2/23/2019 B.Ramamurthy.
A GUI Based Aid for Generation of Code-Frameworks of TMOs
Presentation transcript:

Giotto and TMO Yerang Hur System Design Research Lab. Dept. of Computer and Information Science

Outline §Giotto l overview l programming language l code generation §TMO l overview l programming scheme l TMOSM (TMO Support Middleware)

Overview: Embedded Control System Development Control Engineer Control Design Application decomposes designs simulates Software Engineer Distributed Platform Giotto Program decomposes implements tests Functionality & Timing Matlab! Giotto! Henzinger, Horowitz, and Kirsch, 2001

Automatic Compilation Giotto-PSC Program Giotto Program Giotto-P Program Giotto-PS Program Giotto Executable Platform Annotation Schedule Annotation Communication Annotation Giotto Compiler Software Engineer

Language Primitives §Port l a physical location connected to a sensor, an actuator, an input of a control law §Task l a periodic task which consists of ports and a sequential piece of code with WCET (Worst- Case Execution Time) §Connection l association an input port with an output port §Mode l a set of tasks and mode switches

Giotto Tasks P Q t A Giotto task reads the values in its input port in invocation and writes its results to its output ports at the end of its period

Giotto Tasks P Q t A Giotto task must finish within the task’s period. The compiler uses a suitable scheduling mechanism which guarantees the deadlines. Even if P finishes its computation before the time 15 its results are buffered in P.

Giotto Mode §A set of concurrent Giotto tasks and mode switch predicate §Mode switch l gets evaluated periodically. l may occur in a middle of a round. Example: exitfreq 2 if (sensor1 && not(sensor2)) then Stop1(); switch predicate is evaluated every (LCM of periods of tasks/exitfreq).

Example: robot system Lead Follow Evade My sensor pushed Someone else’s sensor pushed My evasion finished Stop My sensor pushed Someone else’s evasion finished Someone else’s sensor pushed

Port Declaration const int STOP = 0; //command int com = STOP; //mode finished bool fin = TRUE; //TRUE means pushed bool sensor1; // robot 1 touch sensor bool sensor2; // robot 2 touch sensor int motorL1 = STOP; // robot 1 left motor int motorR1 = STOP; // robot 1 right motor int motorL2 = STOP; // robot 2 left motor int motorR2 = STOP; // robot 2 right motor

Giotto Program : mode Lead1Follow mode Lead1Follow() period 400ms entryfreq 1{ taskfreq 1 do int com = command1(); taskfreq 4 do (int motorL1, int motorR1) = motorCtr1(com); taskfreq 4 do (int motorL2, int motorR2) = motorCtr2(com); exitfreq 2 if (sensor1 && not(sensor2)) then Stop1(); exitfreq 2 if (sensor2 && not(sensor1)) then Stop2(); } command1 motorCtr1 t (ms) motorCtr2

Giotto Program: mode Stop1 mode Stop1() period 400ms entryfreq 2 { taskfreq 1 do int com = command1(); taskfreq 2 do (int motorL1, int motorR1) = motorCtr1(STOP); taskfreq 2 do (int motorL2, int motorR2) = motorCtr2(STOP); exitfreq 1 if (TRUE) then Evade1Stop(); } command1 motorCtr1 t (ms) motorCtr2

Giotto Program: mode Evade1Stop mode Evade1Stop() period 400ms entryfreq 1{ taskfreq 1 do (int com, bool fin) = evade1(); taskfreq 4 do (int motorL1, motorR1) = motorCr1(com); exitfreq 1 if (fin) then Lead1Follow(); } evade1 motorCtr1 t (ms)

Period and Unit Task P Task Q t Unit of mode : period of mode/ mode switch frequency Period of mode: period of the least frequent task in a mode Example: mode S with task P, task Q, and mode switch frequency 4 period of S: 20, unit of S:5

Mode Switch Example command1 motorCtr1 t (ms) motorCtr2 Mode switch 600 from Lead1Follow to Stop1from Stop1 to Evade1Stop evade1

Code Generation §Users provide platform-related description called annotation. §Annotation l P annotation (Platform): specifies names, IP addresses, and priorities for each host. l S annotation (Schedule): specifies task-to-host mappings and the priorities of the tasks. l C annotation (Communication): specifies port- to-network mappings and the time slots of the ports.

Example: P annotation (Platform) Two hosts bot1 and bot2 are connected by a network net12. [ host bot1 address priorities p0 > p1; host bot2 address priorities q0 > q1; net n12 address connects bot1, bot2; ]

Example: S annotation (Schedule) mode Lead1Follow() period 400ms entryfreq 1{ taskfreq 1 do int com = command1(); [host bot1 priority p1] taskfreq 4 do (int motorL1, int motorR1) = motorCtr1(com); [host bot1 priority p0] taskfreq 4 do (int motorL2, int motorR2) = motorCtr2(com); [host bot2 prioty q0]... } Task command1 is mapped to host bot1 with priority p1. Task motorCtr1 is mapped to host bot1 with priority p0. Task motorCtr2 is mapped to host bot2 with priority q0.

Example: C annotation (Communication) mode Lead1Follow() period 400ms entryfreq 1{... [net n12 slots s0 (0,20), s1 (20,40), s2 (200,220), s3 (220,240), s4 (340, 360); push sensor1 from bot1 to bot2 in net n12 slots s0, s2; push sensor2 from bot2 to bot1 in net n12 slots s1, s3; push com from bot1 to bot2 in net n12 slots s4;] } SensorX ports are exchanged between the robots twice per round, because he mode switch predicate is evaluated every 200ms. Signals from sensor1 is delivered from bot1 to bot2. Signals from sensor2 is delivered from bot2 to bot1.

Putting It Together: Lead1Follow Mode with Annotation Details command1 motorCtr1 motorCtr2 com sensor2 sensor1

Summary: Giotto §Giotto is a design methodology for embedded control systems. §The programmer specifies the platform- independent programmer’s model in the time-triggered programming language. §The Giotto compiler produces executables combined with run-time library for a particular platform.

TMO (Time-triggered Message- triggered Objects) §Overview §Programming Scheme §TMOSM (TMO Support Middleware)

Overview: Real-Time Extension of Conventional Objects §Spontaneous Method (SpM): SpM executions are triggered when the clock reaches specific values determined at design time. §Service Method (SvM): SvM executions are triggered by service request messages. §Basic Concurrency Constraint (BCC): SpM executions have the higher priority over SvM executions. §Deadline: A deadline is associated with an output action and completion of a method.

Time-triggered Spontaneous Methods (SpM’s) SpM 1 SpM 2 AAC Reservation Q for t = from 10am to 10:50 am every 30 min start-during (t, t+5 min) finish-by t+10 min Example of AAC (Autonomous Activation Control) {start-during (10am, 10:05am) finish-by 10:10 am, start-during (10:30am, 10:35am) finish-by 10:40 am}

Programming Schme SvM 1 SvM 2 SpM 1 SpM 2 AAC Reservation Q Service request Q Object Data Store (ODS) Capabilities for accessing other TMOs, channels, and I/O devices Time-triggered spontaneous messages Message-triggered service methods

Example: CAMIN (Coordinated Anti-Missile Interceptor Network) Theater TMOAlien TMO

Example: CAMIN Theater Step 0: high-level specification of the initial application environment Step 1: high-level design of application environment such as incorporation of sensors, actuators, and control strategy ODS Theater Space = sky + land + sea Defense target in land = command post Defense target in sea = command ship (0-n) v’s Radar in land Interceptor launcher in land Fighter airplanes

Example (continued) SpM Update the state of the defense target in land Update the state of defense target in sea Update the state of the radar in land Update the state of the interceptor launcher in land Update the state of the fighter airplanes Accept v’s (invoked by Alien TMO) SvM

TMOSM (TMO Support Middleware) §A middleware architecture for TMO execution §Windows NT implementation §User-friendly C++ API called TMOSL §UDP-based communication §CORBA is also supported

TMOSM §Timer interrupts activate middleware thread WTST (Watchdog Timer and Scheduler Thread). §WTST: manages and scheduling and activation all other threads in TMOSM. l Allocates a time slice for every thread. l Checks for deadline violation of threads associated with each TMO’s methods. §LIIT (Local I/O Interface Thread): a periodic middleware thread processing I/O functions. §ICT (Incoming Communication Thread): a periodic middleware thread managing the distribution of messages coming through the communication network.

TMOSM Windows NT WTST ICT LIIT SvM thread SpM thread TMOSM TMO timer interrupt Communication Networks

TMOSM Scheduling Cycle LIITICTLIITICTVMST - VMST (Virtual Machine System Thread): time-slices not allocated to middleware threads are called a VMST time-slice. - A VMST time-slice is distributed to application threads associated with TMOs

SpM Activation §WTST periodically examines the registered SpM’s and put it to SpM reservationQ. §WTST moves a SpM to readyQ when the time for its execution arrives. §The application scheduler selects a thread from readyQ according to the scheduling policy during a time-slice for VMST.

SvM Execution §When receiving a service request message, ICT places an identified SvM thread to SvM waitingQ. §WTST checks for a possible conflict with SpM execution and moves it to readyQ. §The application scheduler selects a thread from readyQ according to the scheduling policy during a time-slice for VMST.

Other Works Related TMO §DREAM (Distributed Real-time Ever Available Microcomputing) kernel: l operating system kernel supporting real-time processes §TMOSL (TMO Support Library) l Collection of C++ classes l Interface between TMOSM and applications §CORBA-compliant TMO

Summary: TMO §TMO is a programming scheme based on both time-triggered and message-triggered executions. §TMO applications are distributed real-time systems.