A few of the many versions of Linux are designed for embedded systems.
Unlike the majority of "desktop" or "server" distributions of Linux, these versions of Linux either
- (a) support real-time tasks, or
- (b) run in a "small" embedded system, typically booting out of Flash, no hard drive, no full-size video display, and take far less than 2 minutes to boot up, or
- (c) both.
Linux and MMUEdit
Linux was originally designed on a processor with a memory management unit (MMU). Most embedded systems do not have a MMU, as we discussed earlier (Embedded Systems/Memory).
Benefits of using a processor with a MMU:
- can isolate running "untrusted" machine code from running "critical" code, so the "untrusted" code is guaranteed (in the absence of hardware failures) not to interfere with the "critical" code
- makes it easier for the OS to present the illusion of virtual memory
- can run "normal" Linux (could also run "μClinux", but what's the point?)
Benefits of using a processor without a MMU:
- typically lower-cost and lower-power
- can still run the "μClinux" version of Linux specifically designed to run on processors without a MMU.
Linux and real timeEdit
People use a variety of methods to combine real-time tasks with Linux:
- Run the real-time tasks on a dedicated microcontroller; communicate with a (non-real-time) PC that handles non-real-time tasks. This is pretty much your only choice if you need real-time response times below 1 microsecond.
- Run the real-time tasks in a "underlying" dedicated real-time operating system; run Linux as a "nested operating system" inside one low-priority task on top of the real-time operating system. Some of these systems claim real-time response times below 500 microseconds.
- use a Linux kernel designed to emphasize real-time tasks, and run the real-time tasks with a high priority (perhaps even as a kernel thread). As Linux develops, it seems to be getting better response times ("Preemptible kernel patch makes it into Linux kernel v2.5.4-pre6"; Linux kernel gains new real-time support).
Typically embedded Linux needs a minimum of about 2 MB of RAM, not including application and service needs .
- using Linux with hard real-time tasks:
- non-real-time Linux distributions designed for embedded systems:
- Wikipedia: uClinux ("MicroController Linux") is a version of the Linux kernel that supports Altera NIOS, ADI Blackfin, ARM, ETRAX, Freescale M68K (including DragonBall, ColdFire, PowerQUICC and others), Fujitsu FRV, Hitachi H8, MIPS, and Xilinx MicroBlaze processors.
- Wikipedia: Embeddable Linux Kernel Subset (ELKS) is a small subset of Linux that, like uClinux, can run even on machines that lack a MMU. It apparently only supports x86 machines (including the 8088-based original IBM PC, the 80286-based original IBM PC/AT, the NEC V30H-based Psion Series 3, etc.)
- "Real Time and Embedded Guide ("rtHOWTO")" by Herman Bruyninckx 2002 claims that standard Linux (in 2002) is not a true real-time OS nor an embedded OS.
- The coreboot project (formerly known as the "LinuxBIOS" project) is developing firmware that replaces a standard "BIOS", boots out of motherboard Flash just like standard BIOS, and boots into almost any modern 32-bit operating system much faster than a standard BIOS (by cutting out most of the "device detection" and "hardware initialization" a standard BIOS does, since the OS needs to do that all over again anyway).
- "Reducing OS Boot Times for In-Car Computer Applications" by Damien Stolarz 2004
- "Comparing real-time Linux alternatives" by Kevin Dankwardt
- LynuxWorks sells a DO-178B certifiable RTOS and also BlueCat embedded Linux.
- "hard real-time Linux technology"
- "modifications to the Linux kernel in order to provide a real-time operating system"
- U-Boot (the Universal Bootloader) and Embedded Linux
- RED-Linux (Real-time and Embedded Linux)
- KURT-Linux: Kansas University Real-Time Linux
- the Realtime Linux Security Module "selectively grants realtime permissions to specific user groups or applications".
- "Real-Time Linux" by Alex Ivchenko 2001 "for Linux to be a true alternative to traditional real-time operating systems, its lack of determinism must be dealt with. Real-time extensions have recently made this ... easy"
- "Linux: Realtime Approaches" 2005
- "embeddedTUX.org", the companion site to Karim Yaghmour's book Building Embedded Linux Systems
- The Linux Kernel