microkernel operating system proven reliability ... and whitepapers/qss/qnx_neutrino... · qnx...

16
From large distributed systems to powerful SMP boxes to tiny embedded devices, QNX Neutrino can scale any way you want. QNX ® NEUTRINO ® RTOS MICROKERNEL OPERATING SYSTEM PROVEN RELIABILITY. MASSIVE SCALABILITY. UNPARALLELED PERFORMANCE. QNX SOFTWARE SYSTEMS LTD.

Upload: lehanh

Post on 12-Nov-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MICROKERNEL OPERATING SYSTEM PROVEN RELIABILITY ... and whitepapers/QSS/QNX_Neutrino... · QNX Software Systems 3 QNX NEUTRINO RTOS ® ® MICROKERNEL OPERATING SYSTEM THE MEDIUM IS

From large distributed systems to powerful SMPboxes to tiny embedded devices, QNX Neutrino canscale any way you want.

QNX® NEUTRINO® RTOSMICROKERNEL OPERATING SYSTEM

PROVEN RELIABILITY. MASSIVE SCALABILITY. UNPARALLELED PERFORMANCE.

QNX SOFTWARE SYSTEMS LTD.

Page 2: MICROKERNEL OPERATING SYSTEM PROVEN RELIABILITY ... and whitepapers/QSS/QNX_Neutrino... · QNX Software Systems 3 QNX NEUTRINO RTOS ® ® MICROKERNEL OPERATING SYSTEM THE MEDIUM IS

FOR OVER TWENTY YEARS, QNX OS

TECHNOLOGY HAS HELPED DEVELOPERS

CREATE THE WORLD'S MOST RELIABLE

REALTIME APPLICATIONS – EVERYTHING

FROM LIFE-CRITICAL MEDICAL

INSTRUMENTS AND IN-CAR TELEMATICS

PRODUCTS TO MASSIVELY DISTRIBUTED

CONTROL SYSTEMS. AND NOW, THE

WORLD’S MOST RELIABLE RTOS ALSO

SUPPORTS THE MOST ADVANCED TOOLS.

QNX SOFTWARE SYSTEMS LTD.

® ®QNX NEUTRINO RTOSMICROKERNEL OPERATING SYSTEM

TABLE OF CONTENTSMICROKERNEL ARCHITECTURE 2

MESSAGE PASSING 3

POSIX SUPPORT 4

DISTRIBUTED PROCESSING 4

SYMMETRIC MULTIPROCESSING (SMP) 5

QNX PHOTON MICROGUI 6

FILE SYSTEMS 7

TCP/IP NETWORKING 7

DEVICE DRIVERS 8

INSTRUMENTED MICROKERNEL 9

HIGH AVAILABILITY MANAGER 10

JAVA ENVIRONMENTS 10

REALTIME PERFORMANCE 11

PROCESSOR SUPPORT 11

QNX MOMENTICS DEVELOPMENT SUITE 12

PROFESSIONAL SERVICES 13

QNX NEUTRINO AT A GLANCE 14

Page 3: MICROKERNEL OPERATING SYSTEM PROVEN RELIABILITY ... and whitepapers/QSS/QNX_Neutrino... · QNX Software Systems 3 QNX NEUTRINO RTOS ® ® MICROKERNEL OPERATING SYSTEM THE MEDIUM IS

QNX Neutrino RTOS2

PROVEN RELIABILITY. MASSIVE SCALABILITY. UNPARALLELED PERFORMANCE.

MEMORY PROTECTED

CD-ROM FSYS

MIKROKERNEL

ETHERNET, SERIAL

FLASH FSYS TCP/IP UART APPLICATION

APPLICATION

MESSAGE-PASSING BUS

MEMORY PROTECTED

HAMANAGER

HTTPSERVER

PHOTONMICROGUI USB

DRIVER DEVELOPMENT KITS [DDKs]

COMMAND-LINE TOOLS

STATIC ANALYSIS

CODE COVERAGE

UML

MULTI-HOST

IDE WORKBENCH [ECLIPSE FRAMEWORK]

WINDOWS, SOLARIS, QNX NEUTRINO

INVOKE COMMAND-LINE TOOLS SUCH AS MAKE

BOARD SUPPORTPACKAGES [BSPs]

THIRD-PARTY TOOLS; e.g.THIRD-PARTY TOOLS; e.g.

PHOTON APP BUILDER

SYSTEM PROFILER

MEMORY ANALYSIS

APPLICATION PROFILER

SOURCE DEBUGGER

SYSTEM BUILDER

TARGET INFORMATION

JAVA CODE DEVELOPER

C/C++ CODE DEVELOPER

IDE TOOLS

QNX NEUTRINO RTOS: THE POWER OF A TRUE MICROKERNEL

QNX MOMENTICS INTEGRATED DEVELOPMENT SUITE QNX NEUTRINO RTOS

For over 20 years, developers have used QNX OS technology to build

systems of exceptional reliability and performance: medical instruments,

high-end routers, 9-1-1 call centers, in-car telematics devices, process

control applications – even systems on the International Space Station.

Small or large, simple or distributed, these systems share one thing in

common: an unmatched reputation for running 24 hours a day, 365

days a year, year after year.

How does QNX Neutrino make this possible? Simple. It’s a true microkernel

RTOS. In QNX Neutrino, only the most fundamental OS primitives

(e.g. signals, timers, scheduling) are handled in the kernel itself. All

other components – drivers, file systems, protocol stacks, user

applications – run outside the kernel as separate, memory-protected

processes. Fault resilience is built right in.

But just as important, all components communicate via a single,

well-defined form of communication: message passing. This message

passing forms a virtual "software bus" that lets you plug in, or plug out,

any component on the fly. Better yet, messages can flow transparently

from one node to another, providing seamless access to any resource,

anywhere on the network.

Using QNX Neutrino, you can:

Build self-healing systems – In QNX Neutrino, any component can fail

and be restarted, without damaging the microkernel or other components.

For instance, if a driver tries to access memory outside its process

container – a fatal error for most OSs – QNX Neutrino will cleanly terminate

the driver and reclaim all the resources that the driver was using. You

can even have the driver restarted automatically, using QNX Neutrino’s

high availability manager.

Use one OS for your entire product line – Thanks to QNX Neutrino's

exceptional modularity, you can easily reuse field-tested components –

drivers, applications, custom OS services – from one product to another.

In fact, you can build one set of component binaries, then deploy them

on a uniprocessor device, on an SMP system, or across a massive cluster

of processors. Low-end, high-end, or anything in between, you use just

one OS, one API, and one set of tools.

Upgrade systems without downtime – Since virtually any component can

be added or removed dynamically, your system can run nonstop, even

while being upgraded with new drivers, protocol stacks, or applications.

QNX Neutrino message passing forms a virtual software bus that lets youdynamically plug in – or plug out – whatever components your system requires.

Page 4: MICROKERNEL OPERATING SYSTEM PROVEN RELIABILITY ... and whitepapers/QSS/QNX_Neutrino... · QNX Software Systems 3 QNX NEUTRINO RTOS ® ® MICROKERNEL OPERATING SYSTEM THE MEDIUM IS

3QNX Software Systems

® ®QNX NEUTRINO RTOSMICROKERNEL OPERATING SYSTEM

THE MEDIUM IS THE MESSAGE PASSIn QNX Neutrino, message passing is more than a form of IPC; it is, in

fact, the fundamental mechanism that makes QNX Neutrino-based systems

so scalable and easy to design. For instance, it:

• automatically synchronizes the execution of cooperating components,

• eliminates the need to keep track of complicated queuing behavior,

• lets you partition a complex application into cleanly separated

building blocks that can be developed and tested individually,

• encourages the creation of well-formed, highly maintainable systems,

• flows freely across processor boundaries, allowing your applications

to transparently access services on remote nodes.

QNX message passing is also extremely efficient: each message pass

is a direct operation between the sender and receiver, requiring no

intermediate copying or secondary IPC to synchronize.

Best of all, there’s no need to deal with a complex messaging layer. In

fact, to exchange messages with services, applications can use industry-

standard POSIX function calls.

How does this work? In QNX Neutrino, any service-providing program

(e.g. a driver) can adopt a portion of the pathname space. Any application

can then connect to that driver simply by issuing a POSIX open() on the

pathname. The application will get a file descriptor in return, at which

point it can begin issuing POSIX file-descriptor calls – read(), write(),

lseek(), etc. – to access the driver’s services. These calls are then

transparently converted into messages by the underlying C library and

directed to the driver. To read some incoming data, for instance, an

application could issue a standard read(), and the library would

transparently convert the call into the appropriate read message. In

effect, an application takes advantage of message passing whenever it

uses a file-descriptor or file-pointer function.

This approach lets you:

Deploy serviceable systems – Because the pathname mechanism cleanly

decouples services from their client applications, systems become

inherently upgradable: any service can be replaced in the field, and

clients will locate the new service automatically.

Extend the OS for custom applications – QNX Neutrino provides a

resource manager framework that makes it easy for any service to hook into

the pathname space and handle requests from client programs. What’s

MICROKERNEL ARCHITECTURE: FLEXIBILITY BY DESIGN

AN INHERENTLY EXTENSIBLE ARCHITECTURESome vendors claim their OS is a “microkernel” just because it has a

small footprint. They’ve completely missed the point. A true microkernel

OS represents a fundamentally different approach to OS design, an

approach that offers not only superior reliability, but far greater flexibility

to address the industry-specific demands of your application.

In a microkernel OS, drivers, protocol stacks, and other system services

run outside the kernel as optional, user-space processes. As a result,

it’s easy to extend the OS with an industry- or application-specific service

– simply write the new service with the same intuitive tools and techniques

used for creating user applications. Unlike other OSs, there’s no need

to learn specialized kernel tools or to hire expensive kernel “gurus.”

As memory-protected user-space programs, custom OS services can’t

corrupt the microkernel. So you can extend the QNX Neutrino RTOS

without affecting its fundamental reliability. In fact, since the

microkernel never has to be modified, you have the assurance of using

the exact same microkernel binary lab-tested at QNX Software

Systems and field-tested in other customer installations. No other OS

architecture offers such a powerful mix of extensibility and reliability.

more, all system services, including drivers, are user-space processes that

can be developed like any standard application. As a result, it’s easy to

extend the OS with fundamentally new, purpose-specific capabilities.

Note that you can access the QNX messaging framework directly, using

three simple calls: MsgSend(), MsgReceive(), and MsgReply(). QNX

Neutrino also lets you work with traditional IPC mechanisms, such as

FIFOs, pipes, POSIX message queues, shared memory, and signals.

QNX NEUTRINORTOS

INDUSTRIALAUTOMATION

CONSUMER

NETCOM

AUTOMOTIVE

MEDICAL

COTS/MILITARY

Page 5: MICROKERNEL OPERATING SYSTEM PROVEN RELIABILITY ... and whitepapers/QSS/QNX_Neutrino... · QNX Software Systems 3 QNX NEUTRINO RTOS ® ® MICROKERNEL OPERATING SYSTEM THE MEDIUM IS

QNX Neutrino RTOS4

PROVEN RELIABILITY. MASSIVE SCALABILITY. UNPARALLELED PERFORMANCE.

POSIX – BRED IN THE BONESome RTOSs may claim POSIX compliance, but most offer only a fraction

of the POSIX APIs supported by QNX Neutrino. In fact, QNX Neutrino has

been engineered from the ground up for POSIX standards – POSIX is

“bred in the bone.” This approach eliminates the complex POSIX

adaptation layer used by other RTOSs, allowing you to achieve better

performance and lower memory costs.

QNX Neutrino complies with POSIX 1003.1-2001, including threads,

realtime extensions, and a host of other options (see below). As a

result, it’s very easy to port Linux, Unix, and other open source

programs – in most cases, you simply recompile the source and relink

with QNX Neutrino libraries. Moreover, experience shows that

programmers with Unix or Linux experience become productive almost

immediately in the QNX Neutrino environment.

Supported POSIX 1003.1-2001 options include:

BAR: Barriers

CS: Clock selection

CX: Extension to the ISO C standard

FSC: File synchronization

IP6: IPv6

MON: Monotonic clock

MPT: Memory protection

PIO: Prioritized input and output

PS: Process scheduling

RTS: Realtime signals extension

SEM: Semaphores

SHM: Shared memory objects

SIO: Synchronized input and output

SPI: Spin locks

SS: Process sporadic server

THR: Threads

TMO: Timeouts

TMR: Timers

TPI: Thread priority inheritance

TPP: Thread priority protection

TPS: Thread execution scheduling

TSA: Thread stack address attribute

TSF: Thread-safe functions

TSH: Thread process-shared synchronization

TSP: Thread sporadic server

TSS: Thread stack address size

DISTRIBUTED PROCESSINGWith QNX Neutrino, distributed processing is built in. So, to accessservices on remote nodes, your application doesn’t have to do anythingspecial. It simply sends the exact same messages used to access localservices, and the messages are transparently routed to the appropriatenode. The net effect? Remote resources – disks, NICs, protocol stacks,and so on – can all be accessed as if they were on the local machine.

QNX Neutrino messages flow freely across processor boundaries, allowing an application on anynode to transparently access resources on any other node.

Using QNX Neutrino’s distributed processing, you can:

Reduce hardware costs – With distributed processing, nodes can

share resources instead of duplicate them. For instance, if one node

has a large flash file system, other nodes don’t need to; they can simply

use that node’s flash memory instead. Likewise, if one node has a

TCP/IP stack, all other nodes can use that node as a TCP/IP gateway;

no need to configure multiple IP addresses.

Add compute power without adding development – To make more

processing power or physical interfaces available to your applications,

simply plug in another CPU card or machine into the network.

Applications on existing nodes can access the new system’s resources

without being recoded or redesigned.

io-GRAPHICS

MESSAGE BRIDGE

INTERNET

io-BLOCK

PROCESSMANAGER

io-BLOCKPROCESSMANAGER

io-AUDIO

io-CHAR

APPLICATION

APPLICATION

MESSAGE-PASSING BUS

io-NET

Applications and serversbecome network distributedwithout any special code.

You gain unified access toall remote hardware andsoftware resources.

Page 6: MICROKERNEL OPERATING SYSTEM PROVEN RELIABILITY ... and whitepapers/QSS/QNX_Neutrino... · QNX Software Systems 3 QNX NEUTRINO RTOS ® ® MICROKERNEL OPERATING SYSTEM THE MEDIUM IS

5QNX Software Systems

® ®QNX NEUTRINO RTOSMICROKERNEL OPERATING SYSTEM

Simplify the design of fault-tolerant clusters – Since QNX message

passing can make the location of any service fully transparent, issues

such as which service handles an application’s request, where that

service is located, and whether more than one service may process the

request (such as when a service is mirrored across two nodes for fault

tolerance or load balancing) can all be neatly abstracted from the

application.

Boost network throughput through redundant links – In QNX Neutrino,

messages can flow across multiple network links to significantly boost

fault tolerance or throughput, or both. For instance, if one link fails,

QNX Neutrino can automatically re-route data over one or more specified

links. Alternately, you can have QNX Neutrino load-balance network

traffic over all available links, resulting in greater throughput.

Work with any transport – Since QNX Neutrino’s distributing processing

operates above the transport layer, it works equally well across LANs,

backplanes, proprietary switch fabrics, and vehicle buses like CAN or MOST.

SYMMETRICMULTIPROCESSING (SMP)QNX Neutrino is the only commercial RTOS to support true symmetric

multiprocessing: any thread in any process can be scheduled to run on

any processor of an SMP board. In fact, with QNX Neutrino, you don’t

have to hardcode SMP awareness into your applications, drivers, or

protocol stacks. If a process is multithreaded, its threads will be

transparently scheduled onto the SMP board’s multiple CPUs.

THE POWER OF TRUE SMPAn SMP system consists of two or more tightly coupled processors that

share global resources such as memories and buses. In a true SMP

system, any processor can execute any thread, including kernel code,

application code, and interrupt service code. This symmetry, which

ensures that each processor is exploited to the fullest, is achieved

through identical processors and interconnects, combined with a well-

designed OS kernel. By offering true SMP, QNX Neutrino can offer an

immense performance boost to network elements, high-end image-

processing applications, multithreaded servers, and a variety of other

compute-intensive systems.

SMP for QNX Neutrino takes full advantage of concurrent software design byallowing multiple applications and system services (e.g. drivers, protocol stacks)to run in parallel on an SMP board.

DEVICE DRIVER

QNX NEUTRINO REALTIME SCHEDULER

MEMORY

HIGH-BANDWIDTH MEMORY BUS

FILESYSTEM TCP/IP HA

MANAGERPOSIXAPP

CPU

CACHE

CPU

CACHE

CPU

CACHE

CPU

CACHE

With QNX Neutrino, you can:

Use your SMP board of choice – Choose from a rich variety of

off-the-shelf SMP boards based on MIPS, PowerPC, and x86

processors.

Fine-tune performance using processor affinity – To optimize

processor cache usage, QNX Neutrino will always attempt to

dispatch a thread to the processor where it last ran, when

appropriate. To help optimize cache usage even further, QNX

Neutrino provides a processor affinity mask, which lets you “lock”

a thread to one or more specified processors.

Make the most of every processor – Because QNX Neutrino can

schedule any thread on any processor, all processors can be

utilized as fully as possible, ensuring the greatest possible

performance boost. And, unlike conventional OS kernels, the QNX

Neutrino microkernel doesn’t need large numbers of performance-

robbing code modifications to support SMP. The SMP microkernel

is, in fact, just a few kilobytes larger than the standard microkernel.

Build fault-tolerant clusters of immense processing power – By

combining these SMP capabilities with the distributed processing

provided by QNX Neutrino, you can easily construct massive, fault-

tolerant clusters that integrate hundreds of uniprocessor and SMP

systems. In fact, with QNX Neutrino, you have the unique ability to

target uniprocessor, SMP, and cluster systems using just one set of

application binaries.

Page 7: MICROKERNEL OPERATING SYSTEM PROVEN RELIABILITY ... and whitepapers/QSS/QNX_Neutrino... · QNX Software Systems 3 QNX NEUTRINO RTOS ® ® MICROKERNEL OPERATING SYSTEM THE MEDIUM IS

QNX Neutrino RTOS6

PROVEN RELIABILITY. MASSIVE SCALABILITY. UNPARALLELED PERFORMANCE.

QNX PHOTON MICROGUIOnly QNX Neutrino offers the QNX Photon microGUI®, a highly modular

windowing system that can bring professional, high-end graphics to the

smallest embedded device. Like QNX Neutrino, Photon starts with a tiny

microkernel and provides most of its services through optional, memory-

protected processes. The result: a fault-resilient and dynamically scalable GUI.

Unlike the limited graphics libraries provided by other RTOSs, Photon is

a true windowing system that lets you:

Build sophisticated multilayer displays – Photon offers high-end features

like off-screen rendering, video overlay, alpha-blending, chroma-key

substitution, and direct graphics mode. As a result, you can create flick-

er-free, multilayer displays that deliver a mix of graphics and live video

– perfect for dynamic navigation systems, set-top boxes with picture-

in-picture, etc.

Create a unique look-and-feel – Using a mechanism called widget

styles, you can customize the look-and-feel of buttons, menus, windows,

and other interface elements, either individually or globally. You can

even change styles at runtime for ultimate control over your system’s

user interface.

Display and input text in multiple languages, simultaneously – Photon

supports the Unicode standard, so your users can, for example, input

Chinese, Japanese, or Korean characters while the system displays text

in English – or virtually any other language.

Display high-quality fonts on any size display – Photon’s font manager

supports a variety of font formats, including TrueType and bitmap; it

also provides small-footprint stroke fonts for Asian languages. You can

scale fonts to any point size and display them using anti-alias technology

to create smooth, readable displays on LCDs and other low-res devices.

Plug in your own media format – Highly customizable, Photon’s media

player offers off-the-shelf support for a variety of formats, including CD

audio, MP3, MPEG-1 system stream, WAV, AIFF, IFF, AU, and others. Need

to support a proprietary media format? No problem. With Photon’s plug-in

architecture and high-level media API, you can easily integrate your

own multimedia components.

Choose your web browser – Photon supports Mozilla, a full-blown,

open-source web browser based on the Netscape 7 standard, as well as

browsers from third-party vendors.

Upgrade your GUI on the fly – In Photon, most GUI services (video

drivers, window managers, input drivers, etc.) run as plug-in, memory-

protected applications. So you can dynamically add, replace, or

upgrade virtually any part of your user interface. No need to reboot.

Create complete interfaces without writing a line of code – To simplify

GUI development, Photon supports PhAB™, a visual design tool that

lets you create complete user interfaces with point-and-click simplicity.

For more on PhAB, see the QNX Momentics® data sheet.

Translate your UI into multiple languages, with full Unicode support.

Creating applications for the PhotonmicroGUI is a snap when you use PhAB,the Photon Application Builder. Just pointand click to add or customize buttons,windows, menus, gauges, and other interface components.

Click to add any widget to yourapplication.

> PHAB: PHOTON APPLICATION BUILDER

Use built-in resource editors to quickly modify awidget’s look and behavior.

Attach callbacks that will auto-matically open windows, dialogs,and menus – no need to writethe “glue” that ties your interfacetogether.

Page 8: MICROKERNEL OPERATING SYSTEM PROVEN RELIABILITY ... and whitepapers/QSS/QNX_Neutrino... · QNX Software Systems 3 QNX NEUTRINO RTOS ® ® MICROKERNEL OPERATING SYSTEM THE MEDIUM IS

7QNX Software Systems

® ®QNX NEUTRINO RTOSMICROKERNEL OPERATING SYSTEM

DISK FILE SYSTEMSThe following file systems all support high-capacity IDE and SCSI disks:

QNX – Implements full POSIX semantics. Suitable for development hosts

and for embedded targets that employ disks or page-oriented NAND flash.

Linux and DOS – For seamless access to other partitions on a hard disk,

and for exchanging data with other hosts via removable media.

CD-ROM / DVD – Supports all relevant standards, including ISO9660,

Joliet, and Rock Ridge.

SPECIAL FILE SYSTEMSUse these file systems to extend the capabilities of other file systems:

Compression – Allows highly compressed files to be decompressed on

the fly. Compression density varies from 35% to 55% on executables

and over 95% on text. Use this file system to:

• dramatically reduce flash memory requirements

• reduce network load when accessing remote files via NFS or CIFS

Package – Uses an XML package definition for rapid installation and

uninstallation of software in the field.

NETWORK FILE SYSTEMSUse these file systems to transparently access files on Windows, Unix,

and Linux systems. Both CIFS and NFS are supported

TCP/IP NETWORKING In QNX Neutrino, networking services execute outside the kernel as separate,

memory-protected processes, so you can start, stop, and upgrade any

network driver or protocol on the fly. Moreover, your application can access

any networking service via the same, standard POSIX API used to access

all other services. You can also:

• combine any number of network protocols, including TCP/IP and

QNX distributed processing,

• easily create multiple virtual networks (VLANs) by running multiple

instances of a TCP/IP stack on the same physical interface,

• integrate a rich complement of third-party networking code based

on POSIX and BSD APIs.

FILE SYSTEMSIn conventional OSs, file systems are bound to the kernel. But in QNX

Neutrino, file systems execute outside the kernel, in memory-protected

user space. As a result, you can start, stop, or upgrade file systems on

the fly, without having to reboot.

What’s more, multiple file systems – disk, flash, CD-ROM, CIFS, and so

on – can run concurrently on the same target. They can even work in

concert to extend each other’s capabilities. The Compression file system,

for instance, can work with a flash file system to dramatically reduce the

flash memory requirements of your target.

FILE SYSTEMS AT A GLANCE:

EMBEDDED FILE SYSTEMSImage – Supports execute-in-place (XIP) to reduce RAM requirements

and to provide extremely fast booting for instant-on applications.

RAM – For systems that require fast, temporary, read-write storage.

NOR flash – Provides automatic fault recovery, background erase and

reclaim, and full preemption to ensure fast realtime response. All writes

are ordered to ensure file system integrity.

NAND flash – Allows standard block file systems (QNX, Linux, DOS) to

run directly on top of raw NAND parts. Supports dynamic block mapping

and reclaim, with full ECC error correction to extend the life of the part.

NOTE: The NOR and NAND file systems are both full-featured, supporting

hierarchical directory structures, symbolic links, and full POSIX permissions.

EMBEDDED

ImageROM/FlashExecute-in-place

RAMTemporarystorage

NOR flashLinear flash

NAND flashPaged flash

DISK

QNXPOSIX

LinuxExt2

DOSFAT 12, 16, 32

CD-ROMISO9660, Joliet

SPECIAL

CompressionDecompressionon the fly

PackageField updates and rollbacks

NETWORK

NFSUnix connectivity

CIFSMicrosoft connectivity

Page 9: MICROKERNEL OPERATING SYSTEM PROVEN RELIABILITY ... and whitepapers/QSS/QNX_Neutrino... · QNX Software Systems 3 QNX NEUTRINO RTOS ® ® MICROKERNEL OPERATING SYSTEM THE MEDIUM IS

QNX Neutrino RTOS8

PROVEN RELIABILITY. MASSIVE SCALABILITY. UNPARALLELED PERFORMANCE.

CHOOSE THE STACK THAT SUITS YOUR SYSTEMQNX Neutrino offers the following TCP/IP stacks:

NetBSD TCP/IP stack – Supports forwarding, routing sockets, broadcast

and multicast, ARP, ICMP, and IGMP, as well as CIFS, DHCP, DNS, NFS,

PPP, PPPoE, UDP, and an embedded web server. To develop applications

for this stack, programmers use the industry-standard BSD socket API.

Enhanced NetBSD stack with IPsec and IPv6 – Includes everything in

the standard stack, plus functionality targeted at the new generation

of mobile and secure communications. Provides full IPv6 and IPsec

support through the KAME extensions, as well as support for VPNs over

IPsec tunnels. Also includes optimized forwarding code for additional

performance.

Tiny TCP/IP stack for memory-constrained systems – Despite its

small footprint (<80k), this stack provides complete support for IP, TCP,

and UDP over Ethernet, PPP, and PPPoE interfaces. To develop applications,

developers use the BSD socket interface; in fact, developers can switch

between the tiny stack and NetBSD stacks without having to recompile code.

SIMPLIFIED DRIVER DEVELOPMENTQNX Neutrino provides off-the-shelf drivers for an immense variety of

boards and peripherals. If, however, you need to write a driver for your

own custom hardware, you’ll find the task remarkably easy, thanks to

QNX Neutrino’s resource manager framework.

This framework features a library that lets your driver easily hook into

the system’s pathname space and, as a result, handle requests from

client programs. Mind you, this framework isn’t just for device drivers.

By simplifying the setup and teardown of communication channels, it

helps speed the development of any service that must communicate

with multiple client applications. For instance, if a client wants to

establish a connection with any service, it only has to invoke one call:

the POSIX open() function.

With QNX Neutrino, you can:

Use DDKs to speed driver development – To further simplify driver

development, the QNX Momentics development suite provides driver

development kits (DDKs) for a variety of device types, including audio,

character, graphics, input, networking, printer, and USB. The kits

include detailed documentation, ready-to-customize source, and a

framework that implements all higher-level, device-independent code

in libraries – the only code you have to focus on is the hardware-

specific code for your device.

Debug drivers using intuitive, source-level tools – Since drivers and

other resource managers run as standard, user-space processes, you

can debug them using the same, tightly integrated tools that the QNX

Momentics development suite provides for regular applications. There’s

no need for kernel debuggers, which can halt the entire system and

mask bugs as a result.

Test new drivers without rebooting – You can test changes to driver

code without system resets and without even starting a new debug session:

simply recompile and restart the driver. And because all drivers run as

memory-protected processes, you can safely test and debug them on a

development host running QNX Neutrino – start testing drivers before

your target system is ready.

Create multithreaded services with less code – To make multithreaded

drivers smaller, simpler, and easier to write, the resource manager

framework includes a thread-pool library that automatically creates

and removes threads in response to system load. A driver containing

such a thread pool is inherently SMP-capable and can scale effortlessly

on multiprocessor systems.

OPEN STAT CLOSE

CUSTOMDRIVER

Device type not supportedby existing DDK.

DEVICE- AND HARDWARE-SPECIFIC CODE

RESOURCE MANAGER FRAMEWORKREAD WRITE DEVCTL ...OPEN STAT CLOSE

DDKDRIVER

MICROKERNEL

DEVICE-TYPE CODE

HARDWARE-SPECIFIC CODE

RESOURCE MANAGER FRAMEWORK

Device types supported by DDKs:audio, graphics, input, printer,networking, character, and USB.

READ WRITE DEVCTL ...

Code that can be used as is

Code that needs to be modified or written

Code that may need to be modified

Driver development kits (DDKs) reduce the effort of writing drivers to a minimum – inmany cases, most of your work is already done.

Page 10: MICROKERNEL OPERATING SYSTEM PROVEN RELIABILITY ... and whitepapers/QSS/QNX_Neutrino... · QNX Software Systems 3 QNX NEUTRINO RTOS ® ® MICROKERNEL OPERATING SYSTEM THE MEDIUM IS

Inspect the system’s properties atthe time events were captured.

Search for specific event types andjump directly to any event.

Zoom in on a time range, selectprocesses of interest, and createcustom views.

View event details at a glance,including duration, owner, and type.

Together, the instrumented kernel and thesystem profiler help you quickly pinpointtiming errors, logic flaws, and a variety ofother performance-degrading hotspots.

> SYSTEM PROFILER

9QNX Software Systems

® ®QNX NEUTRINO RTOSMICROKERNEL OPERATING SYSTEM

INSTRUMENTED MICROKERNELFINE-TUNE SOFTWARE BEHAVIOR – IN THE LAB ANDIN THE FIELDUsing the instrumented microkernel, you can resolve timing conflicts,

pinpoint deadlocks, root out logic flaws, detect hidden faults in software

and hardware, and fine-tune the performance of your application –

whether it’s running on a uniprocessor or multiprocessor system.

The instrumented microkernel can monitor, record, and time-stamp

every system event, including kernel calls, interrupts, messages, thread

states, and scheduling activities. It is, in effect, a software logic analyzer

for your entire system: if something goes wrong, the kernel will help you

pinpoint when the event occurred, which software modules were

involved, what those modules were doing, and, more importantly, how

to interpret the event.

A drop-in replacement for the standard QNX Neutrino microkernel, the

instrumented microkernel is nonintrusive, so you don’t have to modify

your code. Better yet, you can use it in live production systems, since

it’s only marginally slower than the regular microkernel. Performance is

affected only when events are being traced, but even then, you can perform

event logging dynamically and filter information at various levels to

ensure the least possible impact on your system.

VISUALIZE SYSTEM EVENTS TO QUICKLY PINPOINT PROBLEMSWhile the instrumented microkernel can generate an enormous amount

of system information, it also gives you precise control over which

events are recorded and when, so you can focus on areas of interest.

And to make interpretation of this data even simpler, the kernel works

hand-in-hand with the QNX Momentics system profiler, which lets you

graphically “zoom in” on areas of interest and view complex interactions

at a glance.

CREATE YOUR OWN CUSTOM FILTERSIf the stock event filters provided by the instrumented microkernel don’t

suit the behavior you want to capture, no problem: the kernel supports

dynamic, user-defined filters for complex, application-specific conditions.

Your applications can also inject custom events into the trace system

to proactively influence the event-collection process.

Page 11: MICROKERNEL OPERATING SYSTEM PROVEN RELIABILITY ... and whitepapers/QSS/QNX_Neutrino... · QNX Software Systems 3 QNX NEUTRINO RTOS ® ® MICROKERNEL OPERATING SYSTEM THE MEDIUM IS

QNX Neutrino RTOS10

PROVEN RELIABILITY. MASSIVE SCALABILITY. UNPARALLELED PERFORMANCE.

HIGH AVAILABILITY MANAGERDRAMATICALLY REDUCE MTTRQNX Neutrino’s approach to high availability embodies a simple principle:

it takes far less time to restart a single component than to reset the

entire system. For instance, a driver or protocol stack that experiences

a problem can be immediately terminated and restored, often in just a

few milliseconds; no need for a system reboot. This fine-grained

approach to fault isolation is precisely why, compared to other operating

systems, QNX Neutrino lets you achieve dramatically faster Mean Time

to Repair (MTTR).

What’s more, you can extend QNX Neutrino’s inherent fault isolation

with the High Availability (HA) Manager, a “smart watchdog” that lets your

system recover from faults automatically.

The HA Manager provides:

Instant fault notification – The HA Manager employs heartbeating to

monitor the progress of any component, allowing faults to be detected

as early as possible. If the HA Manager detects a certain condition or

fault, it can instantly and automatically send an alarm to other components.

Customized failure recovery – Using the HA Manager library, your

application can tell the HA Manager exactly what recovery actions to

take, and in what order, should an error condition occur.

Instant reconnections – The HA manager also provides a client-recovery

library that lets your system instantly reestablish broken connections

should a component fail. The library acts as a drop-in enhancement for

many standard libc I/O operations.

Postmortem analysis – If a process faults, the HA Manager can generate

a full memory dump for postmortem analysis. Viewing this dump file,

you can immediately pinpoint which line of code caused the error and

inspect data variables to determine exactly what happened.

As a self-monitoring manager, the HA Manager is resilient to internal

failures. If it stops abnormally for any reason, it can immediately and

completely reconstruct its own state.

JAVA ENVIRONMENTSQNX Neutrino provides first-class Java support, including two runtime

environments based on IBM’s J9 Java virtual machine (JVM):

WebSphere Embedded Environment – Certified Java Powered runtime

environment compatible with Java 2 Micro Edition (J2ME).

WebSphere Custom Environment – Modular, configurable environment

with pre-defined subsets of Java 2 Standard Edition (J2SE) specifications

and support for custom subsets and supersets.

Both environments are optimized for QNX Neutrino, and both offer JIT

compilation, generational garbage collection, and very fast bytecode

interpretation.

SEAMLESS ACCESS TO ADVANCED OS SERVICESIn conventional RTOS environments, Java applications exist as second-

class citizens. But in QNX Neutrino, Java applications can access the

same advanced services available to native applications. For instance:

Full access to distributed processing and SMP – Like any native QNX

Neutrino application, a Java application can transparently access any

system service on a remote node. And because Java threads map to QNX

Neutrino kernel threads, the threads of multithreaded Java applications

can be automatically scheduled onto the multiple processors of an SMP

board. This thread mapping also helps ensure that Java applications

execute in order of their priority.

Concurrent, memory-protected virtual machines – In QNX Neutrino,

each JVM can run in the safety of its own memory-protected virtual

address space. In fact, multiple memory-protected JVMs can run

concurrently, allowing you to run multiple Java applications, not just

multiple applets.

Full access to native windowing system – Unlike the limited graphics

libraries provided by conventional RTOSs, the QNX Photon microGUI

allows multiple JVMs and native applications to share the screen

simultaneously. Better yet, Java applications can share the same

look-and-feel as native Photon applications. You can also deploy a

Java-only GUI, if desired.

Page 12: MICROKERNEL OPERATING SYSTEM PROVEN RELIABILITY ... and whitepapers/QSS/QNX_Neutrino... · QNX Software Systems 3 QNX NEUTRINO RTOS ® ® MICROKERNEL OPERATING SYSTEM THE MEDIUM IS

11QNX Software Systems

® ®QNX NEUTRINO RTOSMICROKERNEL OPERATING SYSTEM

Nested interrupts – By providing support for nested interrupts, along

with a fixed upper bound on interrupt latency, QNX Neutrino lets your

system handle high-priority interrupts first, and within a predictable

timeframe.

RICH PROCESSOR SUPPORTPICK THE BEST CPU FOR THE JOBUsing the QNX Neutrino RTOS, you can target systems based on a wide

variety of ARM, MIPS, PowerPC, SH-4, StrongARM, XScale, and x86

processors. In fact, QNX Neutrino provides functions and macros that

let you write processor-independent drivers and applications. In some

cases, you simply need to specify a new processor target to generate

binaries for a different processor – you can even build code for multi-

ple processor families simultaneously. As a result, you can debug and

test your applications before the target processor is chosen or target

different processors to achieve a variety of price-performance points.

We’re constantly adding support for new processors and reference

boards; visit http://www.qnx.com for an up-to-date list.

INDEPENDENT STUDY RANKS QNX NEUTRINO AS PERFORMANCE LEADER

In an independent evaluation of four embedded OSs,Dedicated Systems Experts awarded QNX Neutrino the highestmarks for both realtime performance and OS architecture: 9out of a possible 10. In one particularly rigorous test, QNXNeutrino successfully serviced a billion interrupts generated atnine-microsecond intervals. Not a single interrupt wasdropped.

QNX NEUTRINO RTOSInstallation and configuration

RTOS Architecture

Performance

Source: Dedicated Systems Experts

8

9

PROVEN REALTIME PERFORMANCEACHIEVE PREDICTABLE RESPONSE, EVEN IN COMPLEX SYSTEMSWith its fully preemptible microkernel and priority-based preemptive

scheduler, QNX Neutrino delivers response times that are both extremely

fast and highly predictable. High-priority threads can meet their deadlines

on time, every time, even under heavy system load.

QNX Neutrino offers superior realtime performance through:

Lightning-fast interrupt latencies and context switches – With context

switches of about 600 nanoseconds on processors like the Motorola

PowerPC 7450, QNX Neutrino can squeeze the fastest possible response

times from your underlying hardware.

Distributed priority inheritance – In QNX Neutrino, drivers, file systems,

and other services can execute at the priority of the client application

requesting the service, even if the client resides on another node. This

message-driven priority inheritance ensures that the work being done

for a low-priority client can always be preempted by a request from a

higher-priority client. Priority inversion is eliminated.

Freedom to mix and match scheduling methods – QNX Neutrino not

only offers multiple scheduling algorithms (adaptive, FIFO, round robin,

sporadic), but also lets you assign these algorithms on a per-thread

basis. You aren’t forced into assigning one algorithm to all threads on

a node.

Guaranteed CPU availability for hard deadlines – Using sporadic

scheduling, you can set a capped limit on the execution time of threads

within a given time period. As a result, these threads are free to service

irregular (aperiodic) events without jeopardizing the hard deadlines of

other, longer-running threads and processes. This algorithm is particularly

useful when Rate Monotonic Analysis (RMA) is being performed on a

system that services both periodic and aperiodic events.

Automatic synchronization of system components – The synchronization

provided by QNX Neutrino’s message passing inherently simplifies the

task of modeling realtime activities – activities that, in many OSs, have to

be managed by two-level scheduling techniques with higher overhead.

9

Page 13: MICROKERNEL OPERATING SYSTEM PROVEN RELIABILITY ... and whitepapers/QSS/QNX_Neutrino... · QNX Software Systems 3 QNX NEUTRINO RTOS ® ® MICROKERNEL OPERATING SYSTEM THE MEDIUM IS

QNX Neutrino RTOS12

PROVEN RELIABILITY. MASSIVE SCALABILITY. UNPARALLELED PERFORMANCE.

QNX MOMENTICS INTEGRATEDDEVELOPMENT SUITEComprehensive yet simple to use, QNX Momentics® Professional Edition isa multi-language, multi-host, multi-target development suite that candramatically accelerate your QNX Neutrino development project, nomatter how large or small. QNX Momentics includes:

• tightly integrated tools for memory analysis, application profiling, trace analysis, version control, remote diagnostics, GUI generation, and more,

• time-saving wizards that let you create new projects, optimize targetimages, and launch remote debug sessions with point-and-click simplicity,

• a rich complement of board support packages, libraries, and driversource kits

With QNX Momentics, you can code in C, C++, Embedded C++, or Java;develop on Windows, Solaris, or QNX Neutrino hosts; and target ARM,MIPS, PowerPC, SH-4, StrongARM, XScale, and x86 processors – allfrom the same IDE. You can even work with a mix of languages andprocessor architectures simultaneously.

You’ll find QNX Momentics remarkably easy to learn, since all of thetools in its IDE share the same user interface. Moreover, the IDE is builton the open, extensible Eclipse framework, so you can easily build yourown plug-in tools or add plug-ins from a variety of third-party toolsvendors. Either way, the new tools can integrate seamlessly with existingtools in the IDE.

> QNX MOMENTICS INTEGRATED DEVELOPMENT SUITE

QNX Momentics offers a suite of visualization tools to help you analyzeand fine-tune your system’s performance.

The target system information tool provides live monitoring of threadattributes, CPU usage, memory usage, open file descriptors, blockingrelationships, and a wealth of other information.

The memory analysis tool lets youquickly detect overruns, underruns,invalid deallocations, and othercommon errors.

The application profiler lets youanalyze processor usage for multipleprocesses and multiple targets, as well as for shared libraries. You can perform both live andpostmortem profiling.

Page 14: MICROKERNEL OPERATING SYSTEM PROVEN RELIABILITY ... and whitepapers/QSS/QNX_Neutrino... · QNX Software Systems 3 QNX NEUTRINO RTOS ® ® MICROKERNEL OPERATING SYSTEM THE MEDIUM IS

13QNX Software Systems

® ®QNX NEUTRINO RTOSMICROKERNEL OPERATING SYSTEM

QNX Momentics comes with:

Code editors for C, C++, Java – The editors offer standard features

like cut-and-paste, commenting, and language-specific indentation,

as well as advanced features like code completion, code templates,

context-sensitive help, and an outline view that lets you jump directly

to any declaration in your project.

Source debugger – Lets you debug multiple processes simultaneously,

even if they’re written in multiple languages and distributed across

multiple heterogeneous CPUs. The debugger can also dynamically

attach to running processes, perform postmortem analysis of core

dump files, and debug multithreaded applications – track each thread

independently and trace control from thread to thread.

System builder – Takes the guesswork out of creating boot images and

custom flash file system images for your target. The system builder

includes an item browser to help you quickly select image components

and a system optimizer that tracks dependencies and makes shared

libraries as small as possible.

Target system information tool – Provides an enormous amount of

system and process-state information, live or postmortem. You can

view environment settings, thread attributes, signal states, memory

maps, file descriptors, blocking relationships, as well as CPU and

memory usage for each process, all in one intuitive display.

Application profiler – Lets you quickly pinpoint inefficient code and

algorithms. The profiler supports both statistical profiling for nonintrusive

measurement and instrumented profiling for accurate execution counts.

It can also drill down to the source-line level, showing which lines consume

the most CPU.

Memory analysis tool – Graphically displays the memory usage of your

programs and lets you catch errors such as overruns, underruns,

invalid use of memory, and freeing the same memory twice.

System profiler – Works with the instrumented kernel to help you analyze

your system as a whole. Provides a variety of event filtering and display

options to help you “zoom in” on performance-degrading hotspots and

view complex interactions at a glance.

PhAB visual application builder – Lets you create sophisticated

graphical user interfaces with point-and-click simplicity.

QNX PROFESSIONAL SERVICESAt QNX Software Systems, we're committed to helping you develop reliable,

competitive products in the shortest timeframe possible. That's why we

offer a comprehensive suite of value-added services to help you in every

stage of your project, from design to maintenance. For instance, the

engineers in our professional services organization can provide:

• Custom board support packages (BSPs)

• Custom drivers

• Consulting and architectural review services

We also provide expert, hands-on training on a variety of topics: writing

drivers, programming with threads, customizing flash file systems,

and more. And if you can’t come to one of our training centers, no

problem: we can come to you for onsite training.

BUILT FOR EMBEDDED DEVELOPERS The QNX Neutrino RTOS has everything you need to develop reliable,

scalable, high-performance embedded systems: a fault-resilient

microkernel architecture... dynamic upgradability... distributed

processing... symmetric multiprocessing... a feature-rich GUI...

proven realtime response... POSIX-based portability... support for a

wide range of processors and hardware... a comprehensive, yet easy-

to-use IDE – all delivered by one of the most service-conscious,

customer-responsive companies in the business. Contact us today to

find out how QNX Neutrino can bring unprecedented reliability,

scalability, and performance to your next project.

ABOUT QNX SOFTWARE SYSTEMSFounded in 1980, QNX Software Systems is the industry leader in

realtime, microkernel OS technology. The inherent reliability, scalable

architecture, and proven performance of the QNX Neutrino RTOS make

it the most trusted foundation for future-ready applications in the

networking, automotive, industrial, and smart device markets.

Companies worldwide like Cisco, Ford, Johnson Controls, Siemens, and

Texaco depend on the QNX technology for their mission- and life-critical

applications. Headquartered in Ottawa, Canada, QNX Software Systems

maintains offices in North America, Europe, and Asia, and distributes

its products in more than 100 countries worldwide.

Page 15: MICROKERNEL OPERATING SYSTEM PROVEN RELIABILITY ... and whitepapers/QSS/QNX_Neutrino... · QNX Software Systems 3 QNX NEUTRINO RTOS ® ® MICROKERNEL OPERATING SYSTEM THE MEDIUM IS

PROVEN RELIABILITY. MASSIVE SCALABILITY. UNPARALLELED PERFORMANCE.

FOR OVER TWENTY YEARS, QNX OS

TECHNOLOGY HAS HELPED DEVELOPERS

CREATE THE WORLD'S MOST RELIABLE

REALTIME APPLICATIONS – EVERYTHING

FROM LIFE-CRITICAL MEDICAL

INSTRUMENTS AND IN-CAR TELEMATICS

PRODUCTS TO MASSIVELY DISTRIBUTED

CONTROL SYSTEMS. AND NOW, THE

WORLD’S MOST RELIABLE RTOS ALSO

SUPPORTS THE MOST ADVANCED TOOLS.

QNX SOFTWARE SYSTEMS LTD.

QNX NEUTRINO AT A GLANCEMICROKERNEL ARCHITECTURE

Dynamically upgradable services and applicationsFine-grained fault isolation and recoveryMessage-passing design for modular, well-formed systems

DISTRIBUTED PROCESSINGTransparent access to remote resourcesSimplified design of fault-tolerant clusters

SMP MICROKERNELTrue SMP on MIPS, PowerPC, and x86Automatic scaling of multithreaded applications

INSTRUMENTED MICROKERNELSystem-wide performance analysis and optimizationFast detection of timing conflicts, hidden faults, etc.

QNX PHOTON MICROGUICustomizable look-and-feelSophisticated multilayer displaysExtensible multimedia framework

PROTOCOL STACKSNetBSD (IPsec, IPv6) and tiny TCP/IP stacks

FILE SYSTEMSImage, RAM, Flash, QNX, Linux, DOS, CD-ROM, DVD,NFS, CIFS, Compression, Package

DEVICE DRIVERSAudio, character, disk, graphics, input, networking, parallel, printer, serial, USB

HIGH AVAILABILITY MANAGERHeartbeating for early fault detectionIntelligent restart of faulty components

JAVACertified Java powered runtime environmentJava applications have full access to OS services

PREDICTABLE REALTIME PERFORMANCEPreemptive scheduler with choice of scheduling methodsDistributed priority inheritance

POSIX SUPPORTPOSIX 1003.1-2001, with threads and realtime extensions

PROCESSOR SUPPORTARM, MIPS, PowerPC, SH-4, StrongARM, XScale, x86

QNX MOMENTICS DEVELOPMENT SUITEGraphical IDE, BSPs, DDKs, and GNU toolsMulti-host, multi-language, multi-target development

Page 16: MICROKERNEL OPERATING SYSTEM PROVEN RELIABILITY ... and whitepapers/QSS/QNX_Neutrino... · QNX Software Systems 3 QNX NEUTRINO RTOS ® ® MICROKERNEL OPERATING SYSTEM THE MEDIUM IS

© February 2003, QNX Software Systems Ltd. All rights reserved. QNX, Momentics, Neutrino, Photon microGUI, and “Build a more reliable world” are registered trademarks in certain jurisdictions, and PhAB is a trademark, of QNX Software Systems Ltd. All othertrademarks and trade names belong to their respective owners. Printed in Canada. 301627

CONTACT QNXCORPORATE HEADQUARTERS175 Terence Matthews Crescent Ottawa, Ontario Canada, K2M 1W8

NORTH AMERICAt: +1 800 676-0566f: +1 613 591-3579

INTERNATIONALt: +1 613 591-0931f: +1 613 591-3579

[email protected]

QNX SOFTWARE SYSTEMS LTD.

QNX® NEUTRINO® RTOSMICROKERNEL OPERATING SYSTEM

PROVEN RELIABILITY. MASSIVE SCALABILITY. UNPARALLELED PERFORMANCE.