# RTLinux

**RTLinux** 是一种硬实时操作系统，它让标准 [Linux 内核](https://www.edgepedia.org/zh/linux-kernel)作为低优先级线程运行在一个小型实时核心之下，从而使时间关键型任务总能抢占普通的 Linux 工作。它由维克多·约代肯（Victor Yodaiken）和迈克尔·巴拉巴诺夫（Michael Barabanov）在新墨西哥矿业与技术学院（New Mexico Tech）创建，巴拉巴诺夫在1995年至1997年间将最初的系统作为硕士项目实施，后来由有限状态机实验室（FSMLabs）商业化，之后风河公司（Wind River）于2007年收购了这项技术。<sup>[1](https://linuxdevices.org/an-update-on-rtlinux-a/)</sup>

| 关键事实 | 详情 |
|---|---|
| 设计 | 双内核：RTCore 实时内核将 Linux 作为其空闲线程运行，并使用一个小型虚拟机来防止次级内核禁用中断<sup>[1](https://linuxdevices.org/an-update-on-rtlinux-a/)</sup> |
| 起源 | 由维克多·约代肯和迈克尔·巴拉巴诺夫在新墨西哥矿业与技术学院创建；1995年首次推出，1997年在 USENIX 上展示<sup>[1](https://linuxdevices.org/an-update-on-rtlinux-a/)</sup><sup> • </sup><sup>[2](https://www.usenix.org/legacy/publications/library/proceedings/ana97/summaries/yodaiken.html)</sup> |
| API | 兼容 POSIX 1003.13“最小实时操作系统”规范<sup>[3](https://linuxdevices.org/ldfiles/article033/rtl-thesis.pdf)</sup> |
| 实测延迟 | 在一项学术对比中，最坏情况中断延迟为68微秒；在200兆赫兹奔腾 Pro 上，250微秒周期处理程序的最大迟滞为58微秒<sup>[4](https://www.researchgate.net/publication/2377974_RTLinux_with_Address_Spaces)</sup><sup> • </sup><sup>[5](https://usenix.org/legacy/publications/library/proceedings/usenix01/full_papers/hohmuth/hohmuth_html/index.html)</sup> |
| 调度抖动 | 在1.2吉赫兹 AMD K7 上，1毫秒周期线程在 Linux 重负载下最坏情况抖动不超过12微秒；在200兆赫兹 StrongARM iPAQ 上为32微秒<sup>[1](https://linuxdevices.org/an-update-on-rtlinux-a/)</sup> |
| 专利 | 美国专利5,995,745，“为通用操作系统添加实时支持”，由维克多·约代肯持有；根据开放 RTLinux 专利许可，对以 GPL 交付的软件免收版税<sup>[6](https://citeseerx.ist.psu.edu/document?doi=0c81e1915ba80e319739b988ee74a31ef853c7b6&repid=rep1&type=pdf)</sup> |
| 所有权 | 风河公司于2007年2月以约980万美元从 FSMLabs 收购 RTLinux 知识产权，并将其更名为 Wind River Real-Time Core for Linux<sup>[7](https://www.sec.gov/Archives/edgar/data/833829/000119312507097860/d10k.htm)</sup> |

## 工作原理

RTLinux 解决了通用内核中实时行为的核心障碍：Linux 在进行自身簿记时会长时间禁用中断，因此任何时序保证都无法存续。约代肯的团队没有重新设计 Linux，而是在其下方嵌入了一个小型、简单的实时操作系统。Linux 变成了一个仅在没有实时任务需要处理器时才运行的任务，并且每当实时任务需要处理器时就会被抢占。<sup>[8](https://linuxjournal.rubdos.be/ljarchive/LJ/034/0232.html)</sup>

其机制是对中断控制器的软件仿真。实时核心拦截 Linux 用于启用和禁用中断的指令并将其虚拟化，因此 Linux 相信自己控制着中断硬件，而实时内核保留实际控制权。因此 Linux 永远无法阻塞中断或阻止自身被抢占。<sup>[9](https://linuxdevices.org/ldfiles/misc/ripoll-rtl-v-rtai.html)</sup> 约代肯将这一洞见描述为仅仿真一小块硬件：所有普通 Linux I/O 直接通往裸机，只有中断控制被模拟，这使开销远低于完整虚拟机的开销。<sup>[10](https://www.linuxjournal.com/article/4313)</sup>

**内核空间中的实时任务。** 实时线程在处理器特权模式下运行于内核内存空间，这防止它们被换出，减少 TLB 未命中，并使应用程序与实时内核之间的系统调用成为简单的函数调用而非软件中断。<sup>[9](https://linuxdevices.org/ldfiles/misc/ripoll-rtl-v-rtai.html)</sup> 应用程序预期被分为两部分：一个作为内核模块编写的小型硬实时部分，满足截止期限；以及一个处理其他所有事务的较大的普通 Linux 进程。两部分通过实时 FIFO——内核与用户空间之间的特殊 I/O 接口——进行通信。<sup>[8](https://linuxjournal.rubdos.be/ljarchive/LJ/034/0232.html)</sup> [莱纳斯·托瓦兹](https://www.edgepedia.org/zh/linus-torvalds)（Linus Torvalds）在2002年的一次内核邮件列表讨论中认可了这种划分，称其为处理硬实时的唯一明智方式，因为它在必须立即发生的事和可在软实时下运行的事之间划出了清晰的边界。<sup>[9](https://linuxdevices.org/ldfiles/misc/ripoll-rtl-v-rtai.html)</sup>

实时核心本身——RTCore——被其作者描述为一种 POSIX 1003.13 类型的内核，看起来像一个带有自己内部调度器的多线程 POSIX 进程。RTLinux 就是以 Linux 为次级内核的 RTCore，同一核心也曾与 BSD UNIX 配对为 RTCore BSD。就调度而言，次级操作系统是实时系统的空闲线程。<sup>[1](https://linuxdevices.org/an-update-on-rtlinux-a/)</sup>

## 性能

来自独立研究和开发者自身报告的实测数据，让人对可达到的时序精度有所了解。在开发者的测试用奔腾 120 系统上，任务调度精度约为20微秒。<sup>[8](https://linuxjournal.rubdos.be/ljarchive/LJ/034/0232.html)</sup> 一项2001年 USENIX 比较微内核的研究测得，在200兆赫兹奔腾 Pro 上，RTLinux 的250微秒周期中断处理程序最大迟滞为58微秒，接近 Fiasco 微内核的65微秒，远低于 L4/x86 的541微秒。<sup>[5](https://usenix.org/legacy/publications/library/proceedings/usenix01/full_papers/hohmuth/hohmuth_html/index.html)</sup> 后来一项将 RTLinux 与基于 L4 的变体进行比较的研究报告称，RTLinux 的最坏情况中断延迟为68微秒。<sup>[4](https://www.researchgate.net/publication/2377974_RTLinux_with_Address_Spaces)</sup>

开发者2003年的更新报告称，在次级 Linux 内核处于重负载下时，1.2吉赫兹 AMD K7 上的1毫秒周期线程最坏情况调度抖动不超过12微秒，在基于200兆赫兹 StrongARM 的康柏 iPAQ 掌上电脑上不超过32微秒。<sup>[1](https://linuxdevices.org/an-update-on-rtlinux-a/)</sup>

## 历史与商业化

约代肯在新墨西哥矿业与技术学院构思了 RTLinux，借鉴了此前在程序验证和虚拟机方面的工作；他引用[贝尔实验室](https://www.edgepedia.org/zh/bell-labs)1970年代的 MERT 操作系统作为他所知最接近的前身，并指出 MERT 虚拟化了处理器的大部分，而 RTLinux 仅仿真中断控制器。<sup>[10](https://www.linuxjournal.com/article/4313)</sup> 该系统由约代肯和巴拉巴诺夫在1997年 USENIX 会议上展示，作为一个增强的 Linux 内核，其决定性区别在于中断从不被完全禁用，允许时间关键型任务在调度时运行。<sup>[2](https://www.usenix.org/legacy/publications/library/proceedings/ana97/summaries/yodaiken.html)</sup>

在约代肯担任系主任期间开发放缓；他于2000年1月全职投入该项目，担任总部位于[新墨西哥州](https://www.edgepedia.org/zh/new-mexico)的软件公司 FSMLabs 的总裁。<sup>[10](https://www.linuxjournal.com/article/4313)</sup> FSMLabs 发行了两个版本：GPL 下的 Open RTLinux 和商业版 RTLinux-Pro。<sup>[11](https://citeseerx.ist.psu.edu/document?doi=ef6fb0d6819eb9188e412ea21b13e179daf8c97b&repid=rep1&type=pdf)</sup> 版本3增加了对 PowerPC 和 Alpha 的移植（与 x86 并列），并计划推出 MIPS 版本。<sup>[10](https://www.linuxjournal.com/article/4313)</sup>

2007年2月，风河系统公司（Wind River Systems）以约980万美元现金对价从 FSMLabs 收购了 RTLinux 知识产权，包括专利、版权、商标及相关产品权利，并将该技术更名为 Wind River Real-Time Core for Linux。FSMLabs 根据风河公司的权利授予，继续在企业应用中商业化 RTLinux。<sup>[7](https://www.sec.gov/Archives/edgar/data/833829/000119312507097860/d10k.htm)</sup><sup> • </sup><sup>[12](https://vita.militaryembedded.com/3222-wind-real-time-linux-technology-fsmlabs/)</sup>

## 专利与 GPL 争议

约代肯持有关于底层方法的美国专利5,995,745，该专利涵盖使用软件仿真层进行中断屏蔽的实时中断处理。根据开放 RTLinux 专利许可，该技术可对以 GPL 交付的软件免版税使用，但该许可施加了限制性条款，[自由软件基金会](https://www.edgepedia.org/zh/free-software-foundation)于2001年9月宣布其违反 GPL，认为该专利被用来对受 GPL 覆盖的程序施加条件。<sup>[6](https://citeseerx.ist.psu.edu/document?doi=0c81e1915ba80e319739b988ee74a31ef853c7b6&repid=rep1&type=pdf)</sup><sup> • </sup><sup>[13](https://lwn.net/2001/0920/a/fsfrtllicense.php3)</sup> 该专利的广度在实时 Linux 社区中存在争议，因为它被视为可能也涵盖 [RTAI](https://www.edgepedia.org/zh/rtai)。<sup>[6](https://citeseerx.ist.psu.edu/document?doi=0c81e1915ba80e319739b988ee74a31ef853c7b6&repid=rep1&type=pdf)</sup>

## RTLinux 与 RTAI

RTAI——实时应用接口——起源于米兰大学，由一个研究过 RTLinux 的团队构建；两个系统都采用相同的基本思想，即在 Linux 之下设置实时层，而记录了两个系统的研究者伊斯梅尔·里波尔（Ismael Ripoll）在2002年的一项比较中发现它们的性能基本相同。<sup>[14](https://linuxdevices.org/guest-column-comparing-two-approaches-to-real-time-linux/)</sup><sup> • </sup><sup>[3](https://linuxdevices.org/ldfiles/article033/rtl-thesis.pdf)</sup> 实际差异在于工程取向：RTAI 使用易于跨内核版本维护的小型内核补丁，保持为 GPL 和 LGPL 许可下的开源项目，并提供许多功能；而 RTLinux 使用大型内核补丁，采取极简主义方法，并将其活跃开发转移到了商业版本中。<sup>[3](https://linuxdevices.org/ldfiles/article033/rtl-thesis.pdf)</sup><sup> • </sup><sup>[6](https://citeseerx.ist.psu.edu/document?doi=0c81e1915ba80e319739b988ee74a31ef853c7b6&repid=rep1&type=pdf)</sup> RTLinux 的 API 完全兼容 POSIX 1003.13，而 RTAI 有自己的 API，并有一个支持部分 POSIX 调用的模块。<sup>[3](https://linuxdevices.org/ldfiles/article033/rtl-thesis.pdf)</sup>

## 应用

RTLinux 被用于精确时序必须与完整操作系统共存的场合。日本产业技术综合研究所于2001年开发的人形机器人 H7，在1.1吉赫兹奔腾板载计算机上运行 RTLinux，将从底层运动控制到基于视觉的行为等硬实时任务交错执行，具有1毫秒伺服环路控制周期、10毫秒平衡反馈和1秒轨迹生成。<sup>[15](https://citeseerx.ist.psu.edu/document?doi=6f84cb19f60a380fed406c4569a4258468a04dec&repid=rep1&type=pdf)</sup> 一台运行 RTLinux 的 NASA 计算机飞入乔治飓风的风眼进行数据采集，RTLinux 也被用于控制电影中的电子机械偶。<sup>[16](https://kadionik.enseirb-matmeca.fr/enseirb/e3/projets/rapport_sujet1_erasmus_0001.pdf)</sup> 2000年，[密西西比州立大学](https://www.edgepedia.org/zh/mississippi-state-university)的研究人员制作了一个八节点 Linux 集群的原型，其实时组件是最早的 RTLinux 微内核之一的自定义版本，用于有界抖动的时间基调度和节点间时间同步。<sup>[15](https://citeseerx.ist.psu.edu/document?doi=6f84cb19f60a380fed406c4569a4258468a04dec&repid=rep1&type=pdf)</sup>

## 遗产

RTLinux 是第一个采用双内核方法实现实时 Linux 的解决方案，其虚拟化中断控制器的方法成为 RTAI 及后来混合系统遵循的模板。<sup>[17](https://picture.iczhiku.com/resource/paper/WyIdPgyrSPqoixnX.pdf)</sup> 另一种方法——改进 Linux 内核本身的抢占——由 TimeSys 和 Linux 内核抢占项目并行推进，最终成为 [PREEMPT_RT](https://www.edgepedia.org/zh/preempt-rt)，它通过使 Linux 内核完全可抢占并线程化中断处理程序，将其转变为实时内核。<sup>[9](https://linuxdevices.org/ldfiles/misc/ripoll-rtl-v-rtai.html)</sup><sup> • </sup><sup>[18](https://cdn.kernel.org/doc/html/latest/core-api/real-time/theory.html)</sup> 这两种策略代表了为 Linux 添加实时性能的两种方式：如 RTLinux 所选择的在内核之下设置独立实时层，或如主线 PREEMPT_RT 工作所选择的可抢占内核。<sup>[9](https://linuxdevices.org/ldfiles/misc/ripoll-rtl-v-rtai.html)</sup>

## References

1. [Update on the RTLinux/RTCore dual kernel real-time operating system, LinuxDevices.com](https://linuxdevices.org/an-update-on-rtlinux-a/)
2. [USENIX 1997 Conference Summary: Real-Time, by Victor Yodaiken and Michael Barabanov](https://www.usenix.org/legacy/publications/library/proceedings/ana97/summaries/yodaiken.html)
3. [Real-Time Linux on the CRIS Architecture (thesis comparison of RTLinux and RTAI), LinuxDevices.com](https://linuxdevices.org/ldfiles/article033/rtl-thesis.pdf)
4. [RTLinux with Address Spaces, Mehnert, Hohmuth, Schonberg, Hartig, USENIX 2002](https://www.researchgate.net/publication/2377974_RTLinux_with_Address_Spaces)
5. [The Fiasco microkernel (USENIX 2001 Annual Technical Conference), Hohmuth et al.](https://usenix.org/legacy/publications/library/proceedings/usenix01/full_papers/hohmuth/hohmuth_html/index.html)
6. [Embedded/Real-Time Linux Survey, 4Real AB, 2005](https://citeseerx.ist.psu.edu/document?doi=0c81e1915ba80e319739b988ee74a31ef853c7b6&repid=rep1&type=pdf)
7. [Wind River Systems Form 10-K, fiscal 2007, SEC EDGAR](https://www.sec.gov/Archives/edgar/data/833829/000119312507097860/d10k.htm)
8. [Introducing Real-Time Linux, Michael Barabanov and Victor Yodaiken, Linux Journal, February 1997](https://linuxjournal.rubdos.be/ljarchive/LJ/034/0232.html)
9. [RTLinux versus RTAI, Ismael Ripoll, 2002, LinuxDevices.com](https://linuxdevices.org/ldfiles/misc/ripoll-rtl-v-rtai.html)
10. [An Interview with Victor Yodaiken, Linux Journal, November 2000](https://www.linuxjournal.com/article/4313)
11. [Distributed Real-time Processing (citing FSMLabs' Open RTLinux and RTLinux-Pro)](https://citeseerx.ist.psu.edu/document?doi=ef6fb0d6819eb9188e412ea21b13e179daf8c97b&repid=rep1&type=pdf)
12. [Wind River Acquires Hard Real-Time Linux Technology From FSMLabs, Vita Technologies, February 20, 2007](https://vita.militaryembedded.com/3222-wind-real-time-linux-technology-fsmlabs/)
13. [Violation of The GNU General Public License (GPL) by RTLinux, Free Software Foundation press release, September 14, 2001, via LWN](https://lwn.net/2001/0920/a/fsfrtllicense.php3)
14. [Comparing two approaches to real-time Linux, Tim Bird, LinuxDevices.com](https://linuxdevices.org/guest-column-comparing-two-approaches-to-real-time-linux/)
15. [Introduction to Linux for Real-Time Control: Application Case Studies, NIST Intelligent Systems Division, 2002](https://citeseerx.ist.psu.edu/document?doi=6f84cb19f60a380fed406c4569a4258468a04dec&repid=rep1&type=pdf)
16. [Real-time Linux project report (RTLinux applications including Hurricane Georges flight)](https://kadionik.enseirb-matmeca.fr/enseirb/e3/projets/rapport_sujet1_erasmus_0001.pdf)
17. [Proceedings citing RTLinux as the first dual-kernel real-time Linux solution](https://picture.iczhiku.com/resource/paper/WyIdPgyrSPqoixnX.pdf)
18. [Theory of operation, PREEMPT_RT, Linux Kernel documentation](https://cdn.kernel.org/doc/html/latest/core-api/real-time/theory.html)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Operating systems › Unix-like and Linux › Unix, BSD, and kernel internals

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/rtlinux

English original: https://www.edgepedia.org/rtlinux
