Chapter 11. QNX

Table of Contents
Architecture overview
Hardware characteristics
Process management
Memory management
Inter-Process communication
Time and timers
Driver programming
Quality of Service
Trace and debug

Architecture overview

The following figure shows the QNX architecture:

As shown in figure, the QNX architecture consists of the small Neutrino microkernel managing a group of cooperating processes. The most important one is process manager (explained after) and the other processes are, for example, GUI manager, nerwork manager, devices manager, shared libraries and so on. Moreover, it is important to note that there is a module called procnto that consists of the Neutrino microkernel and process manager and that, this module, is required for all runtime systems.

Now, the most importants modules are presented:

Neutrino Microkernel

The QNX microkernel, known as Neutrino, is an implementation of the core POSIX together with the fundamental message passing services. The POSIX features that are not implemented in the microkernel are provided by optional processes and shared libraries.

Neutrino provides a few fundamental services:

  • Thread services: Neutrino provides the POSIX thread creation primitives.

  • Signal services: Neutrino provides the POSIX signal primitives.

  • Message passing services: Neutrino handles the routing of all messages between all threads through the whole system.

  • Synchronization services: Neutrino provides the POSIX thread synchronization primitives.

  • Scheduling services: Neutrino schedules threads using the various POSIX realtime scheduling algorithms.

  • Timers services: Neutrino provides the set of POSIX timer.

Process Manager

The process manager is capable of creating multiple POSIX processes (each of which may contain multiples POSIX threads). Its main areas of responsability include:

  • Process management: It manages process creation, destruction, and process attributes such us user ID and group ID.

  • Memory management: It manages memory protection, shared libraries, and POSIX shared memory primitives.

  • Pathname management: It manages the pathname space (mountpoints).

Message-based Interprocess Comunication

When several threads run concurrently, as in typical realtime multitasking environments, the operating system must provide mechanisms to allow them to communicate with each other. This mechanism, called Interprocess Comunication, uses a message passing as its fundamental principle.

Message passing not only allows processes to pass data to each other, but also provides a mechanism to sinchronize the execution of several processes.