This chapter includes:
As described in the Adaptive Partitioning chapter of the System Architecture guide, a partition is a virtual wall that separates competing processes or threads.
Partitions let the system designer allocate minimum amounts of system resources to each set of processes or threads. The primary resource considered is CPU time, but can also include any shared resource, such as memory and file space (disk or flash).
QNX Neutrino adaptive partitioning currently supports only the budgeting of CPU time via the thread scheduler.
Traditional partitions are static and work optimally when there's little or no dynamic deployment of software; in dynamic systems, static partitions can be inefficient.
Adaptive partitions are more flexible because:
You can introduce adaptive partitioning without changing — or even recompiling — your application code, although you do have to rebuild your system's OS image.
Are partitions “box-like”? No, they're better. Many competing resource partitioning systems take their model from CPU virtualization, where the objective is to try to divide a computer into a set of smaller computers that interact as little as possible (into a number of “boxes”). This approach is not very flexible; every thread, process, and byte of memory is in exactly one box, and it can never move. Adaptive partitioning takes a much more flexible view.
To begin, QNX partitions are adaptive because:
As a result, adaptive partitions aren't boxes; they are much more powerful. In addition to being adaptive, the partitions let you easily model the fundamentally different behavior of CPU time when viewed as a resource.
|Use a partition to encapsulate wild processes. You can create an application partition for one or more processes that potentially run on high priorities. Then, start the potentially problematic application(s) inside that partition so that when a situation like this arises, the rest of the system will continue to function.|
An adaptive partition is a named set of rules. The rules are selected to control the global resource behavior of the system. When a process or thread is associated with a particular partition (scheduler), then its actions are governed by the rules of that partition at that time.
For example, adaptive partitioning is similar to people who belong to clubs. Each person can join several different clubs. They can even move from one club to another club at times. However, while they are at a particular club, they agree to abide by the rules of that specific club.
For adaptive partitioning to operate properly, your system should meet some requirements:
A typical reason for preventing SMM is that it introduces interrupt latencies of about 100 microseconds at unpredictable intervals.
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 time allotted to a partition is called a budget.
The thread scheduler was designed on top of the core QNX Neutrino architecture primarily to solve these problems in embedded systems design:
For more detailed information about the thread scheduler, see “Using the Thread Scheduler” in this guide. To quickly get started using the thread scheduler, try the Quickstart: Adaptive Partitioning Thread Scheduler example.