RTLinux: Difference between revisions

Content deleted Content added
BattyBot (talk | contribs)
Threads: format example code
 
(7 intermediate revisions by 6 users not shown)
Line 1:
{{Short description|Real-time operating system}}
{{distinguish|text=[[Real-Time Linux]], the official patchset for real-time support in the Linux kernel}}
{{more footnotes needed|date=June 2009}}
{{ infobox software<!-- The OS template doesn't fit nor the software2 template so we must create a kernel template -->
| logo =
Line 15 ⟶ 16:
}}
 
'''RTLinux''' is a [[hard realtime]] [[real-time operating system]] (RTOS) [[microkernel]] that runs the entire [[Linux]] [[operating system]] as a fully [[preemption (computing)|preemptive]] process. The hard real-time property makes it possible to control robots, data acquisition systems, manufacturing plants, and other time-sensitive instruments and machines from RTLinux applications. The design was patented.<ref name="RTLinux Patent">{{cite web |last1=yodaiken |first1=victor |title=Adding real-time support to general purpose operating systems |url=https://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&p=1&u=%2Fnetahtml%2FPTO%2Fsearch-bool.html&r=1&f=G&l=50&co1=AND&d=PTXT&s1=5,995,745.PN.&OS=PN/5,995,745&RS=PN/5,995,745 |website=USPTO |publisher=USPTO |access-date=19 January 2022 |ref=RTLPATENT}}</ref> Despite the similar name, it is not related to the [[Real-Time Linux]] project of the [[Linux Foundation]].<ref>{{cite web|url=https://wiki.linuxfoundation.org/realtime/start|title=realtime:start [Linux Foundation Wiki]|website=wiki.linuxfoundation.org}}</ref> which is for soft real-time.
 
RTLinux was developed by Victor Yodaiken, Michael Barabanov, Cort Dougan and others at the [[New Mexico Institute of Mining and Technology]] and then as a commercial product at FSMLabs. [[Wind River Systems]] acquired FSMLabs embedded technology in February 2007 and made a version available as Wind River Real-Time Core for [[Wind River Linux]]. As of August 2011, Wind River has discontinued the Wind River Real-Time Core product line, effectively ending commercial support for the RTLinux product.
 
== Background ==
The key RTLinux design objective<ref name="Barabanov">{{cite report |last=Barabanov |first=Michael |title=Introducing RTLinux |urlpublisher=https://Linux Journal |citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.302.3221 |website=Citeseer |publisher=Linux Journal |access-date=19 January 2022 |ref=RTLINUX}}</ref> was to add hard real-time capabilities to a commodity operating system to facilitate the development of complex control programs with both capabilities.<ref name="manifesto">{{cite report |last=Yodaiken |first=Victor |date=1999 |title=The RTLinux Manifesto |publisher=5th Linux Conference Proceedings |url=http://www.yodaiken.com/papers/rtlmanifesto.pdf}}</ref><ref name="redist">{{cite report |last=Yodaiken |first=Victor |date=1996 |title=Cheap Operating systems Research |publisher=Proceedings of the First Conference on Freely Redistributable Systems |place=Cambridge, Massachusetts |url=http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.39.9505 |place=Cambridge, Massachusetts }}</ref> For example, one might want to develop a real-time motor controller that used a commodity database and exported a web operator interface. Instead of attempting to build a single operating system that could support real-time and non-real-time capabilities, RTLinux was designed to share a computing device between a real-time and non-real-time operating system so that (1) the real-time operating system could never be blocked from execution by the non-real-time operating system and (2) components running in the two different environments could easily share data. As the name implies RTLinux was originally designed to use Linux as the non-real-time system<ref name="barabanov">{{cite thesis |last=Barabanov |first=Michael |date=1996 |type=M.S. |url=http://www.yodaiken.com/papers/BarabanovThesis.pdf |title=A Linux Based Real-Time Operating System}}</ref> but it eventually evolved so that the RTCore real-time kernel could run with either Linux or [[Berkeley Software Distribution]] (BSD) [[Unix]].
 
[[Multi-Environment Real-Time]] (MERT) was the first example of a real-time operating system coexisting with a Unix system. MERT relied on traditional virtualization techniques: the real-time kernel was the ''host'' operating system (or [[hypervisor]]) and Bell Systems Unix was the ''guest''. RTLinux was an attempt to update the MERT concept to the PC era and commodity hardware. It was also an attempt to also overcome the performance limits of MERT, particularly the overhead introduced by virtualization.
Line 59 ⟶ 60:
int init_module(void)
{
pthread_attr_t attr;
struct sched_param param;
pthread_attr_init(&attr);
param.sched_priority = 1;
pthread_attr_setschedparam(&attr, &param);
pthread_create(&t1, &attr, &thread_code, "this is thread 1");
rtl_printf("Thread 1 started\n");
/* ... */
}
</syntaxhighlight>
Line 106 ⟶ 107:
{{refbegin}}
* [http://www.ddj.com/cpp/184401758 Dougan, Cort (2004), "Precision and predictability for Linux and RTLinuxPro", Dr. Dobbs Journal, February 1, 2004]
* [https://patentimages.storage.googleapis.com/99/da/90/31f19019130256/US5995745.pdf Yodaiken, Victor (1997), US Patent 5,995,745]
{{refend}}
 
== External links ==
* [http://www.yodaiken.com/papers/sync.pdf Article about RTLinux synchronization]
* [http://www.soe.ucsc.edu/~sbrandt/courses/Winter00/290S/rtlinux.pdf ''A Real-Time Linux''] {{Webarchive|url=https://web.archive.org/web/20070318062700/http://www.soe.ucsc.edu/~sbrandt/courses/Winter00/290S/rtlinux.pdf |date=2007-03-18 }}. Victor Yodaiken and Michael Barabanov, New Mexico Institute of Technology
* {{webarchive |date=2013-01-28 |url=https://archive.today/20130128073427/http://www.linuxdevices.com/articles/AT3694406595.html |title=Article about RT concept}}