SE300 SWE Practices. Lecture 10 Introduction to Event- Driven Architectures. Tuesday, March 17, Sam Siewert

Similar documents
SE310 Analysis and Design of Software Systems

CEC 450 Real-Time Systems

CEC 450 Real-Time Systems

CEC 450 Real-Time Systems

CS A331 Programming Language Concepts

CS A320 Operating Systems for Engineers

CEC 450 Real-Time Systems

CEC 450 Real-Time Systems

CEC 450 Real-Time Systems

CPU Scheduling. Operating Systems (Fall/Winter 2018) Yajin Zhou ( Zhejiang University

CEC 450 Real-Time Systems

CPU Scheduling. Daniel Mosse. (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013)

I/O Handling. ECE 650 Systems Programming & Engineering Duke University, Spring Based on Operating Systems Concepts, Silberschatz Chapter 13

Lecture Topics. Announcements. Today: Advanced Scheduling (Stallings, chapter ) Next: Deadlock (Stallings, chapter

Uniprocessor Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms. Three level scheduling

CS370 Operating Systems

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

Operating Systems. Lecture Process Scheduling. Golestan University. Hossein Momeni

Commercial Real-time Operating Systems An Introduction. Swaminathan Sivasubramanian Dependable Computing & Networking Laboratory

What s An OS? Cyclic Executive. Interrupts. Advantages Simple implementation Low overhead Very predictable

ALL the assignments (A1, A2, A3) and Projects (P0, P1, P2) we have done so far.

CSCI-GA Operating Systems Lecture 3: Processes and Threads -Part 2 Scheduling Hubertus Franke

Announcements. Reading. Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) CMSC 412 S14 (lect 5)

CS 326: Operating Systems. CPU Scheduling. Lecture 6

Lecture Topics. Announcements. Today: Uniprocessor Scheduling (Stallings, chapter ) Next: Advanced Scheduling (Stallings, chapter

MARUTHI SCHOOL OF BANKING (MSB)

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE) UNIT I OPERATING SYSTEMS

LECTURE 3:CPU SCHEDULING

Operating Systems. Operating Systems

What is a Real Time Operating System?

CISC 7310X. C05: CPU Scheduling. Hui Chen Department of Computer & Information Science CUNY Brooklyn College. 3/1/2018 CUNY Brooklyn College

CEC 450 Real-Time Systems

Introduction to Computing Systems Terminology Guide

CS370 Operating Systems

Chapter 5: CPU Scheduling

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT I

Embedded Systems. 5. Operating Systems. Lothar Thiele. Computer Engineering and Networks Laboratory

Advanced Operating Systems (CS 202) Scheduling (1)

Main Points of the Computer Organization and System Software Module

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

Scheduling in the Supermarket

Chapter 19: Real-Time Systems. Operating System Concepts 8 th Edition,

(MCQZ-CS604 Operating Systems)

QUESTION BANK UNIT I

Mid Term from Feb-2005 to Nov 2012 CS604- Operating System

Real-Time Operating Systems Design and Implementation. LS 12, TU Dortmund

SE310 Analysis and Design of Software

CPU Scheduling: Objectives

ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective. Part I: Operating system overview: Processes and threads

Chapter 5: CPU Scheduling

EECS 750: Advanced Operating Systems. 01/29 /2014 Heechul Yun

Process Scheduling Part 2

CSc33200: Operating Systems, CS-CCNY, Fall 2003 Jinzhong Niu December 10, Review

CSI3131 Final Exam Review

PROCESS SCHEDULING II. CS124 Operating Systems Fall , Lecture 13

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University

A Predictable RTOS. Mantis Cheng Department of Computer Science University of Victoria

TDDD07 Real-time Systems Lecture 10: Wrapping up & Real-time operating systems

Embedded Systems. 6. Real-Time Operating Systems

CPU Scheduling. CSE 2431: Introduction to Operating Systems Reading: Chapter 6, [OSC] (except Sections )

VALLIAMMAI ENGINEERING COLLEGE

Titolo presentazione. Scheduling. sottotitolo A.Y Milano, XX mese 20XX ACSO Tutoring MSc Eng. Michele Zanella

Multimedia Systems 2011/2012

Preview. Process Scheduler. Process Scheduling Algorithms for Batch System. Process Scheduling Algorithms for Interactive System

Operating Systems. Scheduling

Operating Systems. Introduction & Overview. Outline for today s lecture. Administrivia. ITS 225: Operating Systems. Lecture 1

Multiprocessor and Real-Time Scheduling. Chapter 10

Lesson 5: Software for embedding in System- Part 2

Subject Name: OPERATING SYSTEMS. Subject Code: 10EC65. Prepared By: Kala H S and Remya R. Department: ECE. Date:

EC EMBEDDED AND REAL TIME SYSTEMS

Systemy RT i embedded Wykład 11 Systemy RTOS

SMD149 - Operating Systems

[08] IO SUBSYSTEM 1. 1

IN4343 Real-Time Systems

Scheduling. Scheduling 1/51

Embedded Systems Dr. Santanu Chaudhury Department of Electrical Engineering Indian Institution of Technology, IIT Delhi

COT 4600 Operating Systems Fall Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM

ECE 477 Digital Systems Senior Design Project. Module 10 Embedded Software Development

CS370 Operating Systems

2. Introduction to Software for Embedded Systems

Introduction. CS3026 Operating Systems Lecture 01

Lecture 5 / Chapter 6 (CPU Scheduling) Basic Concepts. Scheduling Criteria Scheduling Algorithms

Subject Name:Operating system. Subject Code:10EC35. Prepared By:Remya Ramesan and Kala H.S. Department:ECE. Date:

Scheduling. CSC400 - Operating Systems. 7: Scheduling. J. Sumey. one of the main tasks of an OS. the scheduler / dispatcher

CS 856 Latency in Communication Systems

Dongjun Shin Samsung Electronics

Lecture notes Lectures 1 through 5 (up through lecture 5 slide 63) Book Chapters 1-4

Operating Systems Design Fall 2010 Exam 1 Review. Paul Krzyzanowski

Final Exam Study Guide

Multiprocessor and Real- Time Scheduling. Chapter 10

Learning Outcomes. Scheduling. Is scheduling important? What is Scheduling? Application Behaviour. Is scheduling important?

Operating Systems CMPSCI 377 Spring Mark Corner University of Massachusetts Amherst

Timers 1 / 46. Jiffies. Potent and Evil Magic

Operating Systems Course 2 nd semester 2016/2017 Chapter 1: Introduction

Chapter 6: CPU Scheduling

Last Class: Processes

Common Computer-System and OS Structures

Introduction. TDDI04, K. Arvidsson, IDA, Linköpings universitet Contents. What is an Operating System (OS)?

Module 20: Multi-core Computing Multi-processor Scheduling Lecture 39: Multi-processor Scheduling. The Lecture Contains: User Control.

Transcription:

SE300 SWE Practices Lecture 10 Introduction to Event- Driven Architectures Tuesday, March 17, 2015 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 Software Services What Are They? Periodic Requests for Service Peer-to-Peer Requests vs. Client and Server? Describe Services and What Might Differentiate a Server from an Event-Driven Service Concurrency? Sam Siewert 3

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 4

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 5

Why are RT Embedded Systems a Challenge? Real-Time Services Correct Results on time Deadlines! Multi-service Concurrency Required, for Software, Multi-threaded 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) - Latency Networks (Latency and QoS) - Lag Memory Hierarchy Resources Register file, L1/L2 cache, SRAM, dynamic RAM, Flash Sam Siewert 6

How to Make RT Embedded Systems Easier! RT Service and CPU Resource Management RT Theory, Practice, and Pitfalls (Theory -> System) RMA Theory (Real-Time Systems Class) 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) 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 7

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 8

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 9

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 10

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 11

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 12

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 13

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 14

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

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 16

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 17

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 18

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 19

Next from Text SEPA (Pressman) Chapter 14, 15 & 16 Goals for Software System Re-use and Maintenance Legacy Systems Refactoring Sam Siewert 20