<s>
RTLinux	B-Application
is	O
a	O
hard	O
realtime	O
real-time	B-Operating_System
operating	I-Operating_System
system	I-Operating_System
(	O
RTOS	B-Operating_System
)	O
microkernel	B-Operating_System
that	O
runs	O
the	O
entire	O
Linux	B-Application
operating	I-Application
system	I-Application
as	O
a	O
fully	O
preemptive	B-Operating_System
process	O
.	O
</s>
<s>
The	O
hard	O
real-time	O
property	O
makes	O
it	O
possible	O
to	O
control	O
robots	O
,	O
data	O
acquisition	O
systems	O
,	O
manufacturing	O
plants	O
,	O
and	O
other	O
time-sensitive	O
instruments	O
and	O
machines	O
from	O
RTLinux	B-Application
applications	O
.	O
</s>
<s>
Despite	O
the	O
similar	O
name	O
,	O
it	O
is	O
not	O
related	O
to	O
the	O
Real-Time	O
Linux	B-Application
project	O
of	O
the	B-Operating_System
Linux	I-Operating_System
Foundation	I-Operating_System
.	O
</s>
<s>
RTLinux	B-Application
was	O
developed	O
by	O
Victor	O
Yodaiken	O
,	O
Michael	O
Barabanov	O
,	O
Cort	O
Dougan	O
and	O
others	O
at	O
the	O
New	O
Mexico	O
Institute	O
of	O
Mining	O
and	O
Technology	O
and	O
then	O
as	O
a	O
commercial	O
product	O
at	O
FSMLabs	B-Application
.	O
</s>
<s>
Wind	O
River	O
Systems	O
acquired	O
FSMLabs	B-Application
embedded	O
technology	O
in	O
February	O
2007	O
and	O
made	O
a	O
version	O
available	O
as	O
Wind	O
River	O
Real-Time	O
Core	O
for	O
Wind	O
River	O
Linux	B-Application
.	O
</s>
<s>
As	O
of	O
August	O
2011	O
,	O
Wind	O
River	O
has	O
discontinued	O
the	O
Wind	O
River	O
Real-Time	O
Core	O
product	O
line	O
,	O
effectively	O
ending	O
commercial	O
support	O
for	O
the	O
RTLinux	B-Application
product	O
.	O
</s>
<s>
The	O
key	O
RTLinux	B-Application
design	O
objective	O
was	O
to	O
add	O
hard	O
real-time	O
capabilities	O
to	O
a	O
commodity	O
operating	B-General_Concept
system	I-General_Concept
to	O
facilitate	O
the	O
development	O
of	O
complex	O
control	O
programs	O
with	O
both	O
capabilities	O
.	O
</s>
<s>
Instead	O
of	O
attempting	O
to	O
build	O
a	O
single	O
operating	B-General_Concept
system	I-General_Concept
that	O
could	O
support	O
real-time	O
and	O
non-real-time	O
capabilities	O
,	O
RTLinux	B-Application
was	O
designed	O
to	O
share	O
a	O
computing	O
device	O
between	O
a	O
real-time	O
and	O
non-real-time	O
operating	B-General_Concept
system	I-General_Concept
so	O
that	O
(	O
1	O
)	O
the	O
real-time	B-Operating_System
operating	I-Operating_System
system	I-Operating_System
could	O
never	O
be	O
blocked	O
from	O
execution	O
by	O
the	O
non-real-time	O
operating	B-General_Concept
system	I-General_Concept
and	O
(	O
2	O
)	O
components	O
running	O
in	O
the	O
two	O
different	O
environments	O
could	O
easily	O
share	O
data	O
.	O
</s>
<s>
As	O
the	O
name	O
implies	O
RTLinux	B-Application
was	O
originally	O
designed	O
to	O
use	O
Linux	B-Application
as	O
the	O
non-real-time	O
system	O
but	O
it	O
eventually	O
evolved	O
so	O
that	O
the	O
RTCore	B-Application
real-time	O
kernel	B-Operating_System
could	O
run	O
with	O
either	O
Linux	B-Application
or	O
Berkeley	B-Operating_System
Software	I-Operating_System
Distribution	I-Operating_System
(	O
BSD	B-Operating_System
)	O
Unix	B-Application
.	O
</s>
<s>
Multi-Environment	B-Operating_System
Real-Time	I-Operating_System
(	O
MERT	B-Operating_System
)	O
was	O
the	O
first	O
example	O
of	O
a	O
real-time	B-Operating_System
operating	I-Operating_System
system	I-Operating_System
coexisting	O
with	O
a	O
Unix	B-Application
system	I-Application
.	O
</s>
<s>
MERT	B-Operating_System
relied	O
on	O
traditional	O
virtualization	O
techniques	O
:	O
the	O
real-time	O
kernel	B-Operating_System
was	O
the	O
host	O
operating	B-General_Concept
system	I-General_Concept
(	O
or	O
hypervisor	B-Operating_System
)	O
and	O
Bell	O
Systems	O
Unix	B-Application
was	O
the	O
guest	O
.	O
</s>
<s>
RTLinux	B-Application
was	O
an	O
attempt	O
to	O
update	O
the	O
MERT	B-Operating_System
concept	O
to	O
the	O
PC	O
era	O
and	O
commodity	O
hardware	O
.	O
</s>
<s>
It	O
was	O
also	O
an	O
attempt	O
to	O
also	O
overcome	O
the	O
performance	O
limits	O
of	O
MERT	B-Operating_System
,	O
particularly	O
the	O
overhead	O
introduced	O
by	O
virtualization	O
.	O
</s>
<s>
Instead	O
of	O
encapsulating	O
the	O
guest	O
OS	O
in	O
a	O
virtual	O
machine	O
,	O
RTLinux	B-Application
virtualized	O
only	O
the	O
guest	O
interrupt	O
control	O
.	O
</s>
<s>
This	O
method	O
allowed	O
the	O
real-time	O
kernel	B-Operating_System
to	O
convert	O
the	O
guest	O
operating	B-General_Concept
system	I-General_Concept
into	O
a	O
system	O
that	O
was	O
completely	O
preemptible	O
but	O
that	O
could	O
still	O
directly	O
control	O
,	O
for	O
example	O
,	O
storage	O
devices	O
.	O
</s>
<s>
The	O
Unix	B-Operating_System
pipe	I-Operating_System
was	O
adapted	O
to	O
permit	O
real-time	O
and	O
non-real-time	O
programs	O
to	O
communicate	O
,	O
although	O
other	O
methods	O
such	O
as	O
shared	O
memory	O
were	O
also	O
added	O
.	O
</s>
<s>
From	O
the	O
programmer	O
's	O
point	O
of	O
view	O
,	O
RTLinux	B-Application
originally	O
looked	O
like	O
a	O
small	O
threaded	O
environment	O
for	O
real-time	O
tasks	O
plus	O
the	O
standard	O
Linux	B-Application
environment	O
for	O
everything	O
else	O
.	O
</s>
<s>
The	O
real-time	B-Operating_System
operating	I-Operating_System
system	I-Operating_System
was	O
implemented	O
as	O
a	O
loadable	B-Application
kernel	I-Application
module	I-Application
which	O
began	O
by	O
virtualizing	O
guest	O
interrupt	O
control	O
and	O
then	O
started	O
a	O
real-time	O
scheduler	O
.	O
</s>
<s>
The	O
guest	O
operating	B-General_Concept
system	I-General_Concept
was	O
incorporated	O
as	O
the	O
lowest	O
priority	O
task	O
and	O
essentially	O
acted	O
as	O
the	O
idle	O
task	O
for	O
the	O
real-time	O
system	O
.	O
</s>
<s>
Real-time	O
tasks	O
ran	O
in	O
kernel	B-Operating_System
mode	O
.	O
</s>
<s>
Later	O
development	O
of	O
RTLinux	B-Application
adopted	O
the	O
Portable	O
Operating	B-General_Concept
System	I-General_Concept
Interface	O
(	O
POSIX	O
)	O
POSIX	B-Operating_System
threads	I-Operating_System
application	O
programming	O
interface	O
(	O
API	B-General_Concept
)	O
and	O
then	O
permitted	O
creation	O
of	O
threads	O
in	O
user	O
mode	O
with	O
real-time	O
threads	O
running	O
inside	O
guest	O
processes	O
.	O
</s>
<s>
RTLinux	B-Application
provides	O
the	O
ability	O
to	O
run	O
special	O
real-time	O
tasks	O
and	O
interrupt	O
handlers	O
on	O
the	O
same	O
machine	O
as	O
standard	O
Linux	B-Application
.	O
</s>
<s>
These	O
tasks	O
and	O
handlers	O
execute	O
when	O
they	O
need	O
to	O
execute	O
no	O
matter	O
what	O
Linux	B-Application
is	O
doing	O
.	O
</s>
<s>
The	O
worst	O
case	O
time	O
between	O
the	O
moment	O
a	O
hardware	O
interrupt	O
is	O
detected	O
by	O
the	O
processor	O
and	O
the	O
moment	O
an	O
interrupt	O
handler	O
starts	O
to	O
execute	O
is	O
under	O
15	O
microseconds	O
on	O
RTLinux	B-Application
running	O
on	O
a	O
generic	O
x86	O
(	O
circa	O
2000	O
)	O
.	O
</s>
<s>
A	O
RTLinux	B-Application
periodic	O
task	O
runs	O
within	O
35	O
microseconds	O
of	O
its	O
scheduled	O
time	O
on	O
the	O
same	O
hardware	O
.	O
</s>
<s>
These	O
times	O
are	O
hardware	O
limited	O
,	O
and	O
as	O
hardware	O
improves	O
RTLinux	B-Application
will	O
also	O
improve	O
.	O
</s>
<s>
Standard	O
Linux	B-Application
has	O
excellent	O
average	O
performance	O
and	O
can	O
even	O
provide	O
millisecond	O
level	O
scheduling	O
precision	O
for	O
tasks	O
using	O
the	O
POSIX	O
soft	O
real-time	O
capabilities	O
.	O
</s>
<s>
Standard	O
Linux	B-Application
is	O
not	O
,	O
however	O
,	O
designed	O
to	O
provide	O
sub-millisecond	O
precision	O
and	O
reliable	O
timing	O
guarantees	O
.	O
</s>
<s>
RTLinux	B-Application
was	O
based	O
on	O
a	O
lightweight	O
virtual	O
machine	O
where	O
the	O
Linux	B-Application
"	O
guest	O
"	O
was	O
given	O
a	O
virtualized	O
interrupt	O
controller	O
and	O
timer	O
,	O
and	O
all	O
other	O
hardware	O
access	O
was	O
direct	O
.	O
</s>
<s>
From	O
the	O
point	O
of	O
view	O
of	O
the	O
real-time	O
"	O
host	O
"	O
,	O
the	O
Linux	B-Application
kernel	B-Operating_System
is	O
a	O
thread	O
.	O
</s>
<s>
Interrupts	O
needed	O
for	O
deterministic	O
processing	O
are	O
processed	O
by	O
the	O
real-time	O
core	O
,	O
while	O
other	O
interrupts	O
are	O
forwarded	O
to	O
Linux	B-Application
,	O
which	O
runs	O
at	O
a	O
lower	O
priority	O
than	O
real-time	O
threads	O
.	O
</s>
<s>
Linux	B-Application
drivers	I-Application
handled	O
almost	O
all	O
I/O	B-General_Concept
.	O
</s>
<s>
First-In-First-Out	O
pipes	B-Operating_System
(	O
FIFO	B-Operating_System
)	O
or	O
shared	O
memory	O
can	O
be	O
used	O
to	O
share	O
data	O
between	O
the	O
operating	B-General_Concept
system	I-General_Concept
and	O
RTLinux	B-Application
.	O
</s>
<s>
The	O
key	O
RTLinux	B-Application
design	O
objective	O
is	O
that	O
the	O
system	O
should	O
be	O
transparent	O
,	O
modular	O
,	O
and	O
extensible	O
.	O
</s>
<s>
And	O
extensibility	O
means	O
that	O
programmers	O
should	O
be	O
able	O
to	O
add	O
modules	B-Application
and	O
tailor	O
the	O
system	O
to	O
their	O
requirements	O
.	O
</s>
<s>
The	O
base	O
RTLinux	B-Application
system	O
supports	O
high	O
speed	O
interrupt	O
handling	O
and	O
no	O
more	O
.	O
</s>
<s>
When	O
developing	O
RTLinux	B-Application
,	O
it	O
was	O
designed	O
to	O
maximize	O
the	O
advantage	O
we	O
get	O
from	O
having	O
Linux	B-Application
and	O
its	O
powerful	O
capabilities	O
available	O
.	O
</s>
<s>
RTLinux	B-Application
is	O
structured	O
as	O
a	O
small	O
core	O
component	O
and	O
a	O
set	O
of	O
optional	O
components	O
.	O
</s>
<s>
The	O
core	O
component	O
permits	O
installation	O
of	O
very	O
low	O
latency	O
interrupt	O
handlers	O
that	O
cannot	O
be	O
delayed	O
or	O
preempted	O
by	O
Linux	B-Application
itself	O
and	O
some	O
low	O
level	O
synchronization	O
and	O
interrupt	O
control	O
routines	O
.	O
</s>
<s>
Most	O
RTLinux	B-Application
functions	O
are	O
in	O
a	O
set	O
of	O
loadable	B-Application
kernel	I-Application
modules	I-Application
that	O
provide	O
optional	O
services	O
and	O
levels	O
of	O
abstraction	O
.	O
</s>
<s>
These	O
modules	B-Application
include	O
:	O
</s>
<s>
rtl	O
sched	O
-	O
a	O
priority	O
scheduler	O
that	O
supports	O
both	O
a	O
"	O
lite	O
POSIX	O
"	O
interface	O
described	O
below	O
and	O
the	O
original	O
V1	O
RTLinux	B-Application
API	B-General_Concept
.	O
</s>
<s>
rtl	O
fifo	B-Operating_System
-	O
connects	O
RT	O
tasks	O
and	O
interrupt	O
handlers	O
to	O
Linux	B-Application
processes	O
through	O
a	O
device	O
layer	O
so	O
that	O
Linux	B-Application
processes	O
can	O
read/write	O
to	O
RT	O
components	O
.	O
</s>
<s>
POSIX	O
mutex	O
support	O
is	O
planned	O
to	O
be	O
available	O
in	O
the	O
next	O
minor	O
version	O
update	O
of	O
RTLinux	B-Application
.	O
</s>
<s>
mbuff	O
is	O
a	O
contributed	O
package	O
written	O
by	O
Tomasz	O
Motylewski	O
for	O
providing	O
shared	O
memory	O
between	O
RT	O
components	O
and	O
Linux	B-Application
processes	O
.	O
</s>
<s>
RTLinux	B-Application
realtime	O
tasks	O
get	O
implemented	O
as	O
kernel	B-Application
modules	I-Application
similar	O
to	O
the	O
type	O
of	O
module	B-Application
that	O
Linux	B-Application
uses	O
for	O
drivers	O
,	O
file	O
systems	O
,	O
and	O
so	O
on	O
.	O
</s>
<s>
On	O
initialization	O
,	O
a	O
realtime	O
task	O
(	O
module	B-Application
)	O
informs	O
the	O
RTLinux	B-Application
kernel	B-Operating_System
of	O
its	O
deadline	O
,	O
period	O
,	O
and	O
release-time	O
constraints	O
.	O
</s>
<s>
RT-Linux	O
implements	O
a	O
POSIX	O
API	B-General_Concept
for	O
a	O
thread	O
's	O
manipulation	O
.	O
</s>
<s>
It	O
is	O
necessary	O
to	O
set	O
thread	O
priorities	O
in	O
RTLinux	B-Application
.	O
</s>
<s>
The	O
example	O
threads2.c	O
sets	O
different	O
thread	O
priorities	O
.	O
</s>
