Performance Evaluation of Real-Time Operating Systems

Slides:



Advertisements
Similar presentations
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Advertisements

More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
Bilgisayar Mühendisliği Bölümü GYTE - Bilgisayar Mühendisliği Bölümü Multithreading the SunOS Kernel J. R. Eykholt, S. R. Kleiman, S. Barton, R. Faulkner,
Computer System Overview
Real-Time Kernels and Operating Systems Basic Issue - Purchase commercial “off-the- shelf” system or custom build one Basic Functions –Task scheduling.
Review: Chapters 1 – Chapter 1: OS is a layer between user and hardware to make life easier for user and use hardware efficiently Control program.
Threads Irfan Khan Myo Thein What Are Threads ? a light, fine, string like length of material made up of two or more fibers or strands of spun cotton,
Chapter 13 Embedded Systems
Chapter 13 Embedded Systems Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
ECE 526 – Network Processing Systems Design Software-based Protocol Processing Chapter 7: D. E. Comer.
Chapter 5 Processes and Threads Copyright © 2008.
Contiki A Lightweight and Flexible Operating System for Tiny Networked Sensors Presented by: Jeremy Schiff.
1 Multiprocessor and Real-Time Scheduling Chapter 10.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
Chapter 13 Embedded Systems
OS Spring’03 Introduction Operating Systems Spring 2003.
Chapter 11 Operating Systems
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
1 When to Switch Processes 3 triggers –System call, Interrupt and Trap System call –when a user program invokes a system call. e.g., a system call that.
Computer System Overview Chapter 1. Basic computer structure CPU Memory memory bus I/O bus diskNet interface.
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
MicroC/OS-II Embedded Systems Design and Implementation.
OS and the Computer System  Some OS programs exist permanently in the system area of the memory to monitor and control activities in the computer system.
Comparative Operating Systems Fall 2001 An Examination of Embedded Linux as a Real Time Operating System Mark Mahoney.
OS Spring’04 Introduction Operating Systems Spring 2004.
An Introduction and Practical approach to RTOS concepts.
Introduction to Embedded Systems
SOC Consortium Course Material SoC Design Laboratory Lab 8 Real-time OS - 2 Speaker: Yung-Chih Chen Advisor: Prof. Chun-Yao Wang November 17, 2003 Department.
Advanced Operating Systems CIS 720 Lecture 1. Instructor Dr. Gurdip Singh – 234 Nichols Hall –
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
RTEMS overview W. Eric Norum Introduction RTEMS is a tool designed specifically for real-time embedded systems The RTEMS product is an executive.
Threads Many software packages are multi-threaded Web browser: one thread display images, another thread retrieves data from the network Word processor:
Chapter 3 Advanced Operating System
Chapter 3 Process Description and Control
A Comparative Study of the Linux and Windows Device Driver Architectures with a focus on IEEE1394 (high speed serial bus) drivers Melekam Tsegaye
Multiprocessor and Real-Time Scheduling Chapter 10.
1 RTOS Design Some of the content of this set of slides is taken from the documentation existing on the FreeRTOS website
Chapter 101 Multiprocessor and Real- Time Scheduling Chapter 10.
CE Operating Systems Lecture 11 Windows – Object manager and process management.
E X C E E D I N G E X P E C T A T I O N S OP SYS Linux System Administration Dr. Hoganson Kennesaw State University Operating Systems Functions of an operating.
Multiprogramming. Readings r Silberschatz, Galvin, Gagne, “Operating System Concepts”, 8 th edition: Chapter 3.1, 3.2.
Fall 2013 SILICON VALLEY UNIVERSITY CONFIDENTIAL 1 Introduction to Embedded Systems Dr. Jerry Shiao, Silicon Valley University.
ECGR-6185 µC/OS II Nayana Rao University of North Carolina at Charlotte.
Multi-Tasking The Multi-Tasking service is offered by VxWorks with its real- time kernel “WIND”.
1 VxWorks 5.4 Group A3: Wafa’ Jaffal Kathryn Bean.
Chapter 2 Process Management. 2 Objectives After finish this chapter, you will understand: the concept of a process. the process life cycle. process states.
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
Embedded Computer - Definition When a microcomputer is part of a larger product, it is said to be an embedded computer. The embedded computer retrieves.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
1.  System Characteristics  Features of Real-Time Systems  Implementing Real-Time Operating Systems  Real-Time CPU Scheduling  An Example: VxWorks5.x.
1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
Unit - I Real Time Operating System. Content : Operating System Concepts Real-Time Tasks Real-Time Systems Types of Real-Time Tasks Real-Time Operating.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
Introduction to Operating Systems Concepts
REAL-TIME OPERATING SYSTEMS
Processes and threads.
Advanced Operating Systems CIS 720
CS 6560: Operating Systems Design
Topics Covered What is Real Time Operating System (RTOS)
Structure of Processes
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Computer System Overview
Multiprocessor and Real-Time Scheduling
EE 472 – Embedded Systems Dr. Shwetak Patel.
Process Control B.Ramamurthy 2/22/2019 B.Ramamurthy.
Unix Process Control B.Ramamurthy 4/11/2019 B.Ramamurthy.
CS510 Operating System Foundations
RTOS Modelling Naren Bala.
Chapter 3: Process Management
Presentation transcript:

Performance Evaluation of Real-Time Operating Systems RTEMS, RTLinux, eCos

Real-Time Systems Systems that interact predictably with events in the outside world Examples: Flight control systems Collision avoidance systems Satellite guidance systems Patient Monitoring System Control Systems for synchrotrons

Real-Time Operating Systems Free the applications programmer from writing code for task scheduling and dispatching. Manage time-sharing of a processor for a number of different tasks and interrupt sources, while adhering to strict time constraints. Widely used in all kinds of applications both on PCs and in embedded systems. Generally operate unattended -- consequences of failure can be catastrophic. The function of a real-time operating system is to manage time-sharing of a processor for a number of different tasks and interrupt sources, while adhering to strict time constraints. Real-time operating systems are widely used in all kinds of applications both on PCs and in embedded systems where the processor is completely encapsulated within the hardware it is controlling. Real-time systems must interact predictably with devices in the outside world. “They generally operate unattended, and the consequences of any kind of failure range from severe to unthinkable.”

What is available? Many RTOSs have been developed: Commercial Open source RTOS vendors and developers publish performance metrics to showcase their products. However, their evaluations are: not performed on a common platform not comprehensive Many commercial RTOSs are available. Several open source, royalty-free packages are also available or under development. RTOS vendors and developers publish performance metrics to show the superiority of their products. However, these metrics are not performed on a common platform and so are like comparing apples to oranges. They are also not necessarily comprehensive.

Evaluation of an RTOS How would you choose an appropriate RTOS for your application? Need for an impartial evaluation. Several such projects have been conducted. Only evaluated some performance characteristics Only looked at a few commercial operating systems Many are now out of date ‘Real-Time Consult’ introduced a more comprehensive project. Developed a thorough test methodology Evaluated several commercial RTOSs Have not evaluated open source RTOSs An extensive project was started about three years ago, by a group called “Real-Time Consult”, to qualify and compare real-time operating systems. they have developed a methodology and started producing evaluation reports for several commercially available RTOSs. However, we have not found any suitable comparison for open source RTOSs. There are many benefits to using an open source RTOS, such as: the cost benefit (royalty-free) and, more importantly, the performance can be more thoroughly tested than if the source code is not available code can be modified or modules written for your own particular application.

Research Objective Performance evaluation, on a common platform, of three open source real-time operating systems: RTEMS RTLinux eCos I will get each RTOS running on a PC, then do performance tests on each one.

Real-Time Operating Systems Overview RTOS Task Scheduling Task Dispatching Task Synchronization The function of a real-time operating system is to manage time-sharing of a processor for a number of different tasks and interrupt sources, while adhering to strict time constraints.

Task Scheduling Time Slicing Last Arrival Order First Time Task 3

Task Scheduling Preemptive Priority High Priority Low Time Task 3 The function of a real-time operating system is to manage time-sharing of a processor for a number of different tasks and interrupt sources, while adhering to strict time constraints. Task 1 Task 1

Task Dispatching Task-control blocks is the most popular method of identifying and managing tasks. Task-Control Block (TCB) contains: a context (e.g. program counter and register contents) an identification string a status, such as ready, executing or blocked a priority (if applicable) A Typical Task Control Block Program Counter Task Status Task ID Number Pointer to next TCB Other Context Priority : Register Contents

Task Synchronization Events Messages Semaphores Mutexes

Desired Performance Characteristics Tasks should run with: minimal event latency (the time between the triggering of a task and its start) minimal jitter (the variation in running times of a task that is supposed to run at a fixed period).

Performance Evaluation Throughput – speed at which the system executes instructions Responsiveness – how fast it starts to handle in interrupt request Determinism – how it reacts under load how long does it take to finish what it is doing and start handling the interrupt request

Performance Metrics Low Level Tests Context switching Interrupt latency Exclusion objects Semaphores Mutexes Synchronization events

Context Switch Time Task A Start Task B : : Context Switch Time Switch to Task B Save context of Task A Load context of Task B Task A Start Task B PC Register 0 : Other Context PC Register 0 : Other Context Time Context Switch Time

Other Considerations Not an isolated event Affected by number of tasks pending Depends on priorities of pending tasks Amount of context to be saved

Interrupt Latency Interrupt and Interrupt Dispatch Latencies Task Task ISR First Instruction in Interrupt Service Routine (ISR) is executed Interrupt Occurs Task resumes ISR ends Task Time Interrupt Latency Interrupt Dispatch Latency

Multiple Interrupt Latencies Interrupt-to-Task Run Interrupt Interrupt Dispatch Time Interrupt Service Routine Other Interrupt Pre-emption Disabled More than one interrupt is pending: response time for second interrupt depends on the length of the first interrupt. You have to finish serving the first interrupt which means you have to execute the Interrupt Service Routine. This includes: ISR must, at a minimum, send a synchronization event to a task. Other processing code might also be included in the ISR and must also finish. This is why it is recommended that this kind of processing be done outside the ISR if at all possible. Return from interrupt and enable next interrupt Scheduling Context Switch Return from System Call Task Run

Interrupt Task Response Time Real response to an interrupt often occurs in a task synchronized by, but outside of, the actual ISR. Task response also depends on whether the kernel is preemptable. If not, then kernel call must be completed before ISR. More than one interrupt is pending: response time for second interrupt depends on the length of the first interrupt. You have to finish serving the first interrupt which means you have to execute the Interrupt Service Routine. This includes: ISR must, at a minimum, send a synchronization event to a task. Other processing code might also be included in the ISR and must also finish. This is why it is recommended that this kind of processing be done outside the ISR if at all possible. Return from interrupt and enable next interrupt

Performance Metrics High Level Tests Network throughput Stress tests

Real-Time Consult Project Evaluation and comparison of RTOS performance Commercial systems only, to date Evaluations available for: Intime 1.20 RTX 4.2 Hyperkernel 4.3 VxWorks/x86 5.3.1 pSOSystem/x86 2.2.6 QNX 6.1 CE 3.0

Real-Time Consult Project Test Method: timing is measured using an external PCI bus analyzer. Two types of tests: Performance Tests Stress Tests Qualitative Evaluation (API richness, etc.)

Real-Time Consult Project Performance Tests (context switch & latencies): Thread switch latency time required to preempt current thread Interrupt latency preempt current thread and start interrupt handler Interrupt dispatch latency switch from interrupt context to context of interrupted thread or next thread in queue Thread creation and deletion

Task Switch Latency Test Create tasks TSK1, …, TSKN Task start TSK0 Delete tasks Write trace on PCI Bus TRC_TSK0_TS0 Yield Processor Yes No End of Test? Task end Each Task Write trace on PCI Bus TRC_TSKN_TSN Yield Processor Task start TSKN

Real-Time Consult Project Performance Tests (objects, file, network): Synchronization objects time to create and delete a synchronization object Exclusion objects time to create and delete an exclusion object File system operations creating and deleting files, reading from files and writing to files in synchronous mode Network stack performance of TCP/IP stack bandwidth for various packet sizes, and CPU usage

Real-Time Consult Project Stress Tests: Two simultaneous interrupts Interrupt nesting maximum sustainable interrupt frequency maximum number of objects memory leaks

Focus of my Research Evaluation of three Open Source Real-Time Operating Systems: RTEMS Real Time Executive for Multiprocessor Systems RTLinux Real Time Linux eCos Embedded Configurable Operating System There are many benefits to using an open source RTOS, such as: the cost benefit (royalty-free) and, more importantly, the performance and reliability can be more thoroughly tested than if the source code is not available code can be modified or modules written for your own particular application.

Application Dependent Software Standard Application Components RTEMS Developed by the U.S. military as alternative to using commercial RTOS Small, easy to port High level of user configurability Kernel is preemptible Application Dependent Software Standard Application Components Device Drivers R T E M S Target Hardware

RTLinux Abstraction layer between the hardware and the standard Linux kernel Appears as actual hardware to standard Linux kernel Lowest priority is assigned to standard Linux kernel, which then runs as a independent task. RTLinux executive is nonpreemptible Leaves Linux kernel essentially untouched so it doesn’t hinder future Linux development

ECOS Targeted at high-volume applications: Configurable: Portable consumer electronics, telecommunications, automotive other deeply embedded applications. Configurable: lets developer configure a system that best matches the needs of the application. Typical configuration options: type of scheduler number of priority levels. current release of the system has over 200 options Portable Fully preemptable

Typical Application Control system for the Canadian Light Source (CLS) uses an open source real-time operating system and control software: RTOS  RTEMS Control Software  EPICS (Experimental Physics and Industrial Control System) Such distributed control systems typically comprise tens or even hundreds of computers, networked together to allow communication between them and to provide control and feedback of the various parts of the device from a central control room, or even remotely over the internet. Commonly used in distributed control systems to operate devices such as: Particle Accelerators Large Experiments Major Telescopes.