External code invoked by the scheduler
The scheduler may use code that's external to the kernel to perform certain functions. This code can affect thread scheduling and, thus, the deterministic behavior of the QNX OS.
The external code is sometimes in kernel callouts, which are stand-alone code segments that perform hardware-specific functions. For instance, the scheduler may invoke a callout to send an interprocessor interrupt (IPI) to force another processor in the system to make a scheduling decision. The callout implementation is hardware-specific, but it is expected that the hardware can send IPIs in constant time. During this time, another interrupt may occur, a high-priority thread may become unblocked (i.e., ready), or an asynchronous event may result in a thread's cancellation (e.g., a signal or timeout). These occurrences can alter the subsequent scheduling decision.
For more information about kernel callouts, refer to Kernel Callouts
in the Building Embedded Systems guide.
If tracing is enabled, the scheduler also invokes QNX OS tracing code (which is not in a kernel callout) when the associated thread state change occurs. Thread state events are emitted from the scheduler to preserve the correct event order. The tracing calls are expected to take constant time and have negligible impact on run time when tracing is off, but they can influence scheduling when tracing is on.
The System Analysis Toolkit User's Guide describes the QNX OS tracing mechanism and the various events related to scheduling and other system state changes.