automatic wcet analysis of real time parallel applications
play

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


  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

  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

  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

  4. Introduction Motivation Motivation Global trends: increasing production/usage multicores near future: many cores Need for more processing power → need for more processing cores ⇒ No way of escaping multicores/ many cores even for real-time embedded systems H. Ozaktas (IRIT-UPS) WCET 2013 July 9, 2013 4 / 18

  5. Introduction Motivation Motivation Global trends: increasing production/usage multicores near future: many cores Need for more processing power → need for more processing cores ⇒ No way of escaping multicores/ many cores even for real-time embedded systems H. Ozaktas (IRIT-UPS) WCET 2013 July 9, 2013 4 / 18

  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 many core architectures H. Ozaktas (IRIT-UPS) WCET 2013 July 9, 2013 5 / 18

  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 many core architectures H. Ozaktas (IRIT-UPS) WCET 2013 July 9, 2013 5 / 18

  8. Introduction Challenges and scope Challenges and scope 1 Multicore → trouble for timing analysis Conflicts to shared resources A solution: time-predictable multicore/ many core architectures Related projects: T-CREST, parMERASA We assume these architectures are available! 2 Parallel programming itself – we focus on POSIX-like thread synchronisation on 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

  9. Introduction Challenges and scope Challenges and scope 1 Multicore → trouble for timing analysis Conflicts to shared resources A solution: time-predictable multicore/ many core architectures Related projects: T-CREST, parMERASA We assume these architectures are available! 2 Parallel programming itself – we focus on POSIX-like thread synchronisation on 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

  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

  11. WCET analysis of parallel applications Overview WCET analysis of parallel applications main child threads create Global WCET is the WCET of the main thread barrier S 1 ¡ barrier Worst-case stall times barrier (WCSTs) need to be computed lock S 3 ¡ c.s ¡ unlock lock c.s ¡ join unlock S 2 ¡ * S1, S2, S3: Stalls due to synchronisations H. Ozaktas (IRIT-UPS) WCET 2013 July 9, 2013 8 / 18

  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 Barrier previous collective synchronisation w 1 c.s ¡ w 0 w 1 S w 2 barrier w 2 c.s ¡ lock w 0 c.s ¡ S unlock S = w 1 + w 2 S = max(0 , ( w 1 − w 0 ) , ( w 2 − w 0 )) H. Ozaktas (IRIT-UPS) WCET 2013 July 9, 2013 9 / 18

  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++) <barrier id="bar"> CREATE_THREAD(&work); <thread id="0-2"> ... <last_sync ref="BEGIN"/> BARRIER(&bar,3); // ID=bar </thread> ... </barrier> for (int i=0; i<2; i++) <csection id="cs"> JOIN(i+1); // ID=join <thread id="1-2"/> } </csection> <sync id="join"> void work() { <thread id="0"> ... <wait id="1-2"> BARRIER(&bar,3); // ID=bar <sync ref="END"/> ... <last_sync ref="bar"/> MUTEX_LOCK(&lock); // ID=cs </wait> ... // critical section </thread> MUTEX_UNLOCK(&lock); // ID=cs </sync> ... } H. Ozaktas (IRIT-UPS) WCET 2013 July 9, 2013 10 / 18

  14. WCET analysis of parallel applications Computation of the global WCET Computation of the global WCET main Iden%fica%on ¡of ¡synchronisa%ons ¡ child threads create barrier S 1 ¡ barrier Building ¡of ¡WCSTs’ ¡tree ¡ barrier lock S 3 ¡ c.s ¡ unlock lock c.s ¡ join unlock Computa%on ¡of ¡WCSTs ¡ S 2 ¡ root Integra%on ¡of ¡WCSTs ¡to ¡the ¡CFG ¡of ¡main ¡thread ¡ Computa%on ¡of ¡global ¡WCET ¡ S 1 S 2 S 3 H. Ozaktas (IRIT-UPS) WCET 2013 July 9, 2013 11 / 18

  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

  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

  17. Experimental results Results Results Normalised WCET Impact of stall times 80% ¡ 9% ¡ Gauss-­‑Seidel ¡ Jacobi ¡ Jacobi ¡ Gauss-­‑Seidel ¡ 8% ¡ 70% ¡ 7% ¡ Normalised ¡WCET ¡ 60% ¡ Stall ¡&me ¡/ ¡WCET ¡ 6% ¡ 50% ¡ 5% ¡ 40% ¡ 4% ¡ 30% ¡ 3% ¡ 20% ¡ 2% ¡ 10% ¡ 1% ¡ 0% ¡ 0% ¡ 2 ¡ 4 ¡ 8 ¡ 16 ¡ 32 ¡ 64 ¡ 2 ¡ 4 ¡ 8 ¡ 16 ¡ 32 ¡ 64 ¡ #threads ¡ #threads ¡ H. Ozaktas (IRIT-UPS) WCET 2013 July 9, 2013 14 / 18

  18. Experimental results Results Results – computation times Computation times in seconds Normalised computation times Gauss-Seidel Jacobi 600 ¡ Normalised ¡comp. ¡/me ¡ 2 0.559 0.379 Jacobi ¡ Gauss-­‑Seidel ¡ 500 ¡ 4 1.046 0.705 400 ¡ 8 2.177 1.446 300 ¡ 16 3.718 2.679 200 ¡ 32 8.796 5.782 100 ¡ 64 17.999 11.855 0 ¡ 2 ¡ 4 ¡ 8 ¡ 16 ¡ 32 ¡ 64 ¡ #threads ¡ H. Ozaktas (IRIT-UPS) WCET 2013 July 9, 2013 15 / 18

  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

  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

  21. Future work THANK YOU! H. Ozaktas (IRIT-UPS) WCET 2013 July 9, 2013 18 / 18

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend