Worst-Case Execution Time Analysis Martin Toft mt@cs.aau.dk PhD student Distributed and Embedded Systems Department of Computer Science Aalborg University October 22, 2009
Introduction The challenges My research Embedded software System types WCET analysis Embedded software is everywhere Consumer electronics Household appliances Home automation Transportation Industrial production plants Medical equipment Military equipment Trend: more software, less specialised hardware Easier to upgrade/change software than hardware Picture: http://www.xdesignlabs.com/guide/xtachbig.jpg 1 / 10 Martin Toft Worst-Case Execution Time Analysis
Introduction The challenges My research Embedded software System types WCET analysis Safety-critical systems Many safety-critical systems are controlled by embedded software The Therac-25 accidents, 1985-1987, where patients in at least six cases were given massive overdoses of radiation The Ariane 5 Flight 501, 1996, where an incorrect number conversion caused the space ship to explode Pictures: http://instantmedicalcare.com/images/galler/instantmedicalcare-image-gallery-xray-machine.jpg http://www.educnet.education.fr/orbito/lanc/enviro/images/explo501.jpg http://www.zeitgeistzephyr.com/wordpress/wp-content/uploads/2009/08/a_ariane5.gif 2 / 10 Martin Toft Worst-Case Execution Time Analysis
Introduction The challenges My research Embedded software System types WCET analysis Software bugs are still a problem today 3 / 10 Martin Toft Worst-Case Execution Time Analysis
Introduction The challenges My research Embedded software System types WCET analysis Time-critical systems Again, many safety-critical systems are time-critical Not enough that calculations are correct Systems controlled by embedded software Must be carried out in a timely fashion Safety−critical systems There are strict deadlines Time−critical systems For example: anti-lock brakes on a car, steering gear on an airplane Also known as “real-time systems” 4 / 10 Martin Toft Worst-Case Execution Time Analysis
Introduction The challenges My research Embedded software System types WCET analysis Time-critical systems (cont.) A real-time system consists of: A number of processes A scheduler The processes have a number of properties, e.g.: Type (periodic/aperiodic) Period (if periodic) (T) Priority (P) Deadline Worst-case execution time (WCET) a Process P T WCET a 1 80 40 b b 2 40 10 c 3 20 5 c 0 10 20 30 40 50 60 70 80 5 / 10 Time Martin Toft Worst-Case Execution Time Analysis
Introduction The challenges My research Embedded software System types WCET analysis Worst-case execution time analysis “Provide guarantees for proper timing behaviour by computing bounds for processes’ execution time on given hardware platforms” Measurement-based methods are unsafe All possible input values from the environment must be considered The way to go: analyse the processes’ code without executing it Probability UNSAFE SAFE ��������������������� ��������������������� ��������������������� ��������������������� ��������������������� ��������������������� ��������������������� ��������������������� TIGHT ��������������������� ��������������������� ��������������������� ��������������������� ��������������������� ��������������������� ��������������������� ��������������������� Time ��������������������� ��������������������� ��������������������� ��������������������� possible execution times upper WCET bound 6 / 10 Martin Toft Worst-Case Execution Time Analysis
Introduction The challenges My research Modern hardware Modularity Ease of use Modern hardware is complex The WCET of a process depends on the hardware platform The effects of optimisation features in the platform, e.g. caching and pipelining, must be captured Caching: store frequently used data in a fast memory Pipelining: parallelise the steps involved in executing a process Cycle Stage 1 Stage 2 Stage 3 Stage 4 Processor core 1 Instr. 1 2 Instr. 2 Instr. 1 3 Instr. 3 Instr. 2 Instr. 1 Cache memory 4 Instr. 4 Instr. 3 Instr. 2 Instr. 1 5 Instr. 5 Instr. 4 Instr. 3 Instr. 2 Main memory 7 / 10 Martin Toft Worst-Case Execution Time Analysis
Introduction The challenges My research Modern hardware Modularity Ease of use The approach must be modular Substitution of sub-analyses in order to experiment with different combinations Component-based model of the hardware platform Reuse of components Experimentation with components in order to reduce system costs Picture: http://leax.dk/uploads/images/ETNA/puzzle.jpg 8 / 10 Martin Toft Worst-Case Execution Time Analysis
Introduction The challenges My research Modern hardware Modularity Ease of use Ease of use Many hardware platforms exist New platforms enter the market all the time It must be possible for non-computer-scientists to create support for new platforms Reuse of components due to modularity Picture: http://www.sciencedaily.com/images/2009/02/090220102249-large.jpg 9 / 10 Martin Toft Worst-Case Execution Time Analysis
Introduction The challenges My research Overview My research: WCET analysis using model checking and static analysis 10 / 10 Martin Toft Worst-Case Execution Time Analysis
Thank you for your attention Questions? These slides are available at http://martintoft.dk/slides/procom-course.pdf
Recommend
More recommend