Development and Certification of Mixed-Criticality Embedded
Total Page:16
File Type:pdf, Size:1020Kb
Development and Certification of Mixed-criticality Embedded Systems based on Probabilistic Timing Analysis Irune Agirre Troncoso Computer Architecture Department Universitat Polit`ecnicade Catalunya A thesis submitted for the degree of PhD in Computer Architecture May 2018 Development and Certification of Mixed-criticality Embedded Systems based on Probabilistic Timing Analysis Irune Agirre Troncoso May 2018 Universitat Polit`ecnicade Catalunya Computer Architecture Department Thesis submitted for the degree of Doctor of Philosophy in Computer Architecture Advisor: Francisco J. Cazorla, Barcelona Supercomputing Center and IIIA-CSIC Co-advisor: Mikel Azkarate-askatsua, IK4-Ikerlan Technology Research Center The work reported in this Thesis has been conducted in collaboration between the Univer- sitat Polit`ecnicade Catalunya, the Dependable Embedded Systems department of IK4-Ikerlan Technology Research Center and the Computer Architecture and Operating Systems (CAOS) group of the Barcelona Supercomputing Center (BSC). i ii Abstract An increasing variety of emerging systems relentlessly replace or aug- ment the functionality of mechanical subsystems with embedded elec- tronics. For quantity, complexity, and use, the safety of such subsys- tems, often subject to regulation, is an increasingly important matter. Those systems are subject to safety certification to demonstrate sys- tem's safety by rigorous development processes and hardware/software constraints. The massive augment in embedded processors' complexity renders the arduous certification task significantly harder to achieve. The focus of this thesis is to address the certification challenges in multicore architectures: despite their potential to integrate several ap- plications on a single platform, their inherent complexity imperils their timing predictability and certification. For the former, Measurement- Based Probabilistic Timing Analysis (MBPTA) has recently emerged as an alternative to deal with hardware/software complexity. The in- novation that MBPTA brings about is, however, a major step from current certification procedures and standards. The particular contributions of this Thesis include: (i) the definition of certification arguments for mixed-criticality integration upon multi- core processors. In particular we propose a set of safety mechanisms and procedures as required to comply with functional safety standards. For timing predictability, (ii) we present a quantitative approach to as- sess the likelihood of execution-time exceedance events with respect to the risk reduction requirements on safety standards. To this end, we build upon the MBPTA approach and we present the design of a safety-related source of randomization (SoR), that plays a key role in the platform-level randomization needed by MBPTA. And (iii) we evaluate current certification guidance with respect to emerging high performance design trends like caches. Overall, this Thesis pushes the certification limits in the use of multi- core and MBPTA technology in Critical Real-Time Embedded Systems (CRTES) and paves the way towards their adoption in industry. iii iv Acknowledgements I would like to extend thanks to the many people who so generously contributed to the success of this thesis. First and foremost I would like to express my deepest gratitude to my advisors: Dr. Francisco J. Cazorla and Dr. Mikel Azkarate-askatsua for giving me the opportunity to develop this thesis under their direc- tion. I am grateful for their endless support, time, encouragement and knowledge that guided me towards the objectives of this thesis. During these years I had the privilege of collaborating with excellent professionals. I would like to acknowledge Dr. Jaume Abella for sharing his expertise so willingly during my stays in the Barcelona Supercom- puting Center and Dr. Carles Hernandez, Dr. Enrico Mezzetti and prof. Tullio Vardanega for their constructive contributions to this the- sis. I would also like to thank all members with who I had the pleasure to collaborate in the European research project PROXIMA, which laid the foundations of MBPTA for multicore architectures. Many thanks to IK4-Ikerlan for the opportunity and funding that made this thesis possible. I feel lucky to be sharing my workspace with a great group of friends: Irune, I~nakiI., Itxaso, Ane, Peio, Imanol A., Charly, Unai U., Josu L., Asier and Iban A. Special thanks to those colleagues that played a part in this thesis: Itxaso Saenz, Asier Larrucea, Carlos F. Nicolas and Jon Perez. It has also been a great honor to visit the CAOS group in the BSC. Many thanks to all its members for their hospitality. Finally, I would like to thank my family and friends for their uncon- ditional love and support. To all those friends that during these years were by my side: Ibane, Maitane, Erik, Raquel, Miren, Leire, Gloria and Maore. And specially to my fellow travelers in this adventure: Maria and Aitor, for being there for me when I needed it the most. Eskerrik beroenak azkenik senitartekoei, bereziki ama, aita, ahizpa eta Asier-i, emandako aholku, babes eta maitasunagatik. Baita Danel-i ere, azken urtean etxean zabaldu duen alaitasunagatik. v vi Contents 1 Introduction1 1.1 Trends in Mixed-criticality Systems . .2 1.1.1 Increased Integration Needs . .3 1.1.2 Higher Performance Requirements . .4 1.2 Future Mixed-criticality Systems' Challenges . .4 1.2.1 Certification . .5 1.2.2 Timing Predictability . .5 1.3 Contributions . .7 1.3.1 Multicore Mixed-criticality Certification . .8 1.3.2 MBPTA Potential Adherence to Standards . .9 1.3.3 Practical Multicore Certification Compliance . .9 1.4 Thesis Organization . 10 1.5 List of Publications . 11 2 Background and Basic Concepts 15 2.1 Basic Concepts . 15 2.1.1 Safety-critical Embedded Systems . 15 2.1.2 Multicore Processors . 20 2.1.3 Timing Analysis . 22 2.2 Mixed-criticality Integration on Multicores . 27 2.2.1 Partitioning on Multicore Processors . 29 2.2.2 Certification . 31 2.3 Timing Analysis on Multicores . 32 2.3.1 Minimizing Multicore Contention . 32 2.3.2 Accounting for Multicore Contention . 33 2.3.3 Certification . 33 2.4 Summary and Conclusions . 34 3 Experimeltal Setup 37 3.1 Multicore Architectures . 38 3.1.1 COTS Multicore: P4080 . 38 vii CONTENTS 3.1.2 Ad-hoc Multicore: LEON3-MC . 39 3.1.3 Certification-friendly Multicore: AURIX TC27x . 39 3.2 Applications . 40 3.2.1 Industrial Railway Application . 40 3.2.2 Industrial Automotive Application . 42 3.2.3 Microbenchmarks . 43 3.3 Timing Analysis: MBPTA . 44 3.3.1 MBPTA-compliant Time Randomized Platforms . 44 3.3.2 Collecting Measurements . 46 3.3.3 Probabilistic Analysis . 46 4 Safety Argument for Multicore Mixed-criticality Systems 47 4.1 Notation . 48 4.2 Overall Safety Argument . 49 4.3 Common-practice Federated Approach . 51 4.4 Mixed-criticality Integration . 52 4.4.1 Integrated Safety Architecture . 53 4.4.2 Failure Analysis . 55 4.4.3 Safety Measures . 58 4.5 Multicore Integration . 63 4.5.1 Multicore Safety Architecture . 63 4.5.2 Independence in Multicore Architectures . 64 4.6 Summary . 66 5 Multicore Mixed-criticality Safety Concept 67 5.1 Glossary . 68 5.2 Railway Safety Concept . 69 5.2.1 Safety Requirements . 69 5.2.2 Federated Safety Concept . 70 5.2.3 Integrated Node Architecture . 73 5.2.4 Failure Analysis . 76 5.2.5 Safety Measures . 78 5.2.6 Detailed Tables . 85 5.3 Automotive Safety Concept . 90 5.3.1 Safety Requirements . 90 5.3.2 Federated Safety Concept . 91 5.3.3 Integrated Node Architecture . 94 5.3.4 Failure Analysis . 95 5.3.5 Safety Measures . 97 5.3.6 Detailed Tables . 106 5.4 Summary . 110 viii CONTENTS 6 Fitting Execution-Time Exceedance into Safety Standards 113 6.1 Systematic and Random Faults in IEC 61508 . 114 6.1.1 Software Faults . 115 6.1.2 Hardware Faults . 116 6.2 Execution Time Exceedance Rates . 117 6.3 MBPTA Adherence to IEC 61508 . 119 6.3.1 MBPTA Application and Feasibility . 119 6.3.2 MBPTA in IEC 61508 Safety Life-cycle . 122 6.3.3 Cut-off Probability Determination . 124 6.4 Domain-specific Standards . 125 6.5 Experimental Support Evidence . 126 6.5.1 Collecting Analysis-time Observations . 126 6.5.2 Application of MBPTA . 128 6.6 Summary . 132 7 Safety-Related Pseudo-Random Number Generator 133 7.1 High-Quality Low-Cost PRNG . 134 7.1.1 Sought Properties . 135 7.1.2 MBPTA Convenient PRNG . 136 7.2 PRNG for Multicore Platforms . 139 7.2.1 Multicore Requirements . 139 7.2.2 Sharing PRNG Modules . 140 7.3 SIL 3 Compliant PRNG . 141 7.3.1 Safety Requirements . 143 7.3.2 Safety Techniques . 143 7.3.3 System Reaction to Errors . 145 7.4 Evaluation . 146 7.4.1 LFSR's Sought Properties . 146 7.4.2 PRNG Integration in a Multicore Prototype . 147 7.5 Summary . 148 8 Practical CAST-32A Compliance on COTS Multicores 151 8.1 Overview of CAST-32A Principles . 152 8.1.1 General Definitions . 152 8.1.2 CAST-32A Objectives . 153 8.2 Interpretation and Achievability of CAST-32A Objectives . 154 8.2.1 Robust Resource Partitioning (RRP) . 154 8.2.2 Robust Time Partitioning (RTP) . 157 8.2.3 Individual Objectives . 158 8.3 Evaluation on Complex COTS Multicore . 159 8.3.1 Defining Hardware Configuration Settings . 159 ix CONTENTS 8.3.2 Identifying Interference Channels . 162 8.4 Summary . 167 9 Conclusions and Future Work 169 9.1 Summary of Contributions . 169 9.2 Impact . 171 9.3 Future Work . 173 x List of Figures 1.1 Logical organization of Thesis' contributions. .8 2.1 Relation among safety certification standards. 16 2.2 IEC 61508 safety life-cycle (IEC61508). 17 2.3 Illustrative example of (timing) Fault, Error and Failure. 19 2.4 Generic COTS based multicore architecture. 20 2.5 Basic concepts for Worst-Case Execution Time (WCET) analy- sis (WEE+08).