Real-time Linux Evaluation
Definitions
What is Linux?
Real-Time Linux
Real-time Linux Projects
Independent Kernel Variants
Kernel Modification Variants
Real-time Linux Variants
Testing Real-Time Linux
Test Plan
Tools
Requirements
Error Catalog
Test Setup
Future Work
63.00K
Category: softwaresoftware

Real - time Linux evaluation

1. Real-time Linux Evaluation

Kalynnda Berens, GRC
[email protected]
1

2. Definitions

• Embedded System - A combination of hardware
and software which together form a component of a
larger machine. An embedded system is designed to
run on its own without human intervention, and may
be required to respond to events in real time.
• Real-time OS - an operating system that provides
a required level of service in a bounded response
time
– Hard real-time – absolute deadlines that must be
met
– Soft real-time – time tolerance within which an
event can occur
2

3. What is Linux?

• Unix “clone”, first created in 1992 by Linus
Torvalds
• Open source operating system
• Commonly used in server environment, now
used in desktops and embedded systems
• Not useful for real-time systems because:




Fairness scheduling, with limited priority scheduling
Unpredictable, sometimes high latency
Non-deterministic behavior
Coarse timing resolution
3

4. Real-Time Linux

• Modifications or extensions to standard Linux
to allow soft or hard real-time applications to
meet timing constraints.
• One approach uses a separate real-time
“kernel” that runs Linux as the lowest priority
task.
• Another approach modifies standard Linux for
preemptibility, latency, timing, and/or
scheduling.
• Both open source and commercial versions
are available.
4

5. Real-time Linux Projects

• Flight Linux-a customized copy of a standard Linux
distribution, adapted to the unique environment of a
spacecraft embedded control computer.
• STS-83 experiment used Debian GNU/Linux.
• RACSI - the remote Automatic Transfer Vehicle (ATV)
control at ISS.
• GOAS - Ground Operator Assistant System for the
rendezvous operations of ATV.
• PLATINO numerical control
• iArte - Industrial Automation Real Time Environment
• FAA Level C certified flight simulator
• Cascade – a RTLinux based GPS receiver
5

6. Independent Kernel Variants

Linux
Process
Linux
Process
User Space
Kernel Space
Real-Time
Task
Real-Time
Task
Standard Linux Kernel
Real-Time Micro Kernel
Hardware
6

7. Kernel Modification Variants

Linux
Process
Linux
Process
Real-time
Process
User Space
Kernel Space
Modified Linux Kernel
Preemptible, Micro Timing, and/or Low Latency
Loadable Loadable
Module
Module
Hardware
7

8. Real-time Linux Variants

RTAI (Real-time
Kernel, User space
hard real-time (LXRT)
Open source
RT-Linux
Kernel
Commercial,
open source
OnCore OS
Separate RTOS
Commercial
KURT (Kansas
Modified
Open source
Modified
Commercial
Application
Interface)
University Realtime)
HardHat
8

9. Testing Real-Time Linux

• Requirements derived from
– VxWorks 5.4 Test plan, MSFC
– VxWorks AE Test plan, GRC
– RTOS properties
• Specific test scenarios will be derived
from the requirements, plus…
– Variant-specific attributes
– Known errors, defects, etc.
– Results of static analysis (open source)
9

10. Test Plan

VxWorks
5.4
VxWorks
AE
Linux
RTOS
Test Plan
Variant
Specific
Errors
RTOS
Testing
Specific
Linux
RTOS
Test Plans
Static
Analysis
10

11. Tools


Linux Trace Toolkit
Dynamic Probes
kGDB (kernel debugger)
Linux Kernel Crash Dump
Linux Test Project
LMBench
Ballista
strace
System Call Tracker
11

12. Requirements

• Scheduling
• Hardware Interface
• Communication and
Synchronization
• Memory
Management
• Task Management
• Timing
• Configuration
• External
Communications
• Error Reporting
• Embedded Features
• File system
• Reliability
12

13. Error Catalog

Function
RT Linux
RETURN VALUE
Sigaction--RTLinux
POSIX signal handling
functions.
rtl_free_irq,
rtl_request_irq
-- install and remove
realtime interrupt handlers
Bugs & Problems
rt_get_time -- get time in
ticks.
ERRORS
Sigaction, sigprocmask,
sigpending and sigsuspend
[EINVAL] An invalid signal was
specified.
Return 0 on success, and –1
on error.
[EFAULT] act, oldact, set or
oldest point to memory that is
not a valid part of the process
address space.
All functions return 0 on
success and a negative error
code on error.
[EBUSY] rtl_request_irq:
Interrupt handler is already
installed for this interrupt level.
NOTES
sigaction can be called with a
null second argument to query
the current signal handler.
See also: sigaction,
rtl_hard_enable_irq,
rtl_hard_disable_irq.
[EINVAL] rtl_free_irq: There is
no handler currently installed for
this interrupt level
Description
rt_get_time returns the time in clock ticks since the system bootup. This time is never reset or
adjusted. For some horrible reason, hrtime has a differrent meaning when the V1 compat config
option is selected. This is a BUG! The RT_TIME_END symbol represents the maximum possible
value that rt_get_time() could possibly return. This value will be never reached during the execution of
the system, and can be used to designate the infinitely distant moment in time.
Delay of non-realtime interrupts. rtl_schedule() function does not call rtl_process_pending() if RTLinux goes into idle state. This
will delay the pending non-realtime interrupts until a rtl_soft_sti() is called, which can be a long time. Example on a NSC Geode
processor is > 4ms.
sem_getvalue() does not operate correctly. In RTLinux 3.1, this function A. does not write the semaphore value to the location
passed as a parameter; and B. does not return an error code, but returns the semaphore value instead.
13

14. Test Setup

Development System
(Mandrake 8.1 Linux)
Ethernet Connection
Embedded
PowerPC
Embedded
Pentium PC/104
14

15. Future Work


Static analysis of open source variants
Completion of variant-specific test plans
Test scenario creation
Test procedures for each scenario
Testing on embedded hardware
Test results and report
15
English     Русский Rules