The adaptive partitioning thread scheduler is an optional thread scheduler that lets you
guarantee minimum percentages of the CPU's throughput to groups of threads, processes, or
applications. The percentage of the CPU allotted to a partition is called a
budget.
The thread scheduler was designed on top of the core QNX Neutrino RTOS architecture to primarily
solve two problems in embedded systems design:
- to function properly under fully loaded conditions
- to prevent unimportant or untrusted applications from monopolizing the system
We call our partitions adaptive because their contents are dynamic:
- You can dynamically launch an application into a partition.
- Child threads and child processes automatically run in the same partition as their parent.
- By default, when you use the standard QNX Neutrino send-receive-reply messaging, message
receivers automatically run in the partition of the message sender while they're processing
that message. This means that all resource managers, such as drivers and filesystems,
automatically bill CPU time (except overhead) to the budget of their clients.
You can control adaptive partitioning from the command line with the
aps
utility (see the Utilities Reference), or from a program with the
SchedCtl() or SchedCtl_r()
function (see the QNX Neutrino C Library Reference).
Note:
Before you call SchedCtl(), ensure that you initialize all the members of the
data structure that you pass to it.
You can use the APS_INIT_DATA() macro to do this.