Documente Academic
Documente Profesional
Documente Cultură
Speed without the expense system activities, unless a more important performance is the biggest impediment to
The answer lies in the very nature of activity must execute first (for example, an Linux adoption. The questions are:
embedded systems, which are often operation that protects user safety).
manufactured by the thousands or even ■ What does an RTOS have that a GPOS
millions of units. Even a one dollar Consider also a system that must satisfy does not?
reduction in per-unit hardware costs can Quality of Service (QoS) requirements, ■ How useful are the real-time extensions
save the manufacturer a small fortune. such as a device that presents live video. now available for some GPOSs?
Many of these systems are cost sensitive, If the device depends on software for ■ Can such extensions provide a reason-
where the use of multi-gigahertz processors any part of its content delivery, it can able facsimile of RTOS performance?
or a large memory array is not possible. In experience dropped frames at a rate
the automotive telematics and infotainment that users perceive as unacceptable. Task scheduling
market, for instance, the typical 32-bit From the user’s perspective, the device Let’s begin with task scheduling. In a GPOS,
processor runs at about 200 MHz – a far is unreliable. But with an RTOS, the de- the scheduler typically uses a fairness
cry from the 2 GHz or faster processors veloper can precisely control the order in policy to dispatch threads and processes
now common in desktops and servers. In an which software processes execute, and onto the CPU. Such a policy enables
environment like this, an RTOS designed thereby ensure that playback occurs at the high overall throughput required by
to extract extremely fast (and predictable) an appropriate and consistent media rate. desktop and server applications, but offers
response times from lower-end hardware no guarantees that high-priority, time-
offers a serious economic advantage. RTOSs are not fair critical threads will execute in preference
The need for hard real time – and for to lower-priority threads.
Savings aside, the services provided by OSs that enable it – remains prevalent
an RTOS make many computing prob- in the embedded industry. For evidence, For instance, a GPOS may decay the prior-
lems easier to solve, particularly when consider recent developments in the ity assigned to a high-priority thread, or
multiple activities compete for a system’s Linux world. MontaVista, for example, otherwise dynamically adjust the priority
resources. Consider, for instance, a system has launched an open source project in in the interest of fairness to other threads
where users expect immediate response an attempt to improve task preemption in the system. A high-priority thread can,
to input. With an RTOS, a developer can in the Linux kernel. Meanwhile, a recent as a consequence, be preempted by threads
guarantee that operations initiated by the study conducted by Venture Development of lower priority. In addition, most GPOSs
user will execute in preference to other Corporation suggests that lack of real-time have unbounded dispatch latencies: the
Dueling kernels
GPOSs – Linux, Windows, and various
flavors of UNIX – typically lack the
mechanisms we have just discussed.
Nonetheless, vendors have developed
a number of real-time extensions and
patches in an attempt to fill the gap. There
is, for example, the dual-kernel approach,
in which the GPOS runs as a task on top of
a dedicated real-time kernel (Figure 3).
Modified GPOSs
Rather than use a second kernel, other
approaches modify the GPOS itself,
such as by adding high-resolution timers
or a modified process scheduler. Such
approaches have merit, since they allow
developers to use a standard kernel
(albeit with proprietary patches) and
programming model. Moreover, they
help address the requirements of reactive,
event-driven systems.
Paul Leroux is a
Technology Analyst
at QNX Software
Systems, where he
has served in various
roles since 1990. His
areas of focus include
OS architecture, high
availability systems,
and integrated
development environments.