Evaluation of real-time operating systems for use in Integrated Modular Avionics
Professor:
- Dr. Martin Bogdan, Universität Leipzig
Tutor: Thomas Schanne, EADS Deutschland GmbH Author: Martin Christian
Evaluation of real-time operating systems for use in Integrated - - PowerPoint PPT Presentation
Evaluation of real-time operating systems for use in Integrated Modular Avionics Professor: Dr. Martin Bogdan, Universitt Leipzig Tutor: Thomas Schanne, EADS Deutschland GmbH Author: Martin Christian Introduction Structure Structure:
Professor:
Tutor: Thomas Schanne, EADS Deutschland GmbH Author: Martin Christian
Structure: Structure: 1.Introduction Motivation, problem 2.Requirements Kernel requirements in Integrated Modular Avionic 3.Analyses
Free UNIX for PC
Hypervisor for para-virtualised guest OS
μKernel providing space, activity and communication abstraction 4.Implementation
5.Evaluation What's the result? Does it meet the requirements?
Structure
Motivation:
radar project Hellas Problem: 1.Find the most reasonable way to use Linux in Avionics 2.Port Linux to the Hellas-board this way
Problem
mandatory and common to all other software.“ [Liedke, 1995]
➔ Monolithic kernel: Scheduling, interrupt handling, memory management and
device drivers are part of the kernel
➔ Microkernel: „[...] a concept is tolerated inside the μ-kernel only if moving it
required functionality“ [Liedke, 1995]
individual unpredictable external stimuli arrivals.“ [Timmerman+, 2005]
➔ Soft Real-Time:
Time constraints have to be met on average
➔ Hard Real-Time: Time constraints have to be met always
Terms
Goals of Integrated Modular Avionics (IMA):
IMA Function A Function B Function A + Function B Avionic: All electronic devices in aviation.
Requirements for an IMA-Kernel:
The kernel must meet the real-time requirements of the most demanding application running on top. → hard real-time
“The behaviour and performance of software in one partition must be unaffected by the software in other partitions.“ [Rushby, 1999]
➔ Space: Partitions must not manipulate data within each other → neither in
memory nor on devices
➔ Time: Partitions must not steal time from each other
IMA-Criteria
IMA-Criteria Requirements (continued):
➔ Minimal TCB → easier certification ➔ Less code → less bugs [Herder+, 2006]
Independence from manufacturer ensure availability of components
➔ Re-use of components → less development costs ➔ Exchangeable components → less storage costs (product cycle > 10 years)
IMA-Model OS IMA Kernel Hardware Partition 1 ... Partition N OS API Kernel API HAL Generic IMA model according to [Bennett, 2003]
Limitations:
➔ Easy to obtain ➔ No problems with NDAs ➔ Assured source code availability for project duration ➔ Problems with commercial developers: Acquisition, bankrupt
➔ Only kernel with Linux available
➔ Best choice to start kernel development for IMA is L4 ➔ Many projects have evolved further → second glance worthwhile
Outline
Excluded kernel (selection):
1st generation μ-kernel, [Bennett, 2003]
Predecessor of Chord OS, [Bennett, 2003]
Single address space OS (no partitioning)
Not Open Source in a narrower sense, no Linux
[Bennett, 2003]
Not Open Source
Not Open Source
Not Open Source
Outline
Short-listed kernel:
Methodology:
Outline
Linux Kernel Hardware POSIX Hardware architecture
Module 1 Thread 1
Init Process N
Thread 2 Module M ...
Process 1
Thread 1
Privileged mode Free multi-user UNIX for PC
Linux
Linux Real-Time:
Partitioning:
TCB:
Modularity:
Open standards:
Real-Time extensions for Linux:
➔ Reduced interrupt latency ➔ Less none-preemptible kernel code ➔ Some RT patches already included with kernel 2.6.18 ➔ RT-distributions (selection): TimeSys, MontaVista
➔ RTLinux Linux is an idle thread of the μ-kernel μ-kernel and Linux share kernel mode → no partitioning Software patent → not Open Source in a narrower sense Windriver announced on 20/02/07 that it bought all rights for RTLinux
(including the patent)
Linux+RT
Linux Kernel POSIX Architecture Code Linux Process RT Kernel Privileged mode Linux Process RT Process Module 1 RT Process Module M ...
Linux+RT
➔ RTAI/Adeos Adeos I-Pipe is loaded as kernel module → no partitioning RT-tasks running in user- or kernel mode, co-scheduler for RT-asks
Dom 0 ... Dom N Xen Virtual Hardware Hardware architecture
Virtual CPU Virtual Memory Virtual E/A
Hardware
Backend Driver Frontend Driver
Control Interface Xen VMM
Event Channels
Privileged mode Virtualised hardware for up to 100 guest OS [Barham+, 2003]
Xen
Real-Time:
Partitioning:
TCB:
Modularity:
Open standards:
Xen
Computer system following the „TV model“ [Herder+, 2006] Minix 3 µKernel Hardware User Process 1 ... User Process N POSIX System calls IA32
Clock System task
Server
(Process, Memory, FS, ...)
Device driver
(HD, NIC, ...)
Reincarnation server Privileged Mode
Minix 3
Real-Time:
Partitioning:
TCB: μ-kernel + clock driver + system task + process- and memory manager
Modularity:
Open standards:
Minix 3
L4 OS-layer L4 µ-kernel Hardware OS API L4 API Hardware architecture Sigma0 Root-task Address space X
Thread 1 Thread N ...
Address space Y
Thread 1
Sigma1 Privileged mode Hardware abstraction by address spaces, threads, IPC
L4
Real-Time:
Partitioning:
TCB:
Modularity:
Open standards:
L4
None-IMA factors:
➔ NICTA: seL4, L4.verified (mathematical verified correctness) ➔ TU Dresden: Verified Fiasco
Decision Rating:
kernel API (+)
Name API Project Architectures Pistachio X.2 L4Ka IA32/64, ARM, PowerPC32/64, ... Pistachio-embedded N1 NICTA IA32, ARM, MIPS OKL4 OKL4 OKL IA32, ARM Fiasco V2/X.0 DROPS IA32 Name Precondition Afterburner Pistachio + GCC-Afterburner Wombat Pistachio-embedded + ESF L4Linux Fiasco + L4Env User Mode Linux Linux
Linux on L4: L4 μKernel:
Alternatives
Iguana NICTA::Pistachio-embedded Hardware Iguana API N1 API Architecture + Platform Sigma0 Server Address space X
Thread 1 Thread N
Address space Y
Thread 1 Interrupts Timer IPC FPages MMU Scheduling Threads
Embedded Systems Framework (ESF)
ESF-Modell
CPU details:
Board details (relevant parts):
Hardware
Hardware support for IMA-criterias:
➔ Decrementer interrupt with 0.04 μs (4/Bus-frequency) resolution
➔ Time: Decremeter enables scheduling with variable time slices Devices of inactive partitions could be masked on the interrupt
controller of the hostbridge
➔ Space: 2 CPU Modes: User Model and Supervisor Model MMU for data and instructions / with BAT or Paging MMU also protects devices because of memory mapped I/O
Hardware + IMA
Define requirements L4Ka::Pistachio Wombat Linux
L4Ka::Pistachio
GCC 3.4.6. Cross-Toolchain
Adjust PowerPC ABI to N1 API Select kernel Create toolchain Create platform Select Linux
ESF* auf EADS-Board
Pistachio-embedded
Implement PowerPC architecture for ESF* *) ESF = Embedded Systems Framework of National ICT Australia
Linux on EADS-Board
Implement PowerPC sub-architecture
Steps
Steps 1.Cross-Toolchain:
2.Build-System:
3.Architecture:
4.Platform:
Results Results:
5.ESF:
Data types, jump functions, CRT0, platform I/O
Read cycle counter of CPU
Implement CRT0 for threads
Adjust to N1 ABI and UTCB, new KDebug functions
Implement try_lock
Decrementer based user mode timer
IMA Real-Time:
Partitioning:
be prohibited → BAT-entry for Marvell-Bridge registers needed → World- writeable
assigns RW access
TCB:
➔ MemoryControl system call goes wild ➔ Smashthread Unit Test fails: kernel is running out of memory for “Thread
Control Block” after creating around 20 threads → memory leak?
➔ Missing in TLB-update → bug in paging system for PowerPC
suspected Modularity: Nothing changed to Analyses
IMA Open standars: Nothing changed to Analyses
Conclusion:
Conclusion
Actual development:
PowerPC platform”. Amsterdam. 2006
Ho, R. Neugebauer, I. Pratt, A. Warfield: „Xen and the Art of Virtualization“. New York. 2003
Source-Labs bei“. 2003
Tanenbaum: „MINIX 3: A Highly Reliable, Self-Repairing Operating System.
Requirements, Mechansims, and Assurance“. Menlo Park. 1999
Understanding RTOS Technology And Markets?”. 2005