Hardware Reference
In-Depth Information
12.3
LINUX RELATED REAL-TIME KERNELS
Linux is a general purpose operating system originally designed to be used in server
or desktop environments. For this reason, not much attention has been dedicated to
real-time issues. As a result, the latency experienced by real-time activities can be
as large as hundreds of milliseconds. This makes common Linux distributions not
suitable for hard real-time applications with tight timing constraints. On the other
hand, making Linux a real-time operating system would enable the full-power of a real
operating system for real-time applications, including a broad range of open source
drivers and development tools. For this reason, a considerable amount of work has
been done during the last years to provide Linux with real-time features. Two different
approaches have been followed.
The first approach is called interrupt abstraction and it is based on a small real-
time executive having full control of interrupts and processor key features, which
executes Linux as a thread. To achieve real-time behavior, the whole Linux kernel
is treated by the real-time scheduler as the idle task, so Linux only executes when
there are no real-time tasks to run. The Linux task can never block interrupts
or prevent itself from being preempted. This approach has been successfully
implemented in several existing frameworks, the most notable examples of which
are RTLinux, RTAI, and Xenomai. It is an efficient solution, as it obtains low
latencies, but is also invasive, and, often, not all standard Linux facilities are
available to tasks running with real-time privileges.
The second approach consists in directly modifying the Linux internals to re-
duce latency and add real-time features. This is the approach followed by the
PREEMPT RT, SCHED EDF, and Linux/RK projects.
12.3.1
RTLINUX
RTLinux has been the first real-time extension for Linux, created by Victor Yodaiken.
Currently, two versions of RTLinux are available: an Open-Source version, called
RTLinuxFree, 3 and a commercial version covered by patent, distributed by Wind River
as Wind River Real-Time Core for Linux. 4 RTLinux works as a small executive with
a real-time scheduler that runs Linux as its lowest priority thread. The Linux thread is
made preemptable so that real-time threads and interrupt handlers do not experience
long blocking delays by non-real-time operations. The executive modifies the standard
Linux interrupt handler routine and the interrupt enabling and disabling macros.
3 RTLinuxFree: http://www.rtlinuxfree.com
4 RTLinux Wind River: http://www.windriver.com/products/linux/
Search WWH ::




Custom Search