The phenomenon that is Linux cannot be denied. It has grown from
an obscure student project, through a hacker's paradise, into a
commercially viable suite of products. Many companies based on
Linux offerings have become significant players in the market. In
the last eighteen months, almost every major computer vendor has
announced some sort of strategy involving Linux. These major
commitments, and an incredible fury of media attention, have
brought Linux from the backwaters of the academic world to
mainstream commercial markets.
Most of Linux's attention has been focused on the enterprise and
home/SOHO markets. These large markets have always tended to
dominate the computing press and Wall Street's scrutiny. However,
in addition to success in these markets, Linux has also been
helping to change the embedded marketplace. Several large and many
smaller companies have traditionally dominated this market using
specialized environments, many focused on a certain niche or two.
Although this embedded market has always been evolving, the advent
of Linux has altered and speeded up this evolutionary process.
The Embedded Marketplace
The embedded marketplace can be divided up into two separate
components. The first is the segment of the market that designs
their own solutions. This could include custom hardware, software,
and/or tools. The other segment uses off-the-shelf hardware and
specialized tools as well as operating environments that address
the specific needs of a particular application.
In the past, the first segment has been a much larger market
than the second. However, many customers in the first segment have
gradually been moving toward the second paradigm. Time to market
and complexity are responsible for this shift.
Time to market is significant because competitive pressures are
shortening design cycles and reducing profit margins. Less time and
money means that customers must use more and more off-the-shelf
technology and concentrate on their added value in order to deliver
the robust products their customers demand in the time frames
required.
Complexity is also a key factor. As both hardware and software
solutions increase in complexity, customers are finding it more
difficult to develop and maintain competitive in-house designs.
Many hardware vendors (like the Motorola Computer Group) have
addressed this complexity in the embedded marketplace by offering
modular solutions based on standardized technologies. Many
commercial real time executives, tools, and operating systems have
been increasingly more successful due to very rapid increase of
software complexities. However, while these tools greatly
facilitate creating products, their costs have risen commensurate
with their sophistication. This trend has generally been very
stable over the last ten years.
However, recently there have been several other factors that
have begun to affect the market, making Linux a much more viable
option. Although these factors have always been present to some
degree, they have greatly grown in significance within the past two
years.
Solution cost is significant because the cost of software tools
and environments have not been following the same trends as the
hardware platforms. As the market demands increase, many of the
traditional software solutions represent a significant economic
impact to a given project. However, since the same complexity that
helps drive this cost also makes in-house solutions less viable,
thus a new market opportunity is created.
Performance and capability are significant because hardware
capacity/power has been growing at a substantial rate. The
so-called Moore's Law predicts that computing power doubles every
eighteen months. This doubling factor has led to very high capacity
systems. Technology is getting to the level where it significantly
impacts the embedded marketplace because it directly affects the
line between soft and hard real time applications. In other words,
as processors get faster and faster, non deterministic operating
systems become more and more viable for a given task.
For example, take a telecommunications provider who is designing
a service that has to offer a dial tone within one second. This
type of customer realizes that their customer base cannot
differentiate between a one second delay and a tenth (or
thousandth) of a second delay. In other words, "good enough" seems
to be an increasingly popular embedded design parameter. As a
result, sophisticated (and expensive) deterministic environments
are not absolutely required for certain types of
application(s).
In response to the embedded trends, the traditional RTOS/tools
vendors have been adding new features as quickly as possible.
However, this, along with cost pressures, has resulted in what some
consider limited support from many mainstream vendors. Even with
expensive support contracts, more and more customers are running
into significant problems that are not resolved in a timely manner
(or in some cases, ever resolved).
The reduced needs for determinism and the support issue have
made the market ripe for a product like Linux. Linux addresses
certain aspects of today's technology challenges/trends very well.
It is a robust product with a wide range of features and hardware
support. Another major advantage is cost. The fact that Linux is
widely available and free, or at a moderate cost, is extremely
attractive to OEMs under cost pressures. The availability of source
code also provides customers the ability to customize the operating
environment to their specific needs.
The Case Against Linux
The two most common arguments advanced against Linux are lack of
support and non-deterministic behavior. As far as support is
concerned, Linux has many strong options. A number of companies
(many well funded and/or supported by large companies) offer
support programs, which can be as effective as those offered by the
traditional real time companies. In addition, the availability of
source code allows an OEM to craft its own support expertise.
Despite the initial effort, this expertise can have positive
results in lower support response time and significant reductions
in software end of life issues. Recently, a third option has
emerged. In the last year, several companies have produced products
directly addressing the embedded marketplace, offering a support
alternative for companies not wanting to develop the expertise
in-house.
The issue of determinism is actually a stronger argument in some
cases. The performance and capability factor allows Linux to be
used in more and more applications. Many Linux projects are
underway to address hard real time requirements.
Does all this mean the death of the traditional real time
vendors is soon to come? Certainly not! There will always be
applications that require these specialized environments as well as
companies to provide them. However, these vendors must be cautious
to adapt to the changing marketplace or eventually relegate to
various niches.
 |
|
Numerous Linux projects are directly applicable to the embedded
market. Click here for a brief overview of
some of these projects, complete with links. Many of these efforts
are currently underway and subject to frequent change. |
 |
Linux Strategies
for Real Time
In addition to specialized projects addressing Linux in the
embedded marketplace (see sidebar), many applications are being
developed using a standard Linux distribution with some
customizations. There are a number of strategies that a customer
can use when embedding Linux.
Size
Size can be very important for real time applications due to
factors like the cost of components, physical size restrictions,
environmental restrictions, and power consumption. Linux has a lot
of positive features for size management. These can be divided into
two categories.
The first is kernel image size. The size can be tweaked
substantially by recompiling the kernel for a specific hardware
configuration or application requirement(s). Unused drivers and
facilities can be removed to greatly reduce (up to 50% by some
experiments) the kernel resource requirements. In addition, the
kernel module facility can also be used. This allows a more
efficient use of kernel space by only loading certain drivers when
they are required for use, which can be very effective in systems
that need to support a broad range of protocols or features, but
not necessarily simultaneously.
The other category is filesystem size. Linux supports many
filesystem mechanisms (see the section on root/boot disk) including
some features for compressed filesystems. These features can be
very effective when resources are scarce.
In addition, a standard Linux distribution is made up of many
packages and is highly modular. This can allow a large degree of
tailoring on total filesystem requirements by only including the
necessary packages. In addition, the packages themselves can be
modified to only include the components that are needed by the
particular environment.
Root/Boot Disks
Since Linux requires some sort of filesystem, every kernel image
needs a root (or boot) facility. Fortunately, Linux provides many
different mechanisms to implement filesystems.
The primary one is the initrd (initial ramdisk image). This is
part of the ramdisk driver subsystem in the Linux kernel. It
provides a mechanism by which the ramdisk can be loaded with an
image from a given device or even the kernel binary itself. This
image is not pre-loaded into the kernel binary directly because it
is stored in a highly compressed format, which makes it very space
efficient.
The initrd facility is also important for embedded applications
because it allows Linux to operate with no physical disk. With the
proper architecture, it can also provide power fail protection.
This power protection is accomplished by insuring that the Linux
filesystem always comes up in a known state (in other words, the initrd
image). Volatile data can still be written to the ramdisk, but will
be lost without hardware protection.
Another mechanism for insuring root drive integrity is the
Linux's ability (with the appropriate extensions) to boot from a
mirrored (e.g. multiple device) root device. This is a key
differentiating factor for Linux, as many popular operating systems
do not support this.
The increasing availability of Flash hardware on embedded
platforms provides an efficient way of storing not only the boot
image, but also the initial filesystems. In order to more fully
utilize flash devices, specific drivers for components like Compact
Flash have been created. These drivers allow creation of very
reliable boot drives for robust embedded systems.
If networking is available, another technique for running Linux
without a physical disk is to use a NFS root disk. This facility
can also be built into the Linux kernel and allows a hardware
platform to both get a kernel from a network server (or have the
kernel stored locally), and then mount its root file systems over
the network. Since this is done via the NFS mechanism, the server
for the file system can be any type of system with NFS support,
making it ideal for heterogeneous environments. This is a popular
method for many embedded applications.
Memory Facilities
Many embedded applications require user level access to some
parts of the hardware. This has often introduced problems when
using standard commercial environments, which seek to restrict user
level access to specific components. Historically, the most often
requested facility is that of mmap(), or user level memory mapping.
Mmap() allows a user level process to actually map part of the
physical address space of the machine into its process virtual
space. This allows the embedded customer to create user level
device handlers which can talk directly to a given hardware device,
eliminating the need to write custom device drivers.
Serial Console Support
Serial console support allows the embedded customer to design
applications that do not require a graphical device to be present.
This minimal console overhead can significantly reduce the hardware
cost of an application, not to mention allow the use of platforms
that do not ordinarily support graphics hardware.
POSIX Real-Time Extensions
Linux also implements some of the POSIX 1003.1b extensions to
support soft real time applications. These include the ability to
lock certain areas of memory into RAM to prevent paging, as well as
fixed priority scheduling modifications. These extensions allow
embedded Linux applications to provide a more deterministic real
time response than in the standard timesharing environment.
Kurt/Real Time Application Interface (RTAI)
The
Kurt/RTAI
package can be used on standard Linux in order to provide an even
better real time behavior than with the POSIX extensions. This set
of patches provides a set of facilities designed to allow
scheduling of tasks based on timer events. These patches allow a
more deterministic response than with conventional soft real time
mechanisms.
Advanced Networking Features
Linux has many features that allow embedded networking
applications to be created. In addition to a very wide list of
protocols that are supported, Linux also provides features for
multicasting, IP-masquerading, IP-aliasing, and Virtual Service
facilities. These features allow a Linux machine to emulate not
only multiple IP entities on a network, but entire domains and
machines. This IP-masquerading allows the Linux system to act as a
proxy gateway for securing networks.
Looking Forward
All of the new features and Linux projects have come a long way
in the last several years. This work has made Linux a very viable
technical solution for the embedded customer. However, in addition
to the technical reasons, the embedded marketplace has also been
changing. The customer base is requiring more features and greater
support. This, coupled with the increased capacity of modern
hardware platforms, has caused a trend that is converging with the
growth of Linux to make it a more and more popular solution for
embedded customers.
General Linux References
Moody, Paul,
"miniHOWTO
Embedded Linux 1.1c"
A Very Good General Site on Embedded Linux,
www.linuxdevices.com.
Another Good Embedded Linux Page,
www.siliconpenguin.com.