QNX is a realtime operating system that provides multitasking, multiuser, networking, message passing, preemtive scheduling, fast context-switching and so on services. Moreover, QNX achieves these capabilities with a POSIX standar API. Other important feature is modularity allowing QNX be scaled to very small sizes for embedded system or scaled for large systems (workstations). So, this chapter describes the QNX v6 realtime operating system features.
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:
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.
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).
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.