  Different scheduling algorithms for mixed criticality systems have been
recently proposed. The common denominator of these algorithms is to discard low
critical tasks whenever high critical tasks are in lack of computation
resources. This is achieved upon a switch of the scheduling mode from Normal to
Critical. We distinguish two main categories of the algorithms: system-level
mode switch and task-level mode switch. System-level mode algorithms allow low
criticality (LC) tasks to execute only in normal mode. Task-level mode switch
algorithms enable to switch the mode of an individual high criticality task
(HC), from low (LO) to high (HI), to obtain priority over all LC tasks. This
paper investigates an online scheduling algorithm for mixed-criticality systems
that supports dynamic mode switches for both task level and system level. When
a HC task job overruns its LC budget, then only that particular job is switched
to HI mode. If the job cannot be accommodated, then the system switches to
Critical mode. To accommodate for resource availability of the HC jobs, the LC
tasks are degraded by stretching their periods until the Critical mode
exhibiting job complete its execution. The stretching will be carried out until
the resource availability is met. We have mechanized and implemented the
proposed algorithm using Uppaal. To study the efficiency of our scheduling
algorithm, we examine a case study and compare our results to the state of the
art algorithms.
