Performance Evaluation of Real-Time Operating Systems: Rtems, Rtlinux, Ecos
Performance Evaluation of Real-Time Operating Systems: Rtems, Rtlinux, Ecos
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
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:
Evaluation of an RTOS
How would you choose an appropriate RTOS for your application?
Need for an impartial evaluation. Only evaluated some performance characteristics Only looked at a few commercial operating systems Many are now out of date
Developed a thorough test methodology Evaluated several commercial RTOSs Have not evaluated open source RTOSs
Research Objective
Performance evaluation, on a common platform, of three open source real-time operating systems:
RTEMS RTLinux eCos
Task Scheduling
Task Synchronization
Task Dispatching
Task Scheduling
Time Slicing
Last
Arrival Order
Task 3 Task 2 Task 2 Task 3
First Task 1
Task 1
Time
Task Scheduling
Preemptive Priority
High
Task 3
Priority
Task 2 Task 2
Low Task 1
Task 1
Time
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)
:
Priority Other Context
Task Synchronization
Events Messages Semaphores Mutexes
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
Task A
PC
Register 0
Register 0
Start Task B
: :
Other Context
: :
Other Context
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
Interrupt Occurs First Instruction in Interrupt Service Routine (ISR) is executed ISR ends Task resumes
Task
ISR
Task
Time
Interrupt Latency
Task Run
Performance Metrics
High Level Tests Network throughput Stress tests
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
time required to preempt current thread preempt current thread and start interrupt handler
Interrupt latency
switch from interrupt context to context of interrupted thread or next thread in queue
Each Task
Create tasks TSK1, , TSKN Task start TSKN
Yes
Yield Processor
Synchronization objects
time to create and delete a synchronization object time to create and delete an exclusion object creating and deleting files, reading from files and writing to files in synchronous mode
Exclusion objects
Network stack
performance of TCP/IP stack bandwidth for various packet sizes, and CPU usage
Focus of my Research
Evaluation of three Open Source RealTime Operating Systems:
RTEMS
Real Time Executive for Multiprocessor Systems
RTLinux
Real Time Linux
eCos
Embedded Configurable Operating System
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
RTEMS
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 doesnt hinder future Linux development
ECOS
Targeted at high-volume applications:
consumer electronics, telecommunications, automotive other deeply embedded applications. lets developer configure a system that best matches the needs of the application. Typical configuration options:
Configurable:
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