## 3 FENP_MC: Fixed Execution Non-Preemptive Mixed Criticality
### Fenp_mc
#### 3.4.3 Implementation Guidelines
Once a job executes beyond its Lo-criticality WCET, the system switches to Hi-criticality mode and tasks will be scheduled in compliance with the Hi-criticality dispatch table. For each processor dispatch table, tasks are sorted in nondecreasing order of their start times. Next, the task with the lowest start time \(M_{i}\) is extracted from the dispatch table and its first instance \(J_{i,0}\) is executed. After job \(J_{i,0}\) finishes executing, the start time of task \(M_{i}\) is recalculated. \(M_{i}\) is then added to the corresponding dispatch table based on Equation (11), and the task with the lowest start time is again extracted from the sorted list of tasks and executed. The partitioning algorithm proceeds as follows:

Each processor has a scheduling table associated to it. Tasks from the task set are selected one by one and added in each scheduling table. If the scheduling table was initially not empty, two conditions are verified:

1. The current processor utilization, which is the sum of utilizations of all the tasks from the scheduling table associated with the corresponding processor and must not exceed \(1\)[29]: \[U_{\Gamma_{q}}\leq 1,q=1,\ldots,m\] (14) where \(q=1,\ldots,m\). 2. The schedulability test performed for the task subset on the processor must be positive. If the two conditions are met, the task will remain in the scheduling table, the processor utilization is updated, and the next task is removed from the ready queue and tested. If the scheduling table was initially empty, the task is added without verifying the two conditions and the processor utilization is updated. If one of the two conditions returns FAILURE, the task is removed from the scheduling table and added in the next processor scheduling list, where the same test is performed. ### Execution Examples

In order to illustrate the task partitioning method described in Section 4.1 we provide an example of six mixed criticality tasks scheduled on a dual-criticality system with two processors. Table 5 contains the timing parameters of the tasks and the processor utilization for each criticality level. In this case, P_FENP_MC provides the following results: tasks \(M_{1}\), \(M_{4}\), and \(M_{6}\) are assigned to the first processor (\(P_{0}\)) with a Lo-criticality total utilization of 0.5 and a Hi-criticality total utilization of 0.5, while tasks \(M_{2}\), \(M_{3}\), and \(M_{5}\) are partitioned to \(P_{1}\) with a Lo-criticality total utilization of 0.445 and a Hi-criticality total utilization of 0.347. Scheduling for both the Hi- and Lo-criticality modes is illustrated in Figure 5.

It must be noted that for Condition I and for calculating the total utilization on each processor, we use Hi-criticality total utilization for the Hi-criticality WCET and Lo-criticality total utilization for the Lo-criticality WCET. Therefore, Condition I must be verified for both the Hi-criticality total

Figure 5: Partitioned Fixed Execution Non-Preemptive Mixed Criticality (P_FENP_MC) scheduling of the six-task set example. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Task** & \(T_{i}\) & \(D_{i}\) & \(L_{i}\) & \(C_{iL_{L_{L}}}\) & \(C_{iL_{L_{H}}}\) & \(\mathbf{U_{iL_{L_{L}}}}\) & \(\mathbf{U_{iL_{L_{H}}}}\) \\ \hline \(M_{1}\) & 24 & 24 & Hi & 5 & 6 & 0.208 & 0.25 \\ \(M_{2}\) & 72 & 72 & Hi & 8 & 9 & 0.111 & 0.125 \\ \(M_{3}\) & 18 & 18 & Hi & 3 & 4 & 0.167 & 0.222 \\ \(M_{4}\) & 8 & 8 & Hi & 1 & 2 & 0.125 & 0.25 \\ \(M_{5}\) & 36 & 36 & Lo & 6 & - & 0.167 & - \\ \(M_{6}\) & 12 & 12 & Lo & 2 & - & 0.167 & - \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Six-task set example. utilization and the Lo-criticality total utilization. For Condition II, both the Lo-criticality WCET and the Hi-criticality WCET are considered. ### Implementation Guidelines

Next, the two phases of the algorithm are described using diagrams. In the offline phase, the dispatch tables for each processor are created using the mapping function and the feasibility test.