24.11.2014 Views

Military Embedded Systems Spring 2005 Volume 1 Number 1

Military Embedded Systems Spring 2005 Volume 1 Number 1

Military Embedded Systems Spring 2005 Volume 1 Number 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Software<br />

MILITARY EMBEDDED SYSTEMS Resource Guide<br />

For instance, applications conventionally<br />

run in a round robin execution, competing<br />

with each other for a proportion of the<br />

CPU capacity. With an RTOS, however,<br />

you can manipulate the priorities of processes<br />

to have certain activities run preferentially<br />

to others in the system. Applied<br />

judiciously, this priority manipulation can<br />

dramatically improve response in areas<br />

important to the user, without potentially<br />

starving other processes in the system.<br />

The key to ensuring that higher-priority<br />

processes and threads do not starve out<br />

other processes is to be certain of the<br />

limits imposed on their execution. By<br />

pacing the execution, or by throttling it<br />

in response to load, you can limit the proportion<br />

of CPU consumed by these activities<br />

so that user processes get their share<br />

of the CPU.<br />

Priority manipulation can benefit a variety<br />

of applications, including, for example,<br />

media players (MP3, WAV, MPEG-2, and<br />

so on). The operation of a media player<br />

can be tied to the media rate required for<br />

proper playback (44 kHz audio, 30 fps<br />

video). So, within this constraint, a reader<br />

thread and a rendering thread can both be<br />

designed to wake up on a programmable<br />

timer, to buffer or render a single frame,<br />

and then go to sleep until the next timer<br />

trigger. This provides the pacing that<br />

allows the priority to be assigned above<br />

normal user activities, but below critical<br />

system functions.<br />

With well-chosen priorities, playback<br />

will occur consistently at the given<br />

media rate. A well-written media player<br />

will also take into account quality of service,<br />

so that if it doesn’t receive adequate<br />

CPU time, it can reduce its requirements<br />

by selectively dropping samples or follow<br />

an appropriate fallback strategy.<br />

This will then prevent it from starving<br />

other processes as well.<br />

A strategic decision<br />

An RTOS can help make complex applications<br />

both predictable and reliable.<br />

In fact, the precise control over timing<br />

made possible by an RTOS adds a form<br />

of reliability that cannot be achieved with<br />

a GPOS. If a system based on a GPOS<br />

doesn’t behave correctly due to incorrect<br />

timing behavior, then we can justifiably<br />

say that the system is unreliable.<br />

Still, choosing the right RTOS can itself<br />

be a complex task. The underlying architecture<br />

of an RTOS is an important criterion,<br />

but so are other factors. For instance,<br />

does the RTOS support standard APIs,<br />

such as POSIX.1? A flexible choice of<br />

scheduling algorithms? Protocol stacks<br />

such as IPv4, IPv6, and IPsec? What<br />

about support for distributed or symmetric<br />

multiprocessing? Diagnostic tools for<br />

system profiling, memory analysis, and<br />

application profiling? And what of the<br />

RTOS vendor? Do they offer a full range<br />

of engineering services and well-documented<br />

source and customization kits?<br />

How about any direct experience serving<br />

embedded developers?<br />

On one point, there is no question: An<br />

RTOS can play a key role in determining<br />

how reliable a system will run, how well it<br />

will perform, and how easily it will support<br />

new or enhanced functionality. It’s critical,<br />

therefore, to choose an RTOS and an RTOS<br />

vendor that can meet project requirements,<br />

both now and in the future. O<br />

Steve Furr is<br />

senior OS product<br />

manager for QNX<br />

Software <strong>Systems</strong><br />

and a coauthor<br />

of the Real-time<br />

Specification for<br />

Java (RTSJ). He<br />

currently serves as a technical member<br />

on several industry forums, including<br />

the Open Group’s Real-time and<br />

<strong>Embedded</strong> <strong>Systems</strong> Forum, which is<br />

dedicated to expanding the marketplace<br />

for standardized real-time and embedded<br />

systems. In his 13 years with QNX,<br />

Steve has held various engineering<br />

positions, including software architect.<br />

He holds a Bachelor’s degree in<br />

computer science.<br />

For further information, contact<br />

Steve at:<br />

QNX Software <strong>Systems</strong> Ltd.<br />

175 Terence Matthews Crescent<br />

Ottawa, Ontario<br />

Canada, K2M 1W8<br />

Tel: 613-591-0931<br />

Fax: 613-591-3579<br />

E-mail: furr@qnx.com<br />

Website: www.qnx.com<br />

40 / <strong>2005</strong> MILITARY EMBEDDED SYSTEMS Resource Guide

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!