Processes

As we stated in the Overview chapter, the architecture of the QNX Neutrino RTOS
consists of a small microkernel and some number of cooperating processes.
We also pointed out that your applications should be written the same way—as a set of cooperating processes.

In this chapter, we'll see how to start processes (also known as creating processes) from code, how to
terminate them, and how to detect their termination when it happens.

Process creation
The process manager component of procnto is responsible for process creation. If a process wants to create another process, it makes a call to one of the process-creation functions, which then effectively sends a message to the process manager.

Detecting process termination
In an embedded application, it's often important to detect if any process terminates prematurely and, if so, to handle it.

Stack allocation
Each thread has its own stack that you can allocate yourself or have the system manage.

Process privileges
In systems where security is important, applications should run with the fewest privileges possible. Doing this helps reduce the impact of possible compromises and can also help lower the privilege escalation attack surface of the device.