performance evaluation of real-time operating systems
DESCRIPTION
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 - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/1.jpg)
Performance Evaluationof Real-Time Operating Systems
RTEMS, RTLinux, eCos
![Page 2: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/2.jpg)
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
![Page 3: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/3.jpg)
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.
![Page 4: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/4.jpg)
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
![Page 5: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/5.jpg)
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
![Page 6: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/6.jpg)
Research Objective
Performance evaluation, on a common platform, of three open source real-time operating systems: RTEMS RTLinux eCos
![Page 7: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/7.jpg)
Real-Time Operating Systems
RTOSRTOS
TaskScheduling
TaskDispatching
TaskSynchronization
Overview
![Page 8: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/8.jpg)
Task Scheduling
Time Slicing
Task 1
ArrivalOrder
First
Last
Task 2
Task 3
Task 1
Task 2
Task 3
Time
![Page 9: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/9.jpg)
Task Scheduling
Preemptive Priority
Priority
Low
High
Task 1
Task 2
Task 3
Task 1
Task 2
Time
![Page 10: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/10.jpg)
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
![Page 11: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/11.jpg)
Task Synchronization
Events
Messages
Semaphores
Mutexes
![Page 12: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/12.jpg)
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).
![Page 13: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/13.jpg)
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
![Page 14: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/14.jpg)
Performance Metrics
Low Level Tests Context switching Interrupt latency Exclusion objects
Semaphores Mutexes
Synchronization events
![Page 15: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/15.jpg)
Context Switch Time
Task ATask A
Save contextof Task A
Save contextof Task A Start
Task BStart
Task B
Time
Switch to Task B
Context Switch Time
PC
Register 0
::
Other Context
Load contextof Task B
Load contextof Task B
PC
Register 0
::
Other Context
![Page 16: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/16.jpg)
Other Considerations
Not an isolated event
Affected by number of tasks pending
Depends on priorities of pending tasks
Amount of context to be saved
![Page 17: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/17.jpg)
Interrupt Latency
Interrupt and Interrupt Dispatch
Latencies
Time
TaskTask
Interrupt Occurs
ISRISR
First Instruction inInterrupt Service Routine
(ISR) is executed
TaskTask
Taskresumes
ISR ends
InterruptLatency
Interrupt Dispatch Latency
![Page 18: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/18.jpg)
Multiple Interrupt Latencies
Interrupt-to-Task Run
Interrupt Dispatch Time
Interrupt Service Routine
Other Interrupt
Pre-emption Disabled
Scheduling
Context Switch
Return from System Call
InterruptInterrupt
Task RunTask Run
![Page 19: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/19.jpg)
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.
![Page 20: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/20.jpg)
Performance Metrics
High Level Tests
Network throughput
Stress tests
![Page 21: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/21.jpg)
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
![Page 22: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/22.jpg)
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.)
![Page 23: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/23.jpg)
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
![Page 24: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/24.jpg)
Task Switch Latency Test
Create tasksTSK1, …, TSKN
Task startTSK0
Delete tasksTSK1, …, TSKN
Write trace on PCIBus
TRC_TSK0_TS0
YieldProcessor
Yes
No
End of Test?
Task endTSK0
Each Task
Write trace on PCIBus
TRC_TSKN_TSN
YieldProcessor
Task startTSKN
![Page 25: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/25.jpg)
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
![Page 26: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/26.jpg)
Real-Time Consult Project
Stress Tests: Two simultaneous interrupts Interrupt nesting maximum sustainable interrupt frequency maximum number of objects memory leaks
![Page 27: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/27.jpg)
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
![Page 28: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/28.jpg)
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
Target HardwareTarget Hardware
Application Dependent SoftwareApplication Dependent Software
Standard Application ComponentsStandard Application Components
Device DriversDevice Drivers R T E M SR T E M S
![Page 29: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/29.jpg)
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 nonpreemptibleLeaves Linux kernel essentially untouched so it doesn’t hinder future Linux development
![Page 30: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/30.jpg)
ECOS
Targeted at high-volume applications: 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
PortableFully preemptable
![Page 31: Performance Evaluation of Real-Time Operating Systems](https://reader036.vdocuments.us/reader036/viewer/2022062805/56814e04550346895dbb70f8/html5/thumbnails/31.jpg)
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)