runtime monitoring of time critical tasks in multi core
play

Runtime monitoring of time-critical tasks in multi-core systems - PowerPoint PPT Presentation

Runtime monitoring of time-critical tasks in multi-core systems Claire Pagetti ONERA, France Christine Rochange, Univ. of Toulouse, France Motivation Static analysis provides safe but pessimistic WCET estimates safe WCET estimation


  1. Runtime monitoring of time-critical tasks in multi-core systems Claire Pagetti – ONERA, France Christine Rochange, Univ. of Toulouse, France

  2. Motivation Static analysis provides safe but pessimistic WCET estimates § safe WCET estimation requires considering: ª worst-case paths ª maximum levels of conflicts to shared resources § observed execution times are usually shorter § consequences: ª waste of resources ª schedulability issues

  3. Proposed approach Use ‘ less safe’ WCET estimates to schedule tasks § e.g.: ª ignore pathological conflict situations or assume an amount of conflicts in the upper range of what is usually observed ª restrict analysis to frequent input data ranges ª ignore timing anomalies ( ➛ time composition) and Enable runtime recovery when the situation is worse than assumed at analysis time § e.g. suspend/abort low-critical tasks

  4. Proposed approach hyp: one task per core WCET C (n+1) is pessimistic core 0 τ C ¡ ➛ schedulability issue τ 1 ¡ cores 1..n τ 2 ¡ τ 3 ¡ D C T C • τ C runs first in isolation (WCET C (1)) core 0 τ C ¡ • then other tasks can execute ➛ low resource utilisation cores 1..n τ 1 ¡ τ 2 ¡ τ 3 ¡ D C T C • τ C runs in parallel with other tasks core 0 WCET C (x) is assumed ( unsafe ) τ C ¡ • runtime monitoring checks if switching τ 1 ¡ cores 1..n τ 2 ¡ to isolation mode is needed to meet the τ 3 ¡ τ 3 ¡ deadline D C T C

  5. Fault detection Condition to trigger recovery: “if no recovery action is taken now, the critical task might miss its deadline” § RWCET C p (1): remaining WCET in isolation from point p § t sw : time to switch to isolation mode § NWCET C p (n+1): WCET until next monitoring point (p+1) t sw RWCET C p (1) OET C p (n+1) RWCET C p (1) + t sw + NWCET C p (n+1) core 0 τ C ¡ > D C – OET C p (n+1) τ 1 ¡ cores 1..n τ 2 ¡ τ 3 ¡ τ 3 ¡ p p+1 D C T C A. Kritikakou et al. NWCET C p (n+1) Runtime Control to Increase Task Parallelism in Mixed-Critical Systems, ECRTS 2014.

  6. Dynamic estimation of the remaining WCET p0 - start with o ff line-computed RWCET values - update estimation when re-visiting a point: p1 RWCET C p (1) = f(o ff line-computed parameters) req: simple operations (add/sub) p2 RWCET C p0 (1) • reference point (head) RWCET C p2 (1) • timing distance from the head point p3 • timing distance between two successive visits p4 RWCET C p3 (1)

  7. Example Extended CFG #define N 100 int A[N][N]; N’ 0 ¡ N 0 ¡ int main() { N 2 ¡ lu(); � return EXIT SUCCESS; F ¡ } N 3 ¡ C 2 ¡ int lu() { N’ 1 ¡ int i, j, k; N 4 ¡ C 1 ¡ N 5 ¡ for (k=0;k<N;k++){ for (j=k+1;j<N;j++)do A[k][j]=A[k][j]/A[k][k]; N 6 ¡ C 3 ¡ C 3 ¡ for (i=k+1;i<N;i++) for (j=k+1;j<N;j++)do N 9 ¡ A[i][j]-=A[i][k]*A[k][j]; N 8 ¡ N 7 ¡ } return EXIT SUCCESS; } 1 2 3 4 level

  8. Example point type level w d N’ 0 1 F F_ENTRY 1 d a F_EXIT N’ 2 1 d b N’ 0 ¡ N 0 ¡ N 0 1 d c N 2 ¡ C 1 1 w a d d d e F ¡ N 2 2 d e N 3 ¡ C 2 ¡ d h C 2 2 w b d f N’ 2 ¡ N 4 ¡ N 3 3 d g C 1 ¡ N 5 ¡ N 4 2 d h w d N 6 ¡ C 3 2 w c d i C 3 ¡ C 4 ¡ N 5 3 d j N 9 ¡ N 8 ¡ N 7 ¡ C 4 3 w d d k N 6 4 d l N 7 3 d m 1 2 3 4 level N 8 2 d n N 9 1 d o

  9. Dynamic estimation of the remaining WCET Extended CFG curr_level = 0; last[0] = start; RWCET[0] = WCET; N’ 0 ¡ N 0 ¡ N 2 ¡ -------------- F ¡ if (curr_level < level[p]) N 3 ¡ C 2 ¡ RWCET[level[p]] = RWCET[level[p] – 1] – d[p]; N’ 1 ¡ N 4 ¡ else C 1 ¡ N 5 ¡ if (last[level[p]] == p) RWCET[level[p]] = RWCET[level[p]] – w[p]; N 6 ¡ C 3 ¡ C 3 ¡ else N 9 ¡ RWCET[level[p]] = RWCET[level[p]-1] – d[p]; N 8 ¡ N 7 ¡ last[level[p]] = p; curr_level = level[p]; 1 2 3 4 level simplified version (all function calls at the same level)

  10. Ongoing work and open questions WCET(x)? § unsafe but reasonably-correct WCET estimate Implementation of monitoring/recovery § hardware, so fu ware, hybrid? optimal placement of monitoring points? Recovery • decision to take a recovery action? recovery scheme? Can that remaining WCET be useful? •

Recommend


More recommend