Imagine an operating system for embedded systems that was created by, and is constantly being improved by, some of the best programmers in the world. Imagine that hundreds of top-notch programmers are willing to provide free support for this software. Imagine, too, that you have the software's source code, so you can understand its inner workings and-if necessary-modify it at any point in your embedded system's lifetime. Best of all, imagine that this software is free.
Sound too good to be true? Hundreds of embedded-system developers are betting that it isn't, and that Linux will soon be a major operating system for embedded systems.
Linux? For embedded systems? Yes. The desktop and server operating system that was created by a graduate student in Finland and has since taken the computer world by storm is now a serious contender for the embedded market. Linux has been compressed to make it fit into some embedded systems and tweaked to make it responsive enough for some real-time-control applications. It's not suitable for every embedded system, but it's working nicely in some, and it's getting lots of attention from embedded-system developers of all types.
In case you've been living on Mars and haven't heard, Linux began with Linus Torvalds, a Finnish graduate student who wanted to run Unix on his PC. No suitable PC version of Unix existed, however, so Torvalds created Linux, a Unix-like operating system. Then he posted his code on the Internet and invited other programmers to expand, augment, and improve it. They did, in droves. As a result, Linux became so capable and so reliable that many web servers now use it instead of Unix or Windows NT.
Today, Linux is an opensource operating system, owned by no company and still constantly updated and enthusiastically supported by a worldwide online community of programmers. You can download it for free, and you can get answers to technical questions simply by posting them on the Internet. Alternatively, you can get dedicated technical support from one of many commercial providers of Linux "distributions" that include additional software utilities. In either case, you get the software source code, which you seldom or never get with a commercial, closed-source operating system.
While acceptance of Linux for embedded systems may not be soaring, its use on the space station, in set-top boxes, and remote power-system monitoring indicate its potential.
The big question about Linux, though, is how suitable it is for embedded systems. Linux was developed for desktop systems, where code size isn't much of an issue and where performance is mostly measured in data throughput, rather than fast response to real-world events. As a result, even a rudimentary version of Linux can have a memory "footprint" of several megabytes. Response time to interrupts is much improved in the recently released version 2.4 Linux kernel, but it's still much slower than in true real-time operating systems, such as market-leading VxWorks from Wind River Systems Inc. (Alameda, CA).
Linux's limitations for embedded systems are being addressed and minimized by almost a score of companies, however. All provide modified or augmented versions of embedded Linux that significantly reduce the response time to external interrupts. As for Linux's size, many embedded system developers note that silicon is getting cheaper and less power hungry, making multi-megabyte systems increasingly feasible. For some applications, these developers say, throwing extra chips and embedded Linux at a problem can be more economical than buying a traditional real-time operating system and trying to squeeze tediously optimized code into less hardware.
Real-time response remains a vexing issue, though, with discussions often centered around "hard" real time and "soft" real time. In hard real time, a computer's response time to an external event is deterministic, meaning that you can specify a maximum response time for a worst-case scenario.
In soft real time, a computer may respond quickly enough most of the time, but there's no guarantee that it will be fast enough every time. Soft real time can be adequate for many applications, but in others-industrial control, for example-a guaranteed maximum response time of a few microseconds can be essential.
Providers of embedded Linux approach real-time response in various ways and with varying results. Some companies have simply modified the Linux kernel to reduce interrupt-response time, yielding soft real-time performance. Other companies run Linux as a task within a very small real-time operating system that doesn't let Linux operations preempt more critical system tasks. This approach yields hard real-time performance, but adds an extra layer of complexity that can be difficult to deal with.
Establishing a presence. Performance and cost issues notwithstanding, embedded Linux is making an impression in the marketplace. The Embedded Linux Consortium, founded in March of last year, now has about 60 member companies, including industry notables IBM (Armonk, NY), 3Com Corp. (Santa Clara, CA), and Agilent Technologies (Palo Alto, CA). ARM Limited (Cambridge, UK) is one of only a few processor vendors in the consortium, although many chip manufacturers provide at least some support for embedded Linux.
Another indication of embedded Linux's increasing acceptance is the proliferation of applications that use it. Sony's TiVo set-top box, for example, uses embedded Linux, and Square D (Palatine, IL), a traditional supplier of products for electrical distribution and industrial control, produces a Linux-based device for remote power-system monitoring and control. NASA is using embedded Linux for vibration control of certain components on the Inter-national Space Station. Internet appliances are an especially strong area for embedded Linux, with new or announced products that include Internet-connected PDAs, audio and video players, telephones, and TVs.
In the broader embedded world, though, Linux is still a tough sell, primarily because many applications can't tolerate Linux's size and complexity. In the many embedded systems where small size, light weight, low power consumption, or high speed are critical, true real-time operating systems still rule.