VIII. Hierarchical scheduling


Here we shortly present two kinds of hierarchical scheduling currently available into Cheddar: ARINC 653 scheduling and classical aperiodic task servers.



VIII.1 ARINC 653 scheduling


In this section, first we show how to model an ARINC 653 system, and then, we present what we can expect from Cheddar in term of schedulability anlysis for such a system.

VIII.1.1 How to model an ARINC 653 two-levels scheduling

ARINC 653 is a avionic standard characterized by the concept of partitioning. Partitionning ensures time and space isolation in order to improve safety. The ultimate goal is to guaranty that if a failure occurs on one partition, it will not impact the other partitions running on the same hardware. In order to enforce isolation, each partition executes in a fixed time frame and has a specific address space to store code and data. For multi-core systems, the ARINC653 standard required that the operating system support the following possibilities: A partition contains at least one task and a two levels of scheduling is applied: With Cheddar, such 2 level scheduling is modeled as follow:



VIII.1.2 Examples of an ARINC 653 s scheduling

In this section we present two examples of ARINC 653 scheduling with Cheddar. The first example modeles a single core system and the second one modeles a multi-core system.



VIII.2 Aperiodic server hierarchical scheduling

Cheddar implements several classical aperiodic servers. This paragraph illustrates this with the polling server.

Aperiodic servers is a mean to adapt scheduling of aperiodic tasks with fixed priority scheduling and Rate Monotonic priority assignment. Several approaches have been proposed to handle aperiodic tasks in this context.

The polling server is one of these approaches. Basically, a polling server is a periodic task defined by a period, a priority and a capacity. When aperiodic tasks are released in the system, they are stored in a queue. At each periodic release time of the polling server, it runs aperiodic tasks which are waiting for the processor in the queue. The polling server runs aperiodic tasks for the duration of its capacity. If the aperiodic task queue is empty at the polling server's release times, the server does nothing. It waits for its next periodic release time. This mechanism allows the processor to run aperiodic tasks as soon as possible but without delaying periodic tasks that are critical. Notice that a polling server has a fixed priority: if this priority is high, it may reduce latency for aperiodic tasks. Whatever this priority and the number of arriving aperiodic task, a polling server can be taken into account when schedulability of the system is verified. Then, as the polling server never exceeds its capacity, schedulability is never jeopardized.

To play with a polling server with Cheddar, the main element to configure properly is a core. For such scheduling algorithme, the core must be used in a monoprocessor. Here is an example of valid parameters for a polling server:



The core c has a high priority value (value of 100), which means that aperiodic tasks will be run quickly. Low scheduling latency of aperiodic tasks is also brought because of the value of the polling server, which is about 5 here. Finally, we give 20 percent of the processor to aperiodic tasks as the capacity of the server is about 1. Fianlly, notice the scheduler type specified here: Hierarchical_Polling_Aperiodic_Server_Protocol.

The screenshoot above shows how the previous core can be used to perform a scheduling simulation. We have two periodic tasks (T1 and T2) and two aperiodic tasks (TA1 and TA2) respectively release at time 7 and 9, with a capacity of respectively 1 and 3. Notice that before time 7, the aperiodic server does nothing, but after time 10, i.e. after its next release with an aperiodic task is ready to run, the polling server used its 1 unit capacity to spread the execution of the aperiodic tasks present in its queue. Aperiodic tasks are then run at 10, 15 and 20 in this figure, while never joeoardizing T1 and T2 deadlines.









Contact : Frank Singhoff mailto:singhoff@univ-brest.fr
Last update : January, the 4th, 2021