54
ILPc: A novel approach for scalable timing analysis of synchronous programs Hugh Wang Partha S. Roop Sidharta Andalam

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

  • Upload
    delila

  • View
    50

  • Download
    0

Embed Size (px)

DESCRIPTION

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 - PowerPoint PPT Presentation

Citation preview

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

ILPc: A novel approach for scalable timing analysis of synchronous programsHugh Wang Partha S. Roop Sidharta Andalam

OutlineTiming analysis of concurrent programsProblem statementOur approach - ILPcResultsConclusions2AcronymsILP Integer Linear ProgramILPs ILP sequentialILPc ILP concurrentEOT = End of Tick also known as pauseTCCFG Timed concurrent control flow graph (Intermediate format)

Synchronous languagesabort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ]when s4Synchronous languagesabort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ]when s5Synchronous languagesabort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ]when sabort startabort end6Synchronous languagesabort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ]when sabort condition7Synchronous languagesabort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ]when sabort conditionFalseTrue8Synchronous languagesabort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ]when sfork9Synchronous languagesabort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ]when s10Synchronous languagesabort [loop foo1(); pause; foo2(); pause; end loop ] || [loop foo3(); pause; foo4(); pause; end loop ]when s11Synchronous languagesTimeRead InputsEmit outputsComputation12Synchronous languagesTimeTick 1Tick 4Tick 2Tick 313Synchronous languagesTimeWorst Case Reaction Time analysis WCRT analysisSynchrony hypothesisReactive system operates infinitely fast compared to the environment.ValidationMin(inter-arrival-time of events) > Max (Reaction Time)

Longest tick14OutlineTiming analysis of concurrent programsProblem statementOur approach - ILPcResultsConclusions15Motivating exampleA1A2A3T1B1B2T2C1C2T3T1 || T2 || T3Motivating exampleA1A2A3T1B1B2T2C1C2T3101520103510Execution Time: 25Motivating exampleA1A2A3T1B1B2T2C1C2T3101520103510Execution Time: 28Motivating exampleA1A2A3T1B1B2T2C1C2T3101520103510Execution Time: 35Conventional approachesMax-plus

Sum the largest execution time of each threadWCRTM. 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 Esterel specifications. CODES-ISSS 2008.20Conventional approachesState exploration

Find all feasible statesFind the largest execution timeWCRTL. 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.ILPsModel checkingReachability21Motivating exampleA1A2A3T1B1B2T2C1C2T3101520103510WCRT analysis

-Max-PlusWCRT = Max(T1) + Max(T2) + Max(T3) = A3 + B1 + C2 = 20 + 10 + 10 = 40 cycles

-State Exploration A1+B1+C1 = 25A2+B2+C2 = 28A3+B1+C1 = 35A1+B2+C2 = 23A2+B1+C1 = 30A3+B2+C2 = 33WCRT = Max(25,28,35,23,30,33) = 35 cyclesTick alignmentScalabilityTradeoffPrecisionAnalysis TimeMax-plusState explorationMotivating exampleA1A2A3T1B1B2T2C1C2T310152010155103Motivating exampleA1A2A3T1B1B2T2C1C2T31015201015510WCRT analysis

-Max-PlusWCRT = Max(T1) + Max(T2) + Max(T3) = A3 + B2 + C2 = 20 + 15 + 10 = 45 cycles

-State Exploration A1+B1+C1 = 25A2+B2+C2 = 40A3+B1+C1 = 35A1+B2+C2 = 35A2+B1+C1 = 30A3+B2+C2 = 45WCRT = Max(25,40,35,35,30,45) = 45 cycles25The problem statement PrecisionAnalysis TimeMax-plusState explorationOur approachOur approach (ILPc)Inspired by counter example guided model checkingAlso has some ideas similar to local model checking

Verify tick alignment Find largest execution time using max-plus approachWCRTSuccessFail27OutlineTiming analysis of concurrent programsProblem statementOur approach - ILPcResultsConclusions28Overview of ILPcTCCFGILP model29ILP modelE1E2E5E4E3E6E7E12E11E8E9E10E17E13E14E15E1630ILP modelE1E2E5E4E3E6E7E12E11E8E9E10E17E13E14E15E1631ILP modelE1E2E5E4E3E6E7E12E11E8E9E10E17E13E14E15E1632ILPCompared with the conventional ILPDirectly capture features of synchronous languages.More precise WCRT estimates with minimum overhead.Overview of ILPcTCCFGILP modelTick expressions34Tick Expressions0(1,3,5)35Overview of ILPcILP solverTCCFGTicks can be aligned?ILP modelTick expressionsWCRT&Execution path36Verifying tick alignment0No integer solution37Overview of ILPcILP solverTCCFGTicks can be aligned?ILP modelTick expressionsWCRT&Execution pathWCRTRefinementSuccessFail38OutlineTiming analysis of concurrent programsProblem statementOur approach - ILPcResultsConclusions39BenchmarkingCompared with 3 existing approaches [1,2,3]Conducted in 2 phasesPhase 1: Theoretical performancePhase 2: Real-world applicationsBenchmark computerWindows basedQuad-core 1.6 GHz CPU8 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.40ScalabilityAnalysis time vs. program states.

Analysis time of ILPcTime taken for each iteration.Number of program states.The number of iteration.Structure and cost distribution.

Benchmarking: Phase 1Two sets of benchmarksSet A - Maximum number of required iterations to find the WCRT.Set B - Minimum number of required iterations to find the WCRT. (Iteration = 1)Benchmarking: Phase 1Set AA1A2End5100510010505100105043Benchmarking: Phase 1510010505100Set AA1A2End51001050Set B510051005100510044Benchmarking: Phase 1Set ABenchmarking: Phase 1Set BBenchmarking: Phase 1Same precision.Analysis time of ILPc depends 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.Benchmarking: Phase2 NameWCRTThreads1ChannelProtocol99772Flasher61773RobotSonar187474DrillStation2751155CruiseControl1931256RailroadCrossing4472307WaterMonitor463140SmallLargeL. H. Yoong and G. D. Shaw. Auckland function block benchmark. University of Auckland, 2010. www.ece.auckland.ac.nz/~pretzel/Auckland_FB_Benchmark.zip48Benchmarking: Phase2 Benchmarks 1-4 (less than 20 threads)

49Benchmarking: Phase2 Benchmarks 5-7 (more than 20 threads)>1 hr

Out of MemoryOut of Memory50Benchmarking: Phase2Results summarySame precision as state exploration approaches.Orders of magnitude faster compared to state exploration approaches for synchronous benchmarks for industrial automation applications.

ConclusionsWe proposed ILPc tailored for timing analysis of concurrent programs.ILPc paves the way for scalable timing analysis through an iterative refinement process.Future work:Consideration of complex architectural features.ILPc variant for the analysis of parallel programs.53Thank you!