Benchmark and comparison of real-time solutions based on embedded - - PowerPoint PPT Presentation

benchmark and comparison of real time solutions based on
SMART_READER_LITE
LIVE PREVIEW

Benchmark and comparison of real-time solutions based on embedded - - PowerPoint PPT Presentation

Benchmark and comparison of real-time solutions based on embedded Linux Benchmark and comparison of real-time solutions based on embedded Linux Peter Feuerer August 8, 2007 Benchmark and comparison of real-time solutions based on embedded Linux


slide-1
SLIDE 1

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

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

Peter Feuerer August 8, 2007

slide-2
SLIDE 2

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

Table of contents

General Motivation Real-time computing Preparations Environment setup Open Realtime Framework Benchmarks Interrupt latency Jitter Maximal frequency Inter-process communication Overload behavior Priority functionality Conclusion

slide-3
SLIDE 3

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

Motivation

To enhance Linux by real-time ability there are

◮ different real-time approaches and ◮ different hardware platforms.

When specifying the system for a particular application one real-time approach and one hardware must be chosen. → A benchmark is needed.

slide-4
SLIDE 4

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

What is real-time?

A real-time capable system

◮ is reliable ◮ has deterministic behaviour and ◮ is able to adhere to specified deadlines.

There are two main real-time categories:

◮ Soft real-time - would be great to adhere to deadlines. ◮ Hard real-time - not allowed to miss any deadline.

slide-5
SLIDE 5

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

Linux real-time approaches

Rtai:

◮ One of the first approaches. ◮ Dual kernel. ◮ Real-time applications in kernel-space.

Xenomai:

◮ Dual kernel. ◮ Skin support, e.g. Posix API, VxWorks API. ◮ Real-time applications in user- and kernel-space.

Rt-Preempt:

◮ Patch to make vanilla Linux kernel real-time capable. ◮ Real-time applications run in user-space.

slide-6
SLIDE 6

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

Overview

To get meaningful results from a practical point of view, this setup is used:

slide-7
SLIDE 7

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

Target setup

Intel x86:

◮ Hardware: AMD k7 600Mhz desktop PC, Kontron

Geode gx1 embedded system.

◮ Software: modified ArchLinux distribution, Linux

kernel 2.6 and 2.4 with Rtai, Xenomai and a rt-preempt patched 2.6 kernel PowerPC:

◮ Hardware: MEG32 from Frenco ◮ Software: ELDK toolchain and Linux kernel 2.6 and

2.4 with Xenomai and kernel 2.4 with Rtai ARM:

◮ Hardware: LILLY-9xx board from Incostartec. ◮ Software: skipped, due to missing patches of the

real-time extensions.

slide-8
SLIDE 8

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

Measurement

USB-Scope Mephisto UM202:

◮ C-API and library to write custom measurement applications ◮ Windows application with GUI to monitor and control

slide-9
SLIDE 9

Benchmark and comparison of real-time solutions based on embedded Linux Preparations Open Realtime Framework

What is ORF?

The Open Realtime Framework is an open source project initiated and developed by Yellowstone-Soft.

◮ Standardized API for real-time applications ◮ Platform independent and portable ◮ Cyclical working sequential controls like a Siemens PLC has ◮ Modular design

slide-10
SLIDE 10

Benchmark and comparison of real-time solutions based on embedded Linux Preparations Open Realtime Framework

ORF enhancement: Dynamical linked libraries

To enable addition and removal of real-time programs without stopping ORF, programs are built as libraries and loaded dynamically. Changes to ORF:

◮ Management for the loaded libraries ◮ Functionality for linking and unlinking ◮ Modification to ”orf add initfunc” and ”orf delete initfunc”

functions to not conflict with ORF spec.

slide-11
SLIDE 11

Benchmark and comparison of real-time solutions based on embedded Linux Preparations Open Realtime Framework

ORF enhancement: Character devices

The former communication between ORF and user-space was done by Rtai FIFOs. → platform dependent. Standard kernel device files has been implemented:

◮ Former Rtai FIFOs has been removed ◮ /dev/rtf[0-X] is handled by main ORF module ◮ One communication cycle:

  • 1. User-space application writes command
  • 2. ORF processes command and blocks user-space application
  • 3. User-space application reads result
slide-12
SLIDE 12

Benchmark and comparison of real-time solutions based on embedded Linux Preparations Open Realtime Framework

ORF enhancement: I/O-API

To create meaningful benchmarks from a practical point of view I/O-port access is needed. An I/O-API within ORF enables platform independent usage. It consists

  • f four functions:

init-io to initialize the I/O-port reset-io to reset the I/O-port

  • utb writes data

inb reads data

slide-13
SLIDE 13

Benchmark and comparison of real-time solutions based on embedded Linux Preparations Open Realtime Framework

ORF enhancement: Interrupt handling

Catching interrupts was not implemented in ORF yet.

◮ Special interrupt ”threads” have been added to ORF to meet ORF’s

specs

◮ Interrupt service routine wrappers are introduced ◮ ORF real-time progs add their main function to the interrupt

wrapper

slide-14
SLIDE 14

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

Interrupt latency

Idea:

◮ I/O-pin is set high level → interrupt is created ◮ ORF program catches interrupt and sets pin back to low ◮ Duration of high level phase is measured

slide-15
SLIDE 15

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

Results: Interrupt latency

◮ Blue: system is idling ◮ Red: system is under heavy load

slide-16
SLIDE 16

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

Jitter

Idea:

◮ ORF program creates square-wave ◮ Scope application measures durations ◮ Maximal jitter is calculated

slide-17
SLIDE 17

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

Results: Jitter

slide-18
SLIDE 18

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

Maximal Frequency

Idea:

◮ Alive square-wave signal on pin 2 ◮ Square-wave signal with rising frequency on pin 1 ◮ Measurement application calculates frequency of pin 1 ◮ Maximal frequency is stored if no malfunction appeared ◮ Measurement stops if alive signal or frequency signal gets lost

slide-19
SLIDE 19

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

Results: Maximal Frequency

slide-20
SLIDE 20

Benchmark and comparison of real-time solutions based on embedded Linux Benchmarks Inter-process communication

Inter-process communication

Idea:

◮ ”Echo” function implemented into ORF

◮ writes received data back ◮ counts packages

◮ Infinite amount of packages are written to the character device file ◮ ORF real-time program prints amount of transmitted packages

every second

slide-21
SLIDE 21

Benchmark and comparison of real-time solutions based on embedded Linux Benchmarks Inter-process communication

Results: Inter-process communication

slide-22
SLIDE 22

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

Overload behavior

Idea:

◮ 2 threads, one with high frequency, one with lower frequency ◮ A shot of the lower frequent thread produces short-time overload ◮ Two scenarios:

◮ light overload - period of high frequent thread is delayed ◮ heavy overload - period of high frequent thread is omitted

slide-23
SLIDE 23

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

Results: Overload behavior

ppc / 2.6 / xn x86 / 2.6 / xn x86 / 2.6 / rtai test1 test2 test1 test2 test1 test2 No load X

  • X
  • X
  • Heavy load

X

  • X
  • .

x86 / 2.4 / rtai test1 test2 No load X

  • Heavy load
  • X: test passed
  • : test aborted
  • : machine died
slide-24
SLIDE 24

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

Priority functionality

Idea:

◮ 4 threads with different priority and frequency ◮ Every thread sets its output pin to high, when active ◮ Measurement application checks preemption

slide-25
SLIDE 25

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

Results: Priority functionality

The result contains the amount of how often each thread has been preempted by any other thread. Linux 2.6 + Xenomai: No load Heavy load T0 T1 T2 T3 T0 T1 T2 T3 T0 T1 932 903 T2 922 104 925 98 T3 4480 486 40 4531 503 48

slide-26
SLIDE 26

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

Conclusion

The benchmark suite created in this project can be used to do meaningful evaluations of real-time approaches on various platforms. Rtai:

◮ very deterministic, high performance ◮ overload must be avoided

Xenomai:

◮ stable in case of overloads ◮ state of the art technology ◮ skin support

Rt-Preempt:

◮ in the very beginning ◮ hard-real-time capability

slide-27
SLIDE 27

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

Questions?