1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 2K.1beta (1.48)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>The Real Time Linux Executive</TITLE>
<META NAME="description" CONTENT="The Real Time Linux Executive">
<META NAME="keywords" CONTENT="rtic">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="LaTeX2HTML v2K.1beta">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="rtic.css">
<LINK REL="next" HREF="node9.html">
<LINK REL="previous" HREF="node7.html">
<LINK REL="up" HREF="node7.html">
<LINK REL="next" HREF="node9.html">
</HEAD>
<BODY bgcolor="white">
<!--Navigation Panel-->
<A NAME="tex2html201"
HREF="node9.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="/usr/share/latex2html/icons/next.png"></A>
<A NAME="tex2html199"
HREF="node7.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="/usr/share/latex2html/icons/up.png"></A>
<A NAME="tex2html193"
HREF="node7.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="/usr/share/latex2html/icons/prev.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html202"
HREF="node9.html">RTiC-Lab Design</A>
<B> Up:</B> <A NAME="tex2html200"
HREF="node7.html">The Real Time Controls</A>
<B> Previous:</B> <A NAME="tex2html194"
HREF="node7.html">The Real Time Controls</A>
<BR>
<BR>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00131000000000000000">
The Real Time Linux Executive</A>
</H2>
<P>
An open source, open architecture operating system, Real Time Linux (RT
Linux), was used to develop a controls implementation platform, denoted
in this work as Real-Time Controls Laboratory (RTiC-Lab). The core
component of the RTLinux architecture is a simple real time executive
that is inserted between the original Linux kernel and the underlying
hardware [<A
HREF="node64.html#lj:RTLinux">BY97</A>].
<P>
Figure <A HREF="node8.html#linux">1.4</A> shows the basic Linux kernel without hard real time
support. In this figure, the Linux kernel is seen to separate both the
hardware and user-level tasks. The Linux kernel has the ability to
suspend any user-level task once that task has outrun the ``slice of
time'' allotted to it in the CPU. Assuming that any one of the user
tasks could be an AMB controller, then the kernel could potentially be
preempting this task and giving the CPU to a less critical task, such as
Netscape. Consequently, the AMB controller will not meet its strict
timing requirements.
<P>
Figure <A HREF="node8.html#rtlinux">1.5</A> shows the modified Linux kernel which supports hard
real time. An additional layer of abstraction - termed a virtual
machine in the literature - has been added between the original Linux
kernel and the computer hardware. This new layer appears as actual
hardware to the original Linux kernel. More importantly, it introduces
its very own fixed priority scheduler and assigns the lowest priority to
the original Linux kernel, which runs as an independent task. Then, it
allows the user to both introduce and set priorities for any number of
real time tasks. Consequently, it is possible to assign priorities as
specified by the Liu and Layland RMA.
<P>
<P></P>
<DIV ALIGN="CENTER"><A NAME="linux"></A><A NAME="325"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 1.4:</STRONG>
Detail of the bare Linux kernel</CAPTION>
<TR><TD>
<DIV ALIGN="CENTER">
<IMG
WIDTH="440" HEIGHT="286" ALIGN="BOTTOM" BORDER="0"
SRC="img28.png"
ALT="\includegraphics[width=0.8\textwidth]{Figures/unix.eps}">
</DIV></TD></TR>
</TABLE>
</DIV><P></P>
<P>
<P></P>
<DIV ALIGN="CENTER"><A NAME="rtlinux"></A><A NAME="326"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 1.5:</STRONG>
Detail of the Real Time Linux kernel</CAPTION>
<TR><TD>
<DIV ALIGN="CENTER">
<IMG
WIDTH="443" HEIGHT="257" ALIGN="BOTTOM" BORDER="0"
SRC="img29.png"
ALT="\includegraphics[width=0.8\textwidth]{Figures/rt-linux.eps}">
</DIV></TD></TR>
</TABLE>
</DIV><P></P>
<P>
The rationale for the RTLinux design is that it was not feasible to
attempt to identify and eliminate all aspects of the kernel operation
that lead to unpredictability. These sources of unpredictability
include the Linux scheduling algorithm (optimized to maximize
throughput), device drivers, atomic system calls, the use of
interrupt disabling, and virtual memory operations. Prior to the
development of RTLinux, every time a new device driver or other
enhancements of Linux were needed, a study would have to be performed to
determine that the change does not introduce unpredictability. The best
approach was to construct a small, predictable kernel outside of the
Linux kernel and make it sufficiently simple that operations could be
measured and shown to have predictable execution.
<P>
RTLinux works by intercepting all hardware interrupts. Interrupts not
corresponding to real-time activities are held and then passed into the
Linux kernel as a software interrupt when the original Linux kernel
runs. Otherwise, the appropriate real time interrupt service routine is
run. The RTLinux executive is itself non-preemptable. Unpredictable
delays within the RTLinux executive are eliminated due to its small
size and limited operations. Real-time tasks are both privileged tasks
(they are not user-level tasks) in order to gain direct access to the
hardware, and do not use virtual memory. Real-time tasks are not
expected to execute Linux system calls. Real-time tasks are written as
special Linux modules that can be dynamically loaded into memory. The
initialization code for a real-time task will initialize the real-time
task structure and inform RTLinux of its deadline, period, and
release-time constraints. Non-periodic tasks are supported through the
use of interrupts.
<P>
Thus, in essence, RTLinux has managed to not compete directly with
Linux development. In other words, it does not attempt to create a
brand new operating system with brand new development and application
tools as has been done with QNX and VxWorks. Rather, via a set of
``simple'' modifications, managed to convert the existing Linux kernel
into a hard real time environment without hindering future Linux
development and is thus able to continue using all the tools and
applications that work with Linux.
<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html201"
HREF="node9.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="/usr/share/latex2html/icons/next.png"></A>
<A NAME="tex2html199"
HREF="node7.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="/usr/share/latex2html/icons/up.png"></A>
<A NAME="tex2html193"
HREF="node7.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="/usr/share/latex2html/icons/prev.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html202"
HREF="node9.html">RTiC-Lab Design</A>
<B> Up:</B> <A NAME="tex2html200"
HREF="node7.html">The Real Time Controls</A>
<B> Previous:</B> <A NAME="tex2html194"
HREF="node7.html">The Real Time Controls</A>
<!--End of Navigation Panel-->
<ADDRESS>
Michael Barabanov
2001-06-19
</ADDRESS>
</BODY>
</HTML>
|