
UNIVERSITY OF CALIFORNIA, IRVINE Interactive Worst-case Execution Time Analysis of Hard Real-time Systems DISSERTATION submitted in partial satisfaction of the requirements for the degree of DOCTOR OF PHILOSOPHY in Electrical and Computer Engineering by Trevor Wade Harmon Dissertation Committee: Professor K.H. (Kane) Kim, Chair Professor Kwei-Jay (K.J.) Lin Professor Jean-Luc Gaudiot 2009 c 2009 Trevor Wade Harmon ! Portions of Chapters 2–7 and Appendices A and B c 2007, 2008 IEEE All other materials c 2009 Trevor Wade Harmon unless! otherwise noted ! DEDICATION To my wife, Florence, for her never-ending love and support iii TABLE OF CONTENTS Page LIST OF FIGURES vii LIST OF TABLES x ACKNOWLEDGMENTS xi CURRICULUM VITAE xii ABSTRACT OF THE DISSERTATION xvi 1 Introduction 1 1.1 What Is a True Real-time System? . 4 1.2 The Rise of Distributed Real-time Systems . 7 2 Interactive Analysis 14 2.1 The Importance of Worst-Case Execution Time . 18 2.2 Current Methods for Obtaining WCET . 23 2.3 What Is Interactive Analysis? . 28 2.4 Research Objectives and Contributions . 35 3 Hardware and Software Requirements for Interactive Analysis 39 3.1 The Trouble with C . 40 3.2 Java as a Catalyst . 44 3.3 Java in Real-Time Systems . 51 3.4 Java Microprocessors . 58 4 Annotating Control Flow for Interactive Analysis 66 4.1 Related Work . 70 4.2 Source-Annotated Control Flow Analysis . 73 4.3 Strengths and Limitations of Decompilation . 80 4.4 Cascade: A Control Flow Analysis Tool . 87 4.4.1 Control Flow Graphs vs. Control Flow Trees . 90 4.4.2 Performance of Cascade . 95 4.4.3 Limitations of Cascade . 98 iv 5 Interactive Worst-Case Execution Time Analysis 102 5.1 The Theory of WCET Analysis . 108 5.1.1 Control Flow Analysis . 110 5.1.2 Low-level Analysis . 112 5.1.3 Longest Path Computation . 117 5.2 The Practice of WCET Analysis . 126 5.2.1 Research Prototypes . 127 5.2.2 Commercial Tools . 129 5.3 Interactive WCET Analysis . 131 5.3.1 Back-annotation . 133 5.3.2 Related Work . 134 5.4 The Road to True Interactive WCET Analysis . 139 6 Clepsydra: An Interactive WCET Analysis Tool 140 6.1 An Overview of Clepsydra . 143 6.2 Assumptions and Limitations . 146 6.3 An Editor Plugin for Back-annotation . 149 6.4 The Modular Components of Clepsydra . 152 6.4.1 Analysis Strategy . 152 6.4.2 Loop Bound Strategy . 154 6.4.3 Timing Strategy . 156 6.4.4 Cache Strategy . 157 6.5 Evaluation . 165 6.5.1 Performance Analysis . 166 6.5.2 Accuracy Analysis . 168 6.5.3 Correctness Analysis . 171 7 Interactive Timing Analysis of Software Libraries 174 7.1 Worst-case Execution Time in Libraries . 179 7.2 Goals for Hard Real-time Libraries . 181 7.3 Libraries for Real-time Java . 181 7.4 Related Work . 183 7.4.1 Trigonometric Library Functions . 184 7.4.2 Javolution . 184 7.5 Libraries for Safety-critical Environments . 187 7.6 Requirements for an Analyzable Real-time Library . 190 7.7 Canteen: A Prototype for an Analyzable Library . 192 7.8 Prototype Design and Implementation . 195 7.8.1 Analyzable Memory Consumption . 195 7.8.2 Analyzable Loops . 200 7.9 Prototype Evaluation . 202 7.9.1 Performance Analysis . 203 7.9.2 Predictability Analysis . 207 7.9.3 Heap Allocation Analysis . 211 7.10 Restrictions of an Analyzable Library . 213 v 7.10.1 Memory Pool Restrictions . 213 7.10.2 Exception Handling Compromises . 216 7.10.3 Unimplemented Methods . 217 8 Examples of Interactive WCET Analysis 219 8.1 Hash Functions . 219 8.2 Sensor Polling . 222 9 Conclusions and Future Work 228 Bibliography 231 Appendices 255 A A Survey of Worst-Case Execution Time Analysis for Java . 255 A.1 Bytecode as an Intermediate Representation . 256 A.2 High-level Analysis for the Java Language . 258 A.3 Low-level WCET Analysis for Java Bytecode . 262 A.4 WCET Analysis for Java-specific Processors . 265 A.5 Other Work in WCET Analysis for Java . 267 A.6 Conclusion . 269 B WCET Annotations in Java . 269 B.1 Prior Work in WCET Annotations for Java . 271 B.2 A Lack of Standards . 273 B.3 A Standard for WCET Annotations in Java . 274 B.4 Applying Java’s Annotation Standard to WCET . 282 B.5 A Java Compiler for WCET Annotations . 287 B.6 Conclusion . 289 vi LIST OF FIGURES Page 1.1 Potato sorting machine . 3 1.2 Potato sorting machine in action . 3 1.3 Utility curves . 5 1.4 Cost growth of centralized vs. distributed architectures . 7 1.5 Virtual Yellow 1st and Ten Line . 10 1.6 Linatronic real-time bottle inspector . 12 2.1 Latency measurements in real-time middleware . 16 2.2 The weakness of measurement . 18 2.3 Hierarchy of real-time scheduling algorithms . 20 2.4 Manual WCET analysis . 25 2.5 Automated WCET analysis . 27 2.6 Traditional WCET analysis vs. interactive WCET analysis . 31 2.7 Existing work in real-time systems . 37 2.8 Chapter overview . 38 3.1 Layers of abstraction in interactive analysis . 41 3.2 Top seven stated reasons for Java . 47 3.3 Bytecode abstractions in WCET analysis . 49 3.4 FlexPicker: a three-armed industrial robot . 53 3.5 JAviator: a custom-built quad-rotor helicopter . 54 3.6 ScanEagle: an unmanned aerial vehicle . 55 3.7 Java-powered autonomous underwater vehicle . 55 3.8 Predictability on a Java processor . 60 3.9 The aJile processor on the JStamp board . 63 4.1 Layers of abstraction in interactive analysis . 69 4.2 Control flow analysis in the Soot framework . 72 4.3 Control flow visualization with aiCall . 74 4.4 Control flow visualization with Avrora . 75 4.5 Control flow visualization with WCA . 76 4.6 Sample source code for demonstrating control flow analysis . 77 4.7 Traditional vs. annotated control flow graphs . 79 4.8 Annotated control flow graph . 81 4.9 Source code before obfuscation . 83 vii 4.10 Source code after obfuscation . 84 4.11 A typical decompilation process in Java . 85 4.12 UML diagram of Cascade’s control flow classes . 88 4.13 Annotated control flow tree . 93 4.14 Speed of control flow construction in Cascade . 96 4.15 Speed of control flow drawing in Cascade . 98 4.16 Integration of Cascade into a development environment . 99 5.1 Layers of abstraction in interactive analysis . 104 5.2 Safety versus tightness in WCET analysis . 106 5.3 An example of analyzing JOP’s method cache . 116 5.4 An example of tree-based WCET analysis . 118 5.5 Pseudocode of a tree-based WCET analysis algorithm . 119 5.6 A simple program demonstrating the false path problem . 121 5.7 A control flow graph representation of Figure 5.4 . 124 5.8 Formulation an ILP problem for the IPET algorithm . 125 5.9 Screenshot of the Cinderella WCET analysis tool . 128 5.10 Screenshot of the Chronos WCET analysis tool . 130 5.11 Back-annotation in Kirner’s WCET analysis tool . 136 5.12 Screenshot of the RapiTime WCET analysis tool . 138 6.1 Layers of abstraction in interactive analysis . 143 6.2 WCET analysis in the Volta tool suite . 146 6.3 Clepsydra plugin for jEdit . 150 6.4 Analysis strategy class diagram . 153 6.5 An excerpt of a timing strategy implementation . 157 6.6 Control flow graph with method cache support . 159 6.7 ILP formulation with method cache support . 161 6.8 Pseudocode of an enhanced tree algorithm for method cache analysis 163 6.9 Performance of tree vs. IPET analysis for a single method . 167 6.10 Performance of tree vs. IPET analysis for method invocations . 168 6.11 Clepsydra’s WCET pessimism ratios for a variety of benchmarks . 169 7.1 Photograph of the Mark I computer . ..
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages307 Page
-
File Size-