Why is the AIX real time kernel not real time?

16 07 2010

This is a minor quibble, but why is the AIX real time kernel called that? It’s not real time at all. To enable this feature, you must alter some bosboot settings, reboot the machine and set the RT_MPC environment variable. Its function consists of using on-demand scheduling with a global run queue. That is, a light weight process generates a schedule interrupt as soon as it becomes runnable and the OS executes it on any processor with lower priority tasks currently running, if they exist. This does have the effect of reducing processing latency standard deviations while increasing the average, which is superficially similar to real time processing characteristics, but real time isn’t a subjective thing. It is defined specifically in terms of meeting scheduling guarantees using mathematically provable algorithms. Scheduling guarantees cannot be met simply by trying to schedule tasks as quickly as possible based on priority. It requires a comprehensive analysis of all tasks, their priorities (both semantic priorities as inputs and algorithmic priorities as outputs of the analysis) and their periodicities. And if I’m not mistaken, scheduling guarantee analysis is an NP-complete task over N processors. That is, tasks must be fixed to processors if they are to be scheduled with any of the common real time algorithms. That means the AIX use of the global run queue is completely opposed to the definition of real time analysis.

Incidentally, the on-demand scheduling seems to be an obsolete feature as core density goes up. AIX offsets the periodic scheduling interrupts on each core, meaning that higher core density leads to smaller intervals between interrupts.

Advertisements