5.3 Execution Modes
5.3.3 Second Degraded Execution Mode (D2)
If no tasks are pending to execute and an idle tick is detected, the system reverts to the normal execution mode, N. In the case where a task executes for more than its MI WCET a mode change is triggered and the system executes in the second degraded mode D2 (D1→D2).
5.3.3 Second Degraded Execution Mode (D2)
The second degraded mode, D2, is used as a last resort in order to ensure that HI criti- cality tasks are able to meet their deadlines. In the D2 mode lower criticality partitions are dropped, providing the additional capacity required for tasks to execute for their HI criticality WCET. M(MI) = HV DS0 DS1 PS0 PS1 τ0 0 0 0 0 0 τ1 0 0 0 0 0 τ2 1 0 0 0 0 τ3 0 0 0 0 0 τ4 0 0 0 0 0 τ5 0 0 0 1 0 τ6 0 0 0 1 0 τ7 0 0 0 0 0 (5.4)
5.4. Response Time Analysis
C
scs1C
sC
scs2R
sI
sB
s Blocking InterferenceServer main body Non-preemptive regions
Figure 5.3: Server critical instance.
which is responsible for servicing its tasks is no longer allowed to execute. With PS1not allowed to execute, τ3, which is responsible for replenishing its capacity, is also dropped. The additional capacity available to the HI criticality partitions given a window of length w is given by Equation (5.5).
C+ D1→D2(w) =
∑
Lj≤MI w Tj(MI) Ccs1 i (MI) +Ci(MI) +Cics2(MI) (5.5) Similar to D1, the system is able to revert to the N mode if no task is pending for execution and an idle tick is detected.5.4
Response Time Analysis
The response time analysis for the mixed criticality level is performed using the ap- proach followed by Adaptive Mixed-Criticality (AMC) [12]. The system is schedulable if all task deadlines are met at each execution mode, N, D1 and D2, and during the mode changes N→D1, D1→D2, D1→Nand D2→N.
5.4.1 Server Schedulability
As with the single criticality model, the first part of the analysis is the calculation of the server response times. For the server response time analysis servers are treated as regular tasks with interference from higher priority hypervisor tasks and higher priority servers. The critical instance of an execution server s at citicality level `, where ` ∈ {LO, MI, HI}, is shown in Figure 5.3.
Symbol Description ~
Ccs1
i A vector containing the time required by the overheads before the ex- ecution of the main body of a task or server for each criticality level.
~
Ci A vector containing the time required by the main body of a task or the capacity of a server for each criticality level.
~
Ccs2
i A vector containing the time required by the overheads after the exe- cution of the main body of a task or server for each criticality level.
~
Ti A vector containing the period of a task or server at each criticality level.
~
Pi A vector containing the priority of a task or server at each criticality level.
Ccs1
i (`) Time required by the overheads before the execution of the main body of a task or server at criticality level`.
Ci(`) Execution time required by the main body of a task or the capacity of a server at criticality level`.
Ccs2
i (`) Time required by the overheads after the execution of the main body of a task or server at criticality level`.
Ti(`) The period of a task or server at criticality level`. Pi(`) The priority of a task or server at criticality level`.
Li The criticality level of a task or server. Ji(`) Release jitter at criticality level`.
Bi Blocking received by tasks of priority lower than Pi.
Mi,s(`) Returns 1 if the task taui executes using the server s at criticality level
`.
Ri The response time of a task or server. Ls
i(w) The load on a server s at the priority level Pi over the length of a window w.
I`
i(w) The interference received by a task or server at priority level Pi when the system executes at criticality level`.
lp(i) The set of tasks or servers of lower priority than Pi. hp(i) The set of tasks or servers of higher priority than Pi. async The set of sporadic tasks.
sync The set of periodic tasks. hv The set of hypervisor tasks. PS The set of periodic servers. DS The set of deferrable servers. C+
a→b(w) The additional capacity received over a window w by after the mode change a→b.
Crep The time required to replenish a server’s capacity.
5.4. Response Time Analysis
Bcs
s (`) =maxnmax(Ccs1j (`), Cjcs2(`))|j∈lp(s,`) ∧j∈ async o
∪
nmax(Ccs1j (`), Ccs2j (`))|j∈lp(s,`) ∧j∈ PSo (5.6)
First we consider the blocking factor of a server s at criticality level `. As shown in
Equation (5.6) a server can be blocked by lower priority sporadic tasks or lower priority periodic servers. The response time of a server excludes the cs2 region, which can potentially be pushed to the next busy period [105]. Therefore the total blocking of a server s at criticality level`is defined as:
Bs(`) =max Cics2(`), Bics(`) (5.7) The interference received by a server is dependent on hypervisor tasks and servers with a higher priority ceiling. Given a window of length w, the interference received by a server s at criticality level`is given by:
I` s(w) =
∑
j∈hp(s) w+J j(`) Tj(`) Ccs1 j (`) +Cj(`) +Ccs2j (`) (5.8) The response time of a server s at criticality level`is given by the recurrence relation:R` s =Cics1(`) +Ci(`) +max Ccs2i (`), Bcsi (`)+ (5.9)