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

runtime monitoring of time critical tasks in multi core
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Runtime monitoring of time-critical tasks in multi-core systems

Claire Pagetti – ONERA, France Christine Rochange, Univ. of Toulouse, France

slide-2
SLIDE 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

slide-3
SLIDE 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

slide-4
SLIDE 4

τ3 ¡ τ2 ¡

Proposed approach

core 0 cores 1..n

τC ¡ τ1 ¡ DC TC τ3 ¡ τ2 ¡

core 0 cores 1..n

τC ¡ τ1 ¡ DC TC τ3 ¡ τ2 ¡

core 0 cores 1..n

τC ¡ τ1 ¡ DC TC τ3 ¡ hyp: one task per core WCETC(n+1) is pessimistic ➛ schedulability issue

  • τC runs first in isolation (WCETC(1))
  • then other tasks can execute

➛ low resource utilisation

  • τC runs in parallel with other tasks

WCETC(x) is assumed (unsafe)

  • runtime monitoring checks if switching

to isolation mode is needed to meet the deadline

slide-5
SLIDE 5

Condition to trigger recovery:

“if no recovery action is taken now, the critical task might miss its deadline” § RWCETC

p(1): remaining WCET in isolation from point p

§ tsw: time to switch to isolation mode § NWCETC

p(n+1): WCET until next monitoring point (p+1)

Fault detection

RWCETC

p(1) + tsw + NWCETC p(n+1)

> DC – OETC

p(n+1)

tsw τ3 ¡ τ2 ¡

core 0 cores 1..n

τC ¡ τ1 ¡ DC TC τ3 ¡

RWCETC

p(1)

NWCETC

p(n+1)

OETC

p(n+1)

p p+1

  • A. Kritikakou et al.

Runtime Control to Increase Task Parallelism in Mixed-Critical Systems, ECRTS 2014.

slide-6
SLIDE 6
  • start with offline-computed RWCET values
  • update estimation when re-visiting a point:

RWCETC

p(1) = f(offline-computed parameters)

req: simple operations (add/sub)

Dynamic estimation of the remaining WCET

RWCETC

p0(1)

p0 p1 p2 p3 p4

RWCETC

p2(1)

RWCETC

p3(1)

  • reference point (head)
  • timing distance from the head point
  • timing distance between two successive visits
slide-7
SLIDE 7

Example

N’0 ¡ N’1 ¡ F ¡ N0 ¡ N9 ¡ #define N 100 int A[N][N]; int main() { lu(); return EXIT SUCCESS; } int lu() { int i, j, k; for (k=0;k<N;k++){ for (j=k+1;j<N;j++)do A[k][j]=A[k][j]/A[k][k]; for (i=k+1;i<N;i++) for (j=k+1;j<N;j++)do A[i][j]-=A[i][k]*A[k][j]; } return EXIT SUCCESS; } C1 ¡ N2 ¡ C2 ¡ N4 ¡ C3 ¡ N8 ¡ N3 ¡ N5 ¡ C3 ¡ N6 ¡ N7 ¡

1 2 3 4

level Extended CFG

slide-8
SLIDE 8

Example

N’0 ¡ N’2 ¡ F ¡ N0 ¡ N9 ¡ C1 ¡ N2 ¡ C2 ¡ N4 ¡ C3 ¡ N8 ¡ N3 ¡ N5 ¡ C4 ¡ N6 ¡ N7 ¡

1 2 3 4

level point type level w d N’0 1 F

F_ENTRY

1 da N’2

F_EXIT

1 db N0 1 dc C1 1 wa dd N2 2 de C2 2 wb df N3 3 dg N4 2 dh C3 2 wc di N5 3 dj C4 3 wd dk N6 4 dl N7 3 dm N8 2 dn N9 1 do wd de dh

slide-9
SLIDE 9

Dynamic estimation of the remaining WCET

curr_level = 0; last[0] = start; RWCET[0] = WCET;

  • if (curr_level < level[p])

RWCET[level[p]] = RWCET[level[p] – 1] – d[p]; else if (last[level[p]] == p) RWCET[level[p]] = RWCET[level[p]] – w[p]; else RWCET[level[p]] = RWCET[level[p]-1] – d[p]; last[level[p]] = p; curr_level = level[p]; simplified version (all function calls at the same level)

N’0 ¡ N’1 ¡ F ¡ N0 ¡ N9 ¡ C1 ¡ N2 ¡ C2 ¡ N4 ¡ C3 ¡ N8 ¡ N3 ¡ N5 ¡ C3 ¡ N6 ¡ N7 ¡

1 2 3 4

level Extended CFG

slide-10
SLIDE 10

§

WCET(x)?

unsafe but reasonably-correct WCET estimate

§

Implementation of monitoring/recovery

hardware, sofuware, hybrid?

  • ptimal placement of monitoring points?
  • Recovery

decision to take a recovery action? recovery scheme?

  • Can that remaining WCET be useful?

Ongoing work and open questions