SE310 Analysis and Design of Software Systems



Similar documents
Operating Systems. III. Scheduling.

CPU Scheduling Outline

Chapter 5 Process Scheduling

Module 8. Industrial Embedded and Communication Systems. Version 2 EE IIT, Kharagpur 1


Going Linux on Massive Multicore

Scheduling. Scheduling. Scheduling levels. Decision to switch the running process can take place under the following circumstances:

Embedded Systems. 6. Real-Time Operating Systems

ICS Principles of Operating Systems

Predictable response times in event-driven real-time systems

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

Deciding which process to run. (Deciding which thread to run) Deciding how long the chosen process can run

FRANCIS XAVIER ENGINEERING COLLEGE

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

ò Paper reading assigned for next Thursday ò Lab 2 due next Friday ò What is cooperative multitasking? ò What is preemptive multitasking?

Real-Time Systems Prof. Dr. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Performance Comparison of RTOS

Hard Real-Time Linux

SYSTEM ecos Embedded Configurable Operating System

Process Scheduling CS 241. February 24, Copyright University of Illinois CS 241 Staff

Real Time Operating Systems. Tajana Simunic Rosing Department of Computer Science and Engineering University of California, San Diego.

LynxOS RTOS (Real-Time Operating System)

Objectives. Chapter 5: Process Scheduling. Chapter 5: Process Scheduling. 5.1 Basic Concepts. To introduce CPU scheduling

CPU SCHEDULING (CONT D) NESTED SCHEDULING FUNCTIONS

W4118 Operating Systems. Instructor: Junfeng Yang

Computer and Set of Robots

Operating System Tutorial

Making Multicore Work and Measuring its Benefits. Markus Levy, president EEMBC and Multicore Association

Real- Time Scheduling

Road Map. Scheduling. Types of Scheduling. Scheduling. CPU Scheduling. Job Scheduling. Dickinson College Computer Science 354 Spring 2010.

Chapter 13 Embedded Operating Systems

Building Blocks for PRU Development

Android Virtualization from Sierraware. Simply Secure

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

CHAPTER 15: Operating Systems: An Overview

Linux A multi-purpose executive support for civil avionics applications?

Operating System Software

An Embedded Based Web Server Using ARM 9 with SMS Alert System

COS 318: Operating Systems. I/O Device and Drivers. Input and Output. Definitions and General Method. Revisit Hardware

Complete Integrated Development Platform Copyright Atmel Corporation

sel4: from Security to Safety Gernot Heiser, Anna Lyons NICTA and UNSW Australia

Objectives. Chapter 5: CPU Scheduling. CPU Scheduler. Non-preemptive and preemptive. Dispatcher. Alternating Sequence of CPU And I/O Bursts

KeyStone Training. Multicore Navigator Overview. Overview Agenda

CPU Scheduling. Basic Concepts. Basic Concepts (2) Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 412, University of Maryland. Guest lecturer: David Hovemeyer.

/ Operating Systems I. Process Scheduling. Warren R. Carithers Rob Duncan

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

Lecture 3 Theoretical Foundations of RTOS

Chapter 1 Computer System Overview

Exercises : Real-time Scheduling analysis

How To Understand And Understand An Operating System In C Programming

Chapter 19: Real-Time Systems. Overview of Real-Time Systems. Objectives. System Characteristics. Features of Real-Time Systems

CPU Scheduling. CPU Scheduling

What is best for embedded development? Do most embedded projects still need an RTOS?

Gigabit Ethernet Design

1. Computer System Structure and Components

POSIX. RTOSes Part I. POSIX Versions. POSIX Versions (2)

Thomas Fahrig Senior Developer Hypervisor Team. Hypervisor Architecture Terminology Goals Basics Details

Real-Time Component Software. slide credits: H. Kopetz, P. Puschner

Main Points. Scheduling policy: what to do next, when there are multiple threads ready to run. Definitions. Uniprocessor policies

USB 3.0 Connectivity using the Cypress EZ-USB FX3 Controller

Software based Finite State Machine (FSM) with general purpose processors

CPU Scheduling. Core Definitions

Chapter 3 Operating-System Structures

Designing a Home Alarm using the UML. And implementing it using C++ and VxWorks

BUILDING A CONTINUING EDUCATION PROGRAM FOR EMBEDDED SYSTEMS WITH LABS AND DISTANCE SUPPORT

I/O Device and Drivers

Linux for Embedded and Real-Time Systems

ELEC 5260/6260/6266 Embedded Computing Systems

Multiprogramming. IT 3123 Hardware and Software Concepts. Program Dispatching. Multiprogramming. Program Dispatching. Program Dispatching

Real-Time Operating Systems.

A Survey of Fitting Device-Driver Implementations into Real-Time Theoretical Schedulability Analysis

The Real-Time Operating System ucos-ii

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

Networking Remote-Controlled Moving Image Monitoring System

Notes and terms of conditions. Vendor shall note the following terms and conditions/ information before they submit their quote.

Scheduling. Yücel Saygın. These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum

Applying Use Cases to Microcontroller Code Development. Chris Gilbert Cypress Semiconductor

Multi-core architectures. Jernej Barbic , Spring 2007 May 3, 2007

Real Time Operating System for Embedded DSP Applications

Chapter 11 I/O Management and Disk Scheduling

Chapter 5: System Software: Operating Systems and Utility Programs

Chapter 2 System Structures

Internet of things (IOT) applications covering industrial domain. Dev Bhattacharya

Putting it on the NIC: A Case Study on application offloading to a Network Interface Card (NIC)

PikeOS: Multi-Core RTOS for IMA. Dr. Sergey Tverdyshev SYSGO AG , Moscow

Study Plan Masters of Science in Computer Engineering and Networks (Thesis Track)

Operating Systems Concepts: Chapter 7: Scheduling Strategies

OS OBJECTIVE QUESTIONS

evm Virtualization Platform for Windows

Real-Time Operating Systems for MPSoCs

REAL TIME OPERATING SYSTEMS. Lesson-10:

OPTIMIZE DMA CONFIGURATION IN ENCRYPTION USE CASE. Guillène Ribière, CEO, System Architect

1. PUBLISHABLE SUMMARY

EECS 750: Advanced Operating Systems. 01/28 /2015 Heechul Yun

Fitting Linux Device Drivers into an Analyzable Scheduling Framework

Operating Systems. 05. Threads. Paul Krzyzanowski. Rutgers University. Spring 2015

I/O. Input/Output. Types of devices. Interface. Computer hardware

WiLink 8 Solutions. Coexistence Solution Highlights. Oct 2013

Transcription:

SE310 Analysis and Design of Software Systems Lecture 10 Event-Driven Architecture Overview March 21, 2016 Sam Siewert

Copyright {c} 2014 by the McGraw-Hill Companies, Inc. All rights Reserved. Four Common Types of Systems a b c a b a/x c/z b/y x y c z (a) Interactive subsystem (b) Event-driven subsystem (c) Transformational subsystem (d) Database subsystem 6-2

Minute Paper Which of the 4 Architecture Patterns is Best Suited to OOA/OOD? 1. Interactive (e.g. GUI) 2. Event-Driven (e.g. Anti-lock Breaking System) 3. Transformational (e.g. Computer Vision) 4. Transactional (e.g. DBMS) 5. All? Discussion Sam Siewert 3

Event-Driven Architectures Introduction Sam Siewert 4

Real-Time Systems CEC450 We Have a Course at ERUA Dedicated to Embedded Real-Time Systems Good Follow-on for SWE Introduction to Event-Driven Architectures We ll Only Study to Level of Understanding Architecture Pattern Analysis and Design for SWE Most Often Consists of State-Machines and Activity Models to Extend Previous UML Models RT Systems Includes Theory Rate Monotonic (Analysis and Verification) Bruce Douglass Real-time UML (Combines Topics) Sam Siewert 5

RTOS, Embedded SW and RMA Many Great Resources for Theory & Practice CEC 450 (Microcontrollers and OS are Pre-requisites) Focus on RTOS, HW/SW Interface, and Predictable Response Highly Specialized and Mission Critical Pattern Sam Siewert 6

Event-Driven Architectures Not All Event-Driven Systems are Embedded, But Many Are Embedded Systems - Predictable Response, Hard Real-Time Integrated Services Definition of Embedded System Not Just Small, but Purposed Provides Specific Services Rather than General Purpose Computing Often No Direct Connection to User Input/Output Contained within a Larger System as a Sub-system Sam Siewert 7

Many Real-Time Embedded Systems Real Time Must Respond to Requests for Service by a Deadline relative to request Failure to Respond Prior to Deadline Results in a System Failure Request Rate for Service Driven by Real-World Events Controls Processes and Delivers Deadline Driven Services Anti-Lock Braking Streaming Media (Video and Audio) Process Control Aircraft Flight Control Robotic Systems Sam Siewert 8

Why are RT Embedded Systems a Challenge? Real-Time Services Correct Results on time Deadlines! Multi-service Concurrency Required, for Software, Multi-threaded Multiple interfaces to service in addition to data processing Multi-threaded compared to Main Loop + ISR Executive Supports RT analysis and design (Rate Monotonic) Function/Service Allocation HW Service Off-load Management of CPU, IO, and Memory Resources CPU Resource Modern architecture high throughput, less deterministic pipelines, super-scalar, branch prediction, VM, split-transaction and burst transfer bus interfaces, multi-level caches I/O Interface Resources Sensors / Actuators (Interaction with Real World) Networks (Latency and QoS) Off-load and Memory Devices (e.g. Flash, FPGAs, DSP) Memory Hierarchy Resources Register file, L1/L2 cache, SRAM, dynamic RAM, Flash Sam Siewert 9

How to Make RT Embedded Systems Easier! RT Service and CPU Resource Management RT Theory, Practice, and Pitfalls (Theory -> System) RMA and DMA Resource Theory Prediction and Measurement of Performance When to Allocate Services/Functions to HW, FW, or SW Multi-threaded RTOS Systems Design Methods (DFD, SDL, EFSM and UML methods) RTOS Mechanisms (e.g. message queue, signal, semaphore) Analysis Tools (e.g. Windview, KernelShark) HW/FW Debug Tools (e.g. ICE / JTAG) I/O Device Interfaces and Drivers Abstracted SW-HW Interfaces Interaction with Memory System (MMIO, DMAs, Plug-n-Play) Memory Hierarchy Analysis and Abstraction Multi-level Cache Performance Models Abstracted Non-Volatile Memory Filesystems Sam Siewert 10

How to Make RT Embedded Systems Easier! RT Service and CPU Resource Management RT Theory, Practice, and Pitfalls (Theory -> System) RMA and DMA Resource Theory Prediction and Measurement of Performance When to Allocate Services/Functions to HW, FW, or SW Multi-threaded RTOS Systems Design Methods (DFD, SDL, EFSM and MSC methods) RTOS Mechanisms (e.g. message queue, signal, semaphore) I/O Device Interfaces and Drivers Abstracted SW-HW Interfaces Interaction with Memory System (MMIO, DMAs, Plug-n-Play) Memory Hierarchy Analysis and Abstraction Multi-level Cache Performance Models Abstracted Non-Volatile Memory Filesystems Sam Siewert 11

Types of Event-Driver Systems Periodic Predictable Load, Polled or Max Interrupt Rate Controlled Sporadic Upper Bound on Request Rate Known/Limited Aperiodic Driver Completely by Interrupt Rate, No Masking, All Events are Queued in a Backlog Periodic Most Common Sporadic/Aperiodic Typical of Error Handling Sam Siewert 12

Example Event-Driven Application - Voice / Internet Protocol 8 bit Mono 16 bit Mono 16 bit Stereo QoS Transport Buffering Sequencing and Dropouts Point-to-Point Simplex Duplex VOIP Conference Call Audio Buffer Co-Adding Session Control Protocol Mute Feature CU Student Testing VOIP from Chip Up Sam Siewert 13

Example Projects Video Conferencing Combines VOIP and Video QoS Frame Rate Frame Compression Transport Buffering Sequencing and Dropouts CPU Intensive Transport Intensive Session Protocol Sam Siewert 14

Example Projects Mobile Platforms Camera Line Followers Image Processing Steering, Motor Control Collision Avoidance Tethered or Wireless Speed and Curvature Rovers GPS (with compass) GPS + Optical Navigation Sam Siewert 15

Example Projects Robotic Arm 5 DOF Robotic Arm Dead-Reckoning with Limits Monitoring Full-feedback Pick and Place Tasks Find Target and Grapple Object Move to New Location and Place Stack Blocks Embedded Camera in Grappler Sam Siewert 16

Example Projects Tilt/Pan Video Tracking Camera Peak-Up Camera tilts and pans to track object Target Tracker fixed camera, laser pointer tilts and pans to track Stereo Vision Tracker Tracking Speed Intensive Image Processing Scanners Etch n Sketch Scans Image Redraws with Servos Sam Siewert 17

Brief Workbench / VxWorks Demo Basic Host - Target IDE API Guide Programmer s Guide Sam Siewert 18

RTOS vs. OS RTOS Facilitates Predictable Response Priority Preemptive, Run-to-completion Tasks Low Latency, Low Overhead ISRs Direct Translation of RMA (Rate Monotonic Analysis) into Scheduling Priorities OS Facilitates Fairness and Prevents Starvation Linux CFS Completely Fair Scheduler Linux CFQ Completely Fair Queue for I/O Different Objectives Embedded Linux? Not All Event-Driven Systems are HRT (Hard Real-Time) or Even Predictable Response Sam Siewert 19

CPU Scheduling Taxonomy Many Methods Execution Scheduling Most Often Used Round Robin SMP (Linux, Windows, Mac OS-X) Others, Less Often Used Global-MP Local-Uniprocessor Dynamic Static Preemptive Non-Preemptive Symmetric (SMP OS) SMT (Micro-Paralell) Asymmetric (AMP ) Distributed Fixed-Priority Batch (Preemptive, Non-Preemptive Subtree Under Each Global-MP Leaf) Hybrid Rate Monotonic Deadline Monotonic FCFS SJN Dynamic-Priority Cooperative Dataflow Heuristic EDF/LLF RR Timeslice (desktop) Multi-Frequency Executives Co-Routine Continuation Function Sam Siewert 20

Current Trends Use of Linux for Interactive and Embedded Special Linux Kernel Builds and Patches (Compared to Server Transaction Oriented) Use of POSIX Real-Time Extensions Best Effort to Predictable Response (not HRT) RTOS Proprietary (VxWorks), Open (FreeRTOS) Support for Rate Monotonic Analysis and Theory (Proofs) Tools for Event Analysis and Timing Verification Embedded (Hidden) Hybrid Architectures Hardware State-Machines Handle HRT Software is For Configuration, Interaction, and Management Only Sam Siewert 21

Activity Diagrams Concurrency Objects with Active Threads (Tasks) Next State-Machines Deterministic Response Model for a Task (Thread) Task Awaits and Activating Event and Transitions to a New Statet Sam Siewert 22