# Reducing Dynamic Power Consumption in Mixed-Critical Real-Time Systems
## System Model  
### Task Model  
In this subsection, we provide an overview of the task model. In the mixed-criticality real-time systems, a low-criticality periodic task releases an order of jobs only in low criticality mode, while high-criticality tasks release their jobs in both high- and low-criticality mode. Thus a mixed-criticality task \(\tau_{i}\) consists of four parameters: Period \((P_{i})\), computation time of low-criticality jobs, \(C_{i}(LO)\), computation time of high-criticality jobs, \(C_{i}(HI)\), and tasks level \((X_{i})\) as follows:  
* \(P_{i}\): The task period. The task releases a job every period (minimum interval arrival time);
* \(C_{i}(LO)\): The worst-case execution time in low-criticality mode. The task requires \(C_{i}(LO)\) times in low-criticality mode;
* \(C_{i}(HI)\): The worst-case execution time in high-criticality mode. The task requires \(C_{i}(HI)\) times in high-criticality mode;
* \(X_{i}\): The criticality level of task. The system can be either in high-criticality (HI) mode or in low-criticality (LO) mode.  
The task \(\tau_{i}\) is a periodic real-time task, so that jobs are released at every \(P_{i}\) time units. The \(j\)-th instance or job of a task \(\tau_{i}\) is denoted as the \(\tau_{i,j}\). In the mixed-criticality system, tasks are categorized into low-criticality and high-criticality tasks. In addition, the system mode is also divided into low-criticality and high-criticality mode. In low-criticality mode, all tasks release their jobs so that each task's job \(\tau_{i}\) requires the worst-case execution time of \(C_{i}(LO)\). On the contrary, in high-criticality mode, only the high-criticality tasks release their jobs with \(C_{i}(HI)\) execution time (\(C_{i}(HI)\leq C_{i}(LO)\)). Thus, each task has its criticality mode \(X_{i}\).  
The mixed-criticality system is an integrated suit of hardware, middleware service, operating system, and application software that support the execution of non-criticality, mission-criticality, and safety-critical functions. The system starts in low-criticality mode. However, if there is a possibility that any low-critical job interrupts in high-criticality jobs' execution time, then the system criticality mode changes. In such a situation, all low-criticality tasks are dropped in the system. In mixed-criticality systems, such a possibility occurs when a high-criticality job does not complete its computation time, which is the condition of switching from low-criticality mode to high-criticality mode.  
On the contrary, the system returns to low-criticality mode when there is no possibility of overrun. While high-criticality tasks are executed in high-criticality mode, the system changes its criticality to low mode as long as there is no task ready in the queue [29].  
For example, Figure 1 shows an example of three mixed-criticality tasks of \(\tau_{1}(2,2,5,\) LO), \(\tau_{2}(1,3,6,\) HI), and \(\tau_{3}(2,3,8,\) HI). The system starts in low-criticality mode, where each task requires \(C_{i}(LO)\) execution time. Each task releases its job every \(P_{i}\) time units. The scheduling algorithm used in Figure 1 is EDF (earliest deadline first).  
Let us assume that the job \(\tau_{3,3}\) does not complete its execution at time 19. Then, the system changes the criticality mode to high-criticality. After then, the system executes only high-criticality tasks (\(\tau_{2}\) and \(\tau_{3}\)) with their \(C_{i}(HI)\) execution times. The execution times of \(\tau_{3,3}\) and \(\tau_{2,4}\) become 3 in each. When the system is in high-criticality mode, all low-criticality jobs are ignored or removed from the queue. For instance, the job \(\tau_{1,5}\) released at time 20 is removed from the scheduling queue since it is a low-criticality job.  
The systems returns to low-criticality mode if there is no high-criticality jobs waiting in the scheduling queue. For example, the system returns back to the low-criticality mode at time 23 because there are no jobs available. After then, the system executes low-criticality jobs again as before.