computer science//real-time computing//real-time scheduling//cyclic executive
A cyclic executive is a real-time scheduling scheme in which a fixed table, built offline, says exactly which task runs in each time slot of a repeating cycle, and it is used where timing must be verified by inspection, most famously in avionics. There are no priorities and no decisions at run time: a timer interrupt marks each slot, and the executive calls the functions listed for it.
A cyclic executive is a real-time scheduling scheme in which a fixed table, built offline, says exactly which task runs in each time slot of a repeating cycle, and it is used where timing must be verified by inspection, most famously in avionics. There are no priorities and no decisions at run time: a timer interrupt marks each slot, and the executive calls the functions listed for it.
The table is built from two periods. The minor frame is the slot length, often the period of the fastest task; the major frame is the cycle after which the table repeats, the least common multiple of all task periods. With tasks at 1 ms, 2 ms and 10 ms, the minor frame is 1 ms and the major frame 10 ms: the 1 ms task appears in all ten slots, the 2 ms task in every other slot, and the 10 ms task is placed (split if needed) where it fits. Checking that every slot's work fits in 1 ms is the whole schedulability proof.
It is the flyswatter of scheduling: trivial to verify, deterministic to the microsecond, and with no possibility of priority inversion or a task starving another, which is why certification favours it.
Its price is rigidity. Adding a task or changing a period means rebuilding the table, periods must be harmonic or the major frame grows impractically, long tasks have to be cut by hand into pieces that fit the slots, and sporadic events (a button, a fault) wait for their slot or need an interrupt outside the scheme.
Integrated avionics keeps the idea at a coarser grain: ARINC 653 partitions share a processor through a fixed time schedule, and each partition may schedule its own tasks inside its window.
When the table becomes unmanageable, rate-monotonic scheduling on an RTOS takes over: priorities instead of slots, with schedulability shown by analysis rather than by reading a table (real-time scheduling).