Real-Time & Embedded Operating Systems

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

Real-Time Operating Systems (Working Draft) What is an Operating System (OS)?

Outline. Introduction. Survey of Device Driver Management in Real-Time Operating Systems

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

Comparison of Real-Time Scheduling in VxWorks and RTLinux

EMBEDDED OPERATING SYSTEMS

EECS 571 Principles of Real-Time Embedded Systems. Lecture Note #10: More on Scheduling and Introduction of Real-Time OS

Mobile Operating Systems Lesson 01 Operating System

Real-Time Systems Hermann Härtig Real-Time Operating Systems Brief Overview

Real-Time Systems 1. Basic Concepts

Real-Time Systems. Real-Time Operating Systems

Embedded Systems: OS. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

REAL TIME OPERATING SYSTEM PROGRAMMING-I: VxWorks

BRDS ( , WS 2017) Ulrich Schmid

Real-time for Windows NT

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

Lesson 5: Software for embedding in System- Part 2

Implementing Scheduling Algorithms. Real-Time and Embedded Systems (M) Lecture 9

Embedded Systems: OS

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

Embedded Systems. 6. Real-Time Operating Systems

REAL-TIME OPERATING SYSTEMS SHORT OVERVIEW

İzmir Institute of Technology Embedded Systems Lab. Real-Time Systems. Asst. Prof. Dr. Tolga Ayav Department of Computer Engineering

Evaluation of uclinux and PREEMPT_RT for Machine Control System

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

Real-time Support in Operating Systems

Comparison of scheduling in RTLinux and QNX. Andreas Lindqvist, Tommy Persson,

CSE 237A Middleware and Operating Systems. Tajana Simunic Rosing Department of Computer Science and Engineering University of California, San Diego.

RT extensions/applications of general-purpose OSs

Multimedia Systems 2011/2012

Reference Model and Scheduling Policies for Real-Time Systems

Components & Characteristics of an Embedded System Embedded Operating System Application Areas of Embedded d Systems. Embedded System Components

CSCE Introduction to Computer Systems Spring 2019

Operating System Structure

Real-Time Programming

Operating System Structure

6/17/2011. Real-time Operating Systems

即時控制系統設計 Design of Real-Time Control Systems

Handout. The ARM Instruction Set. Real Time Systems. Real Time Operating Systems. Real Time System Organization. Classification of Real Time Systems

A comparison between the scheduling algorithms used in RTLinux and in VxWorks - both from a theoretical and a contextual view

Architectural Support for Operating Systems. Jinkyu Jeong ( Computer Systems Laboratory Sungkyunkwan University

ACM SOSP 99 paper by Zuberi et al.

Real-Time Operating Systems. Ludovic Apvrille Eurecom, office

Model Based Development of Embedded Control Software

Green Hills Software, Inc.

L4-Linux Based System As A Platform For EPICS ioccore

Zilog Real-Time Kernel

ZiLOG Real-Time Kernel Version 1.2.0

Real-Time Technology in Linux

Module 11: I/O Systems

OVERVIEW. Last Week: But if frequency of high priority task increases temporarily, system may encounter overload: Today: Slide 1. Slide 3.

Real Time and Embedded Systems. by Dr. Lesley Shannon Course Website:

Embedded Operating Systems. Unit I and Unit II

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

Operating-System Structures

Introduction to Operating Systems

Introduction to Real-Time Systems and Multitasking. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

Process Monitoring in Operating System Linux

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

Improved IPC Design In Embedded System Via Context Switching

System Architecture Directions for Networked Sensors. Jason Hill et. al. A Presentation by Dhyanesh Narayanan MS, CS (Systems)

Introduction to Real-Time Operating Systems with RTEMS

LINUX AND REALTIME 1

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edit9on

CEC 450 Real-Time Systems

Concurrent activities in daily life. Real world exposed programs. Scheduling of programs. Tasks in engine system. Engine system

Four Components of a Computer System

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

Outline Background Jaluna-1 Presentation Jaluna-2 Presentation Overview Use Cases Architecture Features Copyright Jaluna SA. All rights reserved

Benchmark and comparison of real-time solutions based on embedded Linux

3. Quality of Service

A Component-Based QoS. Embedded Systems. Jean-Charles TournierFrance Télécom

Exam Review TexPoint fonts used in EMF.

Chapter 2: System Structures

2008 Chapter-8 L1: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill, Inc.

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

Operating Systems, Fall

What are some common categories of system calls? What are common ways of structuring an OS? What are the principles behind OS design and

Fundamental Concepts and History

Unit OS2: Operating System Principles. Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze

Measuring the impacts of the Preempt-RT patch

DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING EE6602- EMBEDDED SYSTEMS QUESTION BANK UNIT I - INTRODUCTION TO EMBEDDED SYSTEMS PART A

* There are more than 100 hundred commercial RTOS with memory footprints from few hundred kilobytes to large multiprocessor systems

Systemy RT i embedded Wykład 11 Systemy RTOS

19: I/O Devices: Clocks, Power Management

CSC Operating Systems Fall Lecture - II OS Structures. Tevfik Ko!ar. Louisiana State University. August 27 th, 2009.

Announcements. Computer System Organization. Roadmap. Major OS Components. Processes. Tevfik Ko!ar. CSC Operating Systems Fall 2009

PROCESS SCHEDULING Operating Systems Design Euiseong Seo

CHAPTER 3 LabVIEW REAL TIME APPLICATION DEVELOPMENT REFERENCES: [1] NI, Real Time LabVIEW. [2] R. Bishop, LabVIEW 2009.

Two Real-Time Operating Systems and Their Scheduling Algorithms: QNX vs. RTLinux

Chapter 2. Operating-System Structures

Chapter 2 Operating-System Structures

CS450/550 Operating Systems

OS Design Approaches. Roadmap. OS Design Approaches. Tevfik Koşar. Operating System Design and Implementation

Embedded Systems Dr. Santanu Chaudhury Department of Electrical Engineering Indian Institute of Technology, Delhi. Lecture 23 Embedded OS

Testing real-time Linux: What to test and how.

Task Based Programming Revisited Real Time Operating Systems

The Slide does not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams.

CHAPTER 2: SYSTEM STRUCTURES. By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

NuttX Realtime Programming

Transcription:

Real-Time & Embedded Operating Systems VO Embedded Systems Engineering (Astrit ADEMAJ) Real-Time Operating Systems Scheduling Embedded Operating Systems Power Consumption Embedded Real-Time Operating Systems 2 Real-Time Operating Systems Operating System (OS): abstracts from hardware provides access to I/O, memory management,... has application programming interface (API) with system calls Real-Time Operating Systems (2) Real-Time (RT) requirements for OS + features for timing constrains guaranteed max. execution time of system calls guaranteed OS response time to external events guaranteed max. execution time of OS functions (ISRs, drivers, context switches,...) Determinism/predictability Efficiency Fast context switch Minimize intervals during which the interrupts are disabled 3 4 RTOS taxonomy and architecture (1) Smal, fast, proprietary kernels Highly specialized to an application Real-Time extensions to commercial operating systems (RT-Linux, RT-Posix, RT-MACH, RT-WinNT) Compliant kernels Existing OS is modified such that linux binaries run without modification Dual kernels Thin RT-kernel stay below the native OS Core kernel modification Changes are made in the core of OS The resource kernel approach Kernel is extended to provide support for resource reservation RTOS taxonomy and architecture (2) Component based kernles (OS-kit, Coyote, PURE, MMLite, ) OS components can be selectively included to compose an RTOS Selection depends on the target and application Construction of OS through composition PURE - embedded applications MMLite replacing components while components are in use (dynamic reconfiguration) Components (0.5 3 KB) 5 6 1

RTOS taxonomy and architecture (3) QoS based kernels Applied to soft real-time systems Research kernels (MARS, SPRING, HARTOS, TTOS) Developed at university research projects to study new RT-process models RT-synchronization primitives (supporting priority inheritance and priority ceiling protocols) support for fault tolerance RTOS paradigms (1) Hard and soft real-time guarantees Task admission control For soft real-time systems Spring adds this concept in the hard real-time domain 7 8 RTOS paradigms (2) Resource reservation Static resource reservation to a task Reflection Use meta data about the systems to build more flexible systems To achieve better performance (supporting QoS for multimedia) Resource kernels Dynamic resource reservation Real-time Operating Systems Scheduling 9 10 Scheduling Scheduling Decision: which of tasks in RDY-state gets CPU? Fixed priorities, dynamic priorities, round-robin (time-slicing), rate monotonic, cooperative How does scheduler get CPU? system calls system timer interrupt Is Scheduler Necessary? No, you can meet deadlines without any RTOS (generate offline schedule, implement it): inefficient (regularly poll infrequent events, reserve max. time for interrupts) long schedule cycle time (least common multiple of all task periods) or unnecessary overhead (shorten task periods) hard to change and maintain (use tools!) 11 12 2

Assigning Task Priorities Tasks have periods or deadlines derived from periods: rate monotonic algorithm derived from deadlines: deadline monotonic Schedulability analysis possible tasks must obey some restrictions (no disabling of interrupts, no suspension in middle of task,...) context switch in zero-time need task execution times Task Execution Time Interrupts interrupts of the OS (w.c. time is specified) interrupts of the application Code execution time system calls (w.c. time is specified) remaining code 13 14 Real-time Operating Systems Scheduling Design Decisions How many tasks? Poll events or use interrupts? If interrupt, handle event in ISR or in a task? 15 16 Number of Tasks Few tasks: small OS overhead (not much scheduling) not much inter-task communication easy to understand complete system Many tasks: good and consequent functional partitioning modularization easy to maintain/change modules high parallelism Polling vs. Interrupts Polling: easier to understand regular, hence easier to estimate average times under the control of the scheduler Interrupt: only called when event occurs always called as soon as possible 17 18 3

Event Handling in ISR or in Task? In ISR: + fastest possible reaction long ISR not all system calls allowed in ISR (printf, blocking operations) In Task: + considers execution time needs of other tasks handling time harder to compute Event Reaction Time (1) Reaction in ISR: interrupt latency longest time the interrupt may be masked (by application; OS is included in latency) sum of ISR execution times for all interrupts with higher priority 19 20 Event Reaction Time (2) Reaction in Task: scheduling strategy total execution times of tasks which may preempt total execution time of all OS-specific things (drivers,...) sum of reaction times for all unmasked interrupts Real-time Operating Systems Embedded Operating Systems Power Consumption Embedded Real-time Operating Systems 21 22 Embedded Operating Systems Strip OS features not used in embedded systems (GUI, CD-ROM support, harddisk support,...) Often specifically developed for a given hardware/system -> modular for easy customizations Network support is important Resource constraints (memory, power, processor speed) EOS Design Objectives Small memory usage (no virtual memory, no memory management) Low power consumption Simplicity (low overhead) 23 24 4

EOS Examples Linux: RTLinux, Embedded Linux and derivatives LynxOS QNX VxWorks Windows CE EOS Memory Comparison Embedded Linux: 125-256 KB QNX: 12 KB Windows CE: 350 KB 25 26 EOS Features Monolithic kernel define a high-level virtual interface over the hardware with a set of system calls Execute in the kernel mode Micro-kernel - modular kernel Core function in the user mode Less essential run in the user mode ----------------------------------------------------------------------- Possibly no virtual memory/address translation (small CPUs do not have MMUs) linear addressing space Support for power management Power Consumption (1) Very important! Sleep, idle modes regulating the power consumption in static modes such as sleep and suspend. Power reduction many architectures provide the equivalent of a halt instruction that reduces CPU power during idle periods. The operating system and device drivers may also manage power of peripheral devices, for example spinning down disks during periods of inactivity. 27 28 Power Consumption (2) Power reduction cont. The memory subsystem also provides a profitable area for dynamic power management, either through the memory controller implementation or through software-based schemes. Processor speed reduction CPU power consumption typically scale linearly with frequencies, Processors such as the Transmeta Crusoe, Intel StrongARM and XScale processors, and the recently announced IBM PowerPC 405LP Programming Considerations Keep program short Keep memory usage down Be careful not to overwrite system memory (buffer overflow) Consider power consumption use CPU as seldom as possible (no busy wait, no idle loop!) on a distributed system, try to minimize consumption (but take care not to completely drain one node...) 29 30 5

Combination EOS & RTOS RTOS properties must be fulfilled (time guarantees) OS is small enough to fit on a small CPU Programming Considerations Those of RTOS and EOS Try to achieve best power consumption under given restrictions (reduce processor speed and/or voltage if laxity allows it) 31 32 VxWorks Most widely adopted embedded (realtime) OS Hard real-time Wide range of supported CPUs/platforms and network protocols VxWorks is deployed in: NASA/JPL: Pathfinder, Mars Exploration Rover, Stardust Telecommunications (Apple, Motorola, Siemens, Sony,...) Home entertainment: TV sets, satellite receivers,... Printers (Xerox) LynxOS Provides hard real-time POSIX-conformant Unix-compatible APIs Linux ABI (Application Binary Interface): Linux binaries can be executed in LynxWork LynxOSis used in: NASA Satellite Ranging Systems Boeing 777 Cabin Services System US Army: various military applications USPS Mail Processing Plants Telecommunications: modems, switches HP and Xerox printers 33 34 Embedded Linux Mainstream Linux is usually not suitable for embedded systems => special patches or dedicated derived implementations are used, e.g.: uclinux ( you-see-linux ): Open Source Linux derivative for CPUs without MMU (microcontrollers) Bluecat, Embedix, Montavista, TimeSys, RTLinux Embedded Linux (2) Low cost, high reliability Extensive know-how and support in Free Software community Numerous derivatives from various vendors -> commercial support & consulting available Open Source if necessary, debug tracing can extend into the OS system can be tailored to project requirements 35 36 6

Selecting an OS Supported processors? Memory requirements (OS + appl <= Target memory; don't forget RAM requirements) Features (scheduling strategies, IPC mechanisms,...) Execution time (if real-time requirements) Support! (hotline, documentation, sources?,...) Check newsgroups & magazines for reports Summary RTOS For time-critical applications timeliness is important Guaranteed system response times Application programmer must be aware of system characteristics (scheduling strategy, behaviour of environment, other applications) Careful development of application necessary to guarantee timeliness 37 38 Summary EOS For resource-constrained applications minimal resource usage is important Small memory requirements Low power consumption Programmer must choose application implementations accordingly The End 39 7