Partition inheritance

Updated: April 19, 2023

Whenever a server thread in the standard QNX Neutrino send-receive-reply messaging scheme receives a message from a client, the OS considers the server thread to be working on behalf of the client. So QNX Neutrino runs the server thread at the priority of the client. In other words, threads receiving messages inherit the priority of their sender.

With the thread scheduler, this concept is extended; we run server threads in the partition of their client thread while the server is working on behalf of that client. So the receiver's time is billed to the sender's scheduler partition.

What about any threads or processes that the server creates? Which partition do they run in?

Note: If you don't want the server or any threads or processes it creates to run in the client's partition, set the _NTO_CHF_FIXED_PRIORITY flag when the server creates its channel. For more information, see ChannelCreate() in the QNX Neutrino C Library Reference.
Figure 1. Server threads temporarily join the partition of the threads they work for.
Note: Send-receive-reply message-passing is the only form of thread communication that automatically makes the server inherit the client's partition.

Pulses don't inherit the sender's partition. Instead, their handlers run in the process's pulse-processing partition, which by default is the partition that the process was initially created in. You can change the pulse-processing partition with the SCHED_APS_JOIN_PARTITION command to SchedCtl(), specifying the process ID, along with a thread ID of -1.