# Schedulability Analysis in Fixed-Priority Real-Time Multicore Systems with Contention
## 4 Interference-Aware Schedulability Analysis for Fixed Priorities
### Interference-Aware Schedulability Analysis for Deadline Monotonic Scheduling
#### 4.2.2 Worst-Case Response Time with Interference Considerations  
In this section, we present a schedulability test based on WCRT by using the definitions of activation pattern array (\(\overrightarrow{v_{j\to i}^{*}}\)) and binary matrix (\(A_{ij}\)). As stated at the beginning of Section 4.2, the WCRT of an activation of a task depends on its own \(C_{i}\), the interference from broadcasting tasks allocated to other cores that it is affected by (if it is a receiving task), and the computation times of and interference from the higher-priority tasks allocated to its core. With these three factors, Equation (7) is formulated. The upper bound of the WCRT of activation \(k\) of task \(\tau_{i}\) considering multicore system interference is  
\[WCRT_{i}^{k(ab)}=C_{i}+\sum_{ \begin{subarray}{c}\forall\tau_{i}\
otin M_{ \tau_{i}}\\ l_{i}\
eq 0\end{subarray} }v_{2\to i}^{*}[k]\cdot I_{2}+\sum_{ \begin{subarray}{c} \forall\tau_{i}\in hp(i)\\ \overrightarrow{\tau_{i}}\in M_{\tau_{i}}\end{subarray} }\sum_{a=\left[ \begin{subarray}{c}\frac{k\cdot T_{i}}{l_{j}}\\ \frac{k\cdot T_{i}}{l_{j}}\end{subarray} \right]}^{\left[\frac{k\cdot T_{i}+D_{i }}{l_{j}}\right]-1}\left(C_{j}+\sum_{ \begin{subarray}{c}\forall\tau_{i}\
otin M _{\tau_{i}}\\ l_{j}\
eq 0\end{subarray} }v_{l\to j}^{*}[a]\cdot l_{l}\right)\cdot A_{ij_{ l_{a}}} \tag{7}\]  
As this is an upper bound, it considers that whenever there can be interference, there is interference. In reality, it is possible that even if two tasks on different cores have overlapping execution windows, one of them has already finished its activation when the other one starts its own. That is why the above expression is an upper bound. In addition, it is also important to note that in systems where there is no interference, this definition also gives us an upper bound and it will not give an exact result like Equation (2). Once interference is considered in the response time to provide an upper bound, the schedulability test presented next applies. A task set \(\tau\) is schedulable by fixed priorities if  
\[WCRT_{i}^{ab}=\max_{k}\left(WCRT_{i}^{k(ab)}\right)\leq D_{i}\quad\forall k \in N_{i},\forall\tau_{i}\in\tau \tag{8}\]  
As stated before, the WCRT of a task in multicore systems with interference depends on the following three parameters, which are represented in the expression of \(WCRT^{k(ab)}\):  
1. The task's computation time: \(C_{i}\). 2. The interference the task is affected by: \(\sum_{ \begin{subarray}{c}\forall\tau_{i}\in M_{\tau_{i}}\\ l_{i}\
eq 0\end{subarray} }v_{2\to i}^{*}[k]\cdot I_{2}\). 3. The computation time of higher-priority tasks allocated to the task's core and the interference they are affected by: \(\sum_{ \begin{subarray}{c}\forall\tau_{i}\in hp(i)\\ \overrightarrow{\tau_{i}}\in M_{\tau_{i}}\end{subarray} }\sum_{a=\left[ \begin{subarray}{c}\frac{k\cdot T_{i}D_{i}}{l_{j}}\\ \frac{k\cdot T_{i}}{l_{j}}\end{subarray} \right]}^{\left[\frac{k\cdot T_{i}+D_{i }}{l_{j}}\right]}^{-1}\left(C_{j}+\sum_{ \begin{subarray}{c}\forall\tau_{i} \
otin M_{\tau_{i}}\\ l_{j}\
eq 0\end{subarray} }v_{l\to j}^{*}[a]\cdot l_{l}\right)\cdot A_{ij_{ l_{a}}}\). The last two terms are upper bounds on the real interference since they count the maximum number of possible overlaps of execution among tasks. There is no possibility of further interference, as this would imply a higher number of overlaps and the maximum is already calculated in both expressions. Therefore, since \(WCRT_{i}^{ub}\) is an upper bound to \(WRCT_{i}\) it means that \(WCRT_{i}^{ub}\geq WCRT_{i}\quad\forall k\in N_{i}\). In general, if \(WCRT_{i}\leq D_{i}\quad\forall\tau_{i}\in\tau\), then the system is schedulable. So, if \(WCRT_{i}^{ub}\leq D_{i}\), the system is schedulable, as all the deadlines are met. Example  
Let us show the usage of Equation (7) to determine the upper bound of the WCRT of all the activations involved in the system previously defined, i.e., \(\tau^{\prime\prime}\).