Automatic WCET Analysis of Real-Time Parallel Applications Haluk - - PowerPoint PPT Presentation

automatic wcet analysis of real time parallel applications
SMART_READER_LITE
LIVE PREVIEW

Automatic WCET Analysis of Real-Time Parallel Applications Haluk - - PowerPoint PPT Presentation

Automatic WCET Analysis of Real-Time Parallel Applications Haluk Ozaktas Christine Rochange Pascal Sainrat IRIT Universit e de Toulouse July 9, 2013 13th International Workshop on Worst-Case Eexecution Time 1 Introduction Motivation


slide-1
SLIDE 1

Automatic WCET Analysis of Real-Time Parallel Applications

Haluk Ozaktas Christine Rochange Pascal Sainrat

IRIT – Universit´ e de Toulouse

July 9, 2013

13th International Workshop on Worst-Case Eexecution Time

slide-2
SLIDE 2

1 Introduction

Motivation Challenges and scope

2 WCET analysis of parallel applications

Overview Timing analysis of synchronisations Annotation of parallel programs Computation of the global WCET

3 Experimental results

Methology Results

4 Future work

  • H. Ozaktas (IRIT-UPS)

WCET 2013 July 9, 2013 2 / 18

slide-3
SLIDE 3

Introduction

Current Section

1 Introduction

Motivation Challenges and scope

2 WCET analysis of parallel applications

Overview Timing analysis of synchronisations Annotation of parallel programs Computation of the global WCET

3 Experimental results

Methology Results

4 Future work

  • H. Ozaktas (IRIT-UPS)

WCET 2013 July 9, 2013 3 / 18

slide-4
SLIDE 4

Introduction Motivation

Motivation

Global trends: increasing production/usage multicores

near future: manycores

Need for more processing power → need for more processing cores ⇒ No way of escaping multicores/manycores even for real-time embedded systems

  • H. Ozaktas (IRIT-UPS)

WCET 2013 July 9, 2013 4 / 18

slide-5
SLIDE 5

Introduction Motivation

Motivation

Global trends: increasing production/usage multicores

near future: manycores

Need for more processing power → need for more processing cores ⇒ No way of escaping multicores/manycores even for real-time embedded systems

  • H. Ozaktas (IRIT-UPS)

WCET 2013 July 9, 2013 4 / 18

slide-6
SLIDE 6

Introduction Motivation

Motivation

Single critical task running on a single core

Other cores run non-critical tasks to avoid waste of processing power

Many independent critical tasks each running on a different core What if wee need more processing power for the critical task? ⇒ We want to run real-time parallel applications on manycore architectures

  • H. Ozaktas (IRIT-UPS)

WCET 2013 July 9, 2013 5 / 18

slide-7
SLIDE 7

Introduction Motivation

Motivation

Single critical task running on a single core

Other cores run non-critical tasks to avoid waste of processing power

Many independent critical tasks each running on a different core What if wee need more processing power for the critical task? ⇒ We want to run real-time parallel applications on manycore architectures

  • H. Ozaktas (IRIT-UPS)

WCET 2013 July 9, 2013 5 / 18

slide-8
SLIDE 8

Introduction Challenges and scope

Challenges and scope

1 Multicore → trouble for timing analysis

Conflicts to shared resources A solution: time-predictable multicore/manycore architectures

Related projects: T-CREST, parMERASA

We assume these architectures are available!

2 Parallel programming itself – we focus on POSIX-like thread synchronisation

  • n a shared memory model

Inter-thread synchronisations generate stalls

barriers, critical sections, condition variables...

We need to bound these stall times! We assume a time-predictable system software!

FIFO queues, bounded thread creation time...

  • H. Ozaktas (IRIT-UPS)

WCET 2013 July 9, 2013 6 / 18

slide-9
SLIDE 9

Introduction Challenges and scope

Challenges and scope

1 Multicore → trouble for timing analysis

Conflicts to shared resources A solution: time-predictable multicore/manycore architectures

Related projects: T-CREST, parMERASA

We assume these architectures are available!

2 Parallel programming itself – we focus on POSIX-like thread synchronisation

  • n a shared memory model

Inter-thread synchronisations generate stalls

barriers, critical sections, condition variables...

We need to bound these stall times! We assume a time-predictable system software!

FIFO queues, bounded thread creation time...

  • H. Ozaktas (IRIT-UPS)

WCET 2013 July 9, 2013 6 / 18

slide-10
SLIDE 10

WCET analysis of parallel applications

Current Section

1 Introduction

Motivation Challenges and scope

2 WCET analysis of parallel applications

Overview Timing analysis of synchronisations Annotation of parallel programs Computation of the global WCET

3 Experimental results

Methology Results

4 Future work

  • H. Ozaktas (IRIT-UPS)

WCET 2013 July 9, 2013 7 / 18

slide-11
SLIDE 11

WCET analysis of parallel applications Overview

WCET analysis of parallel applications

main

create barrier barrier barrier

child threads

lock c.s ¡ unlock lock c.s ¡ unlock join S1 ¡ S2 ¡ S3 ¡

*S1, S2, S3: Stalls due to synchronisations

Global WCET is the WCET of the main thread Worst-case stall times (WCSTs) need to be computed

  • H. Ozaktas (IRIT-UPS)

WCET 2013 July 9, 2013 8 / 18

slide-12
SLIDE 12

WCET analysis of parallel applications Timing analysis of synchronisations

Timing analysis of synchronisations

Critical sections (guarded by locks) Progress synchronisations (barriers, conditions) Critical section

c.s ¡ c.s ¡ lock c.s ¡ unlock

w0 w1 w2 S

S = w1 + w2 Barrier

barrier previous collective synchronisation

w0 w1 w2 S

S = max(0, (w1 − w0), (w2 − w0))

  • H. Ozaktas (IRIT-UPS)

WCET 2013 July 9, 2013 9 / 18

slide-13
SLIDE 13

WCET analysis of parallel applications Annotation of parallel programs

Annotation of parallel programs

Information to compute WCSTs are passed through code annotations

Calls to synchronisation primitives are given an ID in the source code An xml-based file describes further these synchronisations

int main() { for (int i=0; i<2; i++) CREATE_THREAD(&work); ... BARRIER(&bar,3); // ID=bar ... for (int i=0; i<2; i++) JOIN(i+1); // ID=join } void work() { ... BARRIER(&bar,3); // ID=bar ... MUTEX_LOCK(&lock); // ID=cs ... // critical section MUTEX_UNLOCK(&lock); // ID=cs ... } <barrier id="bar"> <thread id="0-2"> <last_sync ref="BEGIN"/> </thread> </barrier> <csection id="cs"> <thread id="1-2"/> </csection> <sync id="join"> <thread id="0"> <wait id="1-2"> <sync ref="END"/> <last_sync ref="bar"/> </wait> </thread> </sync>

  • H. Ozaktas (IRIT-UPS)

WCET 2013 July 9, 2013 10 / 18

slide-14
SLIDE 14

WCET analysis of parallel applications Computation of the global WCET

Computation of the global WCET

main

create barrier barrier barrier

child threads

lock c.s ¡ unlock lock c.s ¡ unlock join S1 ¡ S2 ¡ S3 ¡

root S1 S2 S3

Iden%fica%on ¡of ¡synchronisa%ons ¡ Building ¡of ¡WCSTs’ ¡tree ¡ Computa%on ¡of ¡WCSTs ¡ Integra%on ¡of ¡WCSTs ¡to ¡the ¡CFG ¡of ¡main ¡thread ¡ Computa%on ¡of ¡global ¡WCET ¡

  • H. Ozaktas (IRIT-UPS)

WCET 2013 July 9, 2013 11 / 18

slide-15
SLIDE 15

Experimental results

Current Section

1 Introduction

Motivation Challenges and scope

2 WCET analysis of parallel applications

Overview Timing analysis of synchronisations Annotation of parallel programs Computation of the global WCET

3 Experimental results

Methology Results

4 Future work

  • H. Ozaktas (IRIT-UPS)

WCET 2013 July 9, 2013 12 / 18

slide-16
SLIDE 16

Experimental results Methology

Methodology

Partial differential equation solver

Gauss-Seidel method Jacobi method

Simple architecture (1 inst/cycle) with configurable memory latency All implementation done in OTAWA toolset (www.otawa.fr)

  • H. Ozaktas (IRIT-UPS)

WCET 2013 July 9, 2013 13 / 18

slide-17
SLIDE 17

Experimental results Results

Results

Normalised WCET

0% ¡ 10% ¡ 20% ¡ 30% ¡ 40% ¡ 50% ¡ 60% ¡ 70% ¡ 80% ¡ 2 ¡ 4 ¡ 8 ¡ 16 ¡ 32 ¡ 64 ¡

Normalised ¡WCET ¡ #threads ¡

Jacobi ¡ Gauss-­‑Seidel ¡

Impact of stall times

0% ¡ 1% ¡ 2% ¡ 3% ¡ 4% ¡ 5% ¡ 6% ¡ 7% ¡ 8% ¡ 9% ¡ 2 ¡ 4 ¡ 8 ¡ 16 ¡ 32 ¡ 64 ¡

Stall ¡&me ¡/ ¡WCET ¡ #threads ¡

Gauss-­‑Seidel ¡ Jacobi ¡

  • H. Ozaktas (IRIT-UPS)

WCET 2013 July 9, 2013 14 / 18

slide-18
SLIDE 18

Experimental results Results

Results – computation times

Computation times in seconds Gauss-Seidel Jacobi 2 0.559 0.379 4 1.046 0.705 8 2.177 1.446 16 3.718 2.679 32 8.796 5.782 64 17.999 11.855 Normalised computation times

0 ¡ 100 ¡ 200 ¡ 300 ¡ 400 ¡ 500 ¡ 600 ¡ 2 ¡ 4 ¡ 8 ¡ 16 ¡ 32 ¡ 64 ¡

Normalised ¡comp. ¡/me ¡ #threads ¡

Jacobi ¡ Gauss-­‑Seidel ¡

  • H. Ozaktas (IRIT-UPS)

WCET 2013 July 9, 2013 15 / 18

slide-19
SLIDE 19

Future work

Current Section

1 Introduction

Motivation Challenges and scope

2 WCET analysis of parallel applications

Overview Timing analysis of synchronisations Annotation of parallel programs Computation of the global WCET

3 Experimental results

Methology Results

4 Future work

  • H. Ozaktas (IRIT-UPS)

WCET 2013 July 9, 2013 16 / 18

slide-20
SLIDE 20

Future work

Future work

Ongoing

Analysis of industrial applications Visualisation of synchronisation points Eclipse plugin to ease writing annotations

Planned

Automatic extraction of information on synchronisations

Contending threads, last synchronisation point...

A way to define precise stall point

  • H. Ozaktas (IRIT-UPS)

WCET 2013 July 9, 2013 17 / 18

slide-21
SLIDE 21

Future work

THANK YOU!

  • H. Ozaktas (IRIT-UPS)

WCET 2013 July 9, 2013 18 / 18