1 / 54

ILPc : A novel approach for scalable timing analysis of synchronous programs

ILPc : A novel approach for scalable timing analysis of synchronous programs. Hugh Wang Partha S. Roop Sidharta Andalam. Outline. Timing analysis of concurrent programs Problem statement Our approach - ILPc R esults Conclusions. Acronyms. ILP – Integer Linear Program

delila
Download Presentation

ILPc : A novel approach for scalable timing analysis of synchronous programs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ILPc: A novel approach for scalable timing analysis of synchronous programs Hugh Wang Partha S. Roop SidhartaAndalam

  2. Outline • Timing analysis of concurrent programs • Problem statement • Our approach - ILPc • Results • Conclusions

  3. Acronyms • ILP – Integer Linear Program • ILPs – ILP sequential • ILPc – ILP concurrent • EOT = End of Tick – also known as “pause” • TCCFG – Timed concurrent control flow graph (Intermediate format)

  4. Synchronous languages abort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ] when s

  5. Synchronous languages abort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ] when s

  6. Synchronous languages abort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ] when s abort start abort end

  7. Synchronous languages abort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ] when s abort condition

  8. Synchronous languages abort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ] when s abort condition False True

  9. Synchronous languages abort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ] when s fork

  10. Synchronous languages abort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ] when s

  11. Synchronous languages abort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ] when s

  12. Synchronous languages Read Inputs Emit outputs Time Computation

  13. Synchronous languages Tick 4 Tick 3 Tick 1 Tick 2 Time

  14. Synchronous languages • Worst Case Reaction Time analysis • WCRT analysis • Synchrony hypothesis • Reactive system operates infinitely fast compared to the environment. • Validation • Min(inter-arrival-time of events) > Max (Reaction Time) Longest tick Time

  15. Outline • Timing analysis of concurrent programs • Problem statement • Our approach - ILPc • Results • Conclusions

  16. Motivating example T2 T1 T3 A1 B1 C1 A2 B2 C2 A3 T1 || T2 || T3

  17. Motivating example T2 T1 T3 10 5 10 A1 B1 C1 15 A2 3 10 B2 C2 20 A3 Execution Time: 25

  18. Motivating example T2 T1 T3 10 5 10 A1 B1 C1 15 A2 3 10 B2 C2 20 A3 Execution Time: 28

  19. Motivating example T2 T1 T3 10 5 10 A1 B1 C1 15 A2 3 10 B2 C2 20 A3 Execution Time: 35

  20. Conventional approaches • Max-plus Sum the largest execution time of each thread WCRT M. Boldt and C. Traulsen and R. Hanxleden. Worst Case Reaction Time Analysis of Concurrent Reactive Programs. ENTCS, 203(4), 2008. L. Ju, B. K. Huynh, A. Roychoudhury, and S. Chakraborty. Performance debugging of Esterelspecifications. CODES-ISSS 2008.

  21. Conventional approaches • State exploration Find all feasible states Find the largest execution time WCRT L. Ju, B. K. Huynh, S. Chakraborty, and A. Roychoudhury. Context-sensitive timing analysis of Esterel programs. DAC, 2009. S. Andalam, P. S. Roop, and A. Girault. Pruning infeasible paths for tight WCRT analysis of synchronous programs. DATE, 2011. M. Kuo, R. Sinha, and P. S. Roop. Efficient WCRT analysis of synchronous programs using reachability. DAC, 2011. ILPs Model checking Reachability

  22. Motivating example T2 WCRT analysis -Max-Plus WCRT = Max(T1) + Max(T2) + Max(T3) = A3 + B1 + C2 = 20 + 10 + 10 = 40cycles -State Exploration A1+B1+C1 = 25 A2+B2+C2 = 28 A3+B1+C1 = 35 A1+B2+C2 = 23 A2+B1+C1 = 30 A3+B2+C2 = 33 WCRT = Max(25,28,35,23,30,33) = 35 cycles T1 T3 10 5 10 A1 B1 C1 Tick alignment 15 A2 3 10 B2 C2 20 A3 Scalability

  23. Tradeoff Precision State exploration Max-plus Analysis Time

  24. Motivating example T2 T1 T3 10 5 10 A1 B1 C1 15 A2 15 3 10 B2 C2 20 A3

  25. Motivating example WCRT analysis -Max-Plus WCRT = Max(T1) + Max(T2) + Max(T3) = A3 + B2 + C2 = 20 + 15 + 10 = 45 cycles -State Exploration A1+B1+C1 = 25 A2+B2+C2 = 40 A3+B1+C1 = 35 A1+B2+C2 = 35 A2+B1+C1 = 30 A3+B2+C2 = 45 WCRT = Max(25,40,35,35,30,45) = 45 cycles T2 T1 T3 10 5 10 A1 B1 C1 15 A2 15 10 B2 C2 20 A3

  26. The problem statement State exploration Precision Max-plus Analysis Time

  27. Our approach • Our approach (ILPc) • Inspired by counter example guided model checking • Also has some ideas similar to local model checking Find largest execution time using max-plus approach Fail Verify tick alignment Success WCRT

  28. Outline • Timing analysis of concurrent programs • Problem statement • Our approach - ILPc • Results • Conclusions

  29. Overview of ILPc TCCFG ILPmodel

  30. ILP model • Objective function: • Conventional nodes: • Features: • Solver sets to 1 whenever possible. • Definitions: • EOT arrows E1 E6 E2 E12 E7 E11 E8 E13 E3 E4 E16 E9 E14 E15 E10 E5 E17

  31. ILP model EOT: Fork: 2 E1 E6 E2 E12 E7 E11 E8 E13 E3 E4 E16 E9 E14 E15 E10 E5 E17

  32. ILP model Abort start: Abort end: Preemption: E1 E6 E2 E12 E7 E11 E8 E13 E3 E4 E16 E9 E14 E15 E10 E5 E17

  33. ILP • Compared with the conventional ILP • Directly capture features of synchronous languages. • More precise WCRT estimates with minimum overhead.

  34. Overview of ILPc TCCFG ILPmodel Tick expressions

  35. Tick Expressions 0 (1,3,5…)

  36. Overview of ILPc TCCFG ILPmodel ILP solver WCRT & Execution path Tick expressions Ticks can be aligned?

  37. Verifying tick alignment 0 ILP model No integer solution

  38. Overview of ILPc TCCFG ILPmodel ILP solver WCRT & Execution path Refinement Tick expressions Ticks can be aligned? Fail Success WCRT

  39. Outline • Timing analysis of concurrent programs • Problem statement • Our approach - ILPc • Results • Conclusions

  40. Benchmarking • Compared with 3 existing approaches [1,2,3] • Conducted in 2 phases • Phase 1: Theoretical performance • Phase 2: Real-world applications • Benchmark computer • Windows based • Quad-core 1.6 GHz CPU • 8 GB memory [1] L. Ju, B. K. Huynh, S. Chakraborty, and A. Roychoudhury. Context-sensitive timing analysis of Esterel programs, DAC, 2009. [2] S. Andalam, P. S. Roop, and A. Girault. Pruning infeasible paths for tight WCRT analysis of synchronous programs, DATE 2011. [3] M. Kuo, R. Sinha, and P. S. Roop. Efficient WCRT analysis of synchronous programs using reachability, DAC, 2011.

  41. Scalability • Analysis time vs. program states. • Analysis time of ILPc • Time taken for each iteration. • Number of program states. • The number of iteration. • Structure and cost distribution.

  42. Benchmarking: Phase 1 • Two sets of benchmarks • Set A - Maximum number of required iterations to find the WCRT. • Set B - Minimumnumber of required iterations to find the WCRT. (Iteration = 1)

  43. Benchmarking: Phase 1 5 5 10 10 5 … 10 Set A 10 5 5 A1 0 0 0 0 10 A2 0 End

  44. Benchmarking: Phase 1 5 5 10 10 5 … 10 Set A 10 5 5 A1 0 0 0 0 10 A2 5 5 5 5 Set B … 0 10 10 10 10 End 0 0 0 0

  45. Benchmarking: Phase 1 Set A

  46. Benchmarking: Phase 1 Set B

  47. Benchmarking: Phase 1 • Same precision. • Analysis time of ILPcdepends heavily on the number of iterations rather than the number of program states. • On average, analysis time of ILPc should be between the worst case and best case scenarios.

  48. Benchmarking: Phase2 Small Large L. H. Yoong and G. D. Shaw. Auckland function block benchmark. University of Auckland, 2010. www.ece.auckland.ac.nz/~pretzel/Auckland_FB_Benchmark.zip

  49. Benchmarking: Phase2 Benchmarks 1-4 (less than 20 threads)

  50. Benchmarking: Phase2 Benchmarks 5-7 (more than 20 threads) >1 hr Out of Memory Out of Memory

More Related