To provide realtime performance with guarantees against overloading, QNX Neutrino introduced adaptive partitioning.
Rigid partitions work best in fairly static systems with little or no dynamic deployment of software.
In dynamic systems, static partitions can be inefficient.
For example, the static division of execution time between partitions can waste CPU time and introduce delays:
- If most of the partitions are idle, and one is very busy, the busy partition doesn't
receive any additional execution time, while background threads in the other partitions waste CPU time.
- If an interrupt is scheduled for a partition, it has to wait until the partition runs.
This can cause unacceptable latency, especially if bursts of interrupts occur.
Note:
You can introduce adaptive partitioning without changing—or even recompiling—your
application code, although you do have to rebuild your system's OS image.
An adaptive partition is a set of threads that work on a common or related goal or activity.
Like a static partition, an adaptive partition has a budget allocated to it that guarantees
its minimum share of the CPU's resources.
Unlike a static partition, an adaptive partition:
- isn't locked to a fixed set of code in a static partition;
you can dynamically add and configure adaptive partitions, as required
Note:
There's a limit to the number of partitions.
For the thread scheduler, there's a maximum of eight scheduler partitions because for every
scheduling operation, the thread scheduler must examine every partition before it can pick a thread on
which to run.
That may occur 50000 times per second on a 700 MHz x86 (i.e., a slow machine).
So it's important to limit the number of scheduler partitions to keep the scheduler overhead to a minimum.
- behaves as a global hard realtime thread scheduler under normal load, but can still provide minimal interrupt latencies even
under overload conditions
- maximizes the usage of the CPU's resources. In the case of the thread scheduler, it distributes a partition's unused budget
among partitions that require extra resources when the system isn't loaded.