PikeOS is a real-time operating system and virtualization platform providing full separation in both time and space for multiple software applications running on different criticality levels.
Scheduling real-time and non real-time application
A virtualization platform for complex embedded systems must support a mixture of applications with a broad range of timing requirements: hard real-time, soft real-time, and non real time. PikeOS RTOS incorporates a new scheduler combining time-driven and priority-driven scheduling. This scheduler ensures deterministic mapping between virtual and real-time, dynamic re-allocation of excess computing time and priority-based responsiveness. Hard real-time requirements for critical applications are met (gray processes) while still providing best effort scheduling for non-critical tasks (blue processes). A conventional RTOS cannot make use of excess computing time and needs much more time to handle all processes.
Deterministic real-time responsiveness
Deterministic responsiveness is straightforwardly accomplished by using a strictly time-driven scheduler: Every virtual machine is statically assigned an individual time slice. The virtual machine scheduler periodically executes each VM in turn for the duration of their respective time slices. In this way, VM's receive fixed amounts of processing capacity at predefined points in time. Thus, they are able to schedule real-time processes themselves. However, if a VM has no runnable processes during its active time slice, or if its processes have completed before the time slice is over, it cannot simply do a switch to another VM, because that would destroy the temporal determinism.
Time-driven and priority-based scheduling
To re-use these excess processing capacities, PikeOS RTOS combines time-driven scheduling and priority-based scheduling: In addition to a time slice duration, it also allows to assign a priority to each VM. All real-time VM's receive the same mid-level priority. We continue to switch between these VM's with a strictly time-driven scheduler. All non-real-time VM's are assigned a low priority. Switching between these VM's is done by a classical round robin scheduler to achieve load balancing. Thus, whenever a mid-level VM has no processes to run, it sleeps for the rest of its time slice, effectively passing its excess processing time to any low priority VM.