Model-Based Design and Adaptive Scheduling of Distributed Real-Time Systems
Total Page:16
File Type:pdf, Size:1020Kb
Model-Based Design and Adaptive Scheduling of Distributed Real-Time Systems vom Fachbereich Elektrotechnik und Informationstechnik der Technischen Universität Kaiserslautern zur Verleihung des akademischen Grades eines Doktor der Ingenieurwissenschaften (Dr.-Ing.) genehmigte Dissertation von Ali Abbas Jaffari Syed geboren in Hyderabad, Pakistan D 386 Eingereicht am: 25.04.2018 Tag der mündlichen Prüfung: 22.05.2018 Dekan des Fachbereichs: Prof. Dr.-Ing. Ralph Urbansky Promotionskomission Vorsitzender: Prof. Dr.-Ing. Wolfgang Kunz Berichterstattende: Prof. Dipl.-Ing. Dr. Gerhard Fohler Prof. Dr.-Ing. Rolf Ernst Erklärung gem. § 6 Abs. 3 Promotionsordnung Ich versichere, dass ich diese Dissertation selbst und nur unter Verwendung der angegebenen Quellen und Hilfsmittel angefertigt und die aus den benutzten Quellen wörtlich oder inhaltlich entnommenen Stellen als solche kenntlich gemacht habe. Diese Dissertation wurde weder als Ganzes noch in Teilen als Prüfungsarbeit für eine staatliche oder andere wissenschaftliche Prüfung eingereicht. Es wurde weder diese noch eine an- dere Abhandlung bei einem anderen Fachbereich oder einer anderen Universität als Dissertation eingereicht. (Ort, Datum) (Ali Abbas Jaffari Syed) Abstract The complexity of modern real-time systems is increasing day by day. This inevitable rise in complexity predominantly stems from two contradicting requirements, i.e., ever increasing demand for functionality, and required low cost for the final product. The de- velopment of modern multi-processors and variety of network protocols and architectures have enabled such a leap in complexity and functionality possible. Albeit, efficient use of these multi-processors and network architectures is still a major problem. Moreover, the software design and its development process needs improvements in order to sup- port rapid-prototyping for ever changing system designs. Therefore, in this dissertation, we provide solutions for different problems faced in the development and deployment process of real-time systems. The contributions presented in this thesis enable efficient utilization of system resources, rapid design & development and component modularity & portability. In order to ease the certification process, time-triggered computation model is of- ten used in distributed systems. However, time-triggered scheduling is NP-hard, due to which the process of schedule generation for complex large systems becomes convo- luted. Large scheduler run-times and low scalability are two major problems with time- triggered scheduling. To solve these problems, we present a modular real-time scheduler based on a novel search-tree pruning technique, which consumes less time (compared to the state-of-the-art) in order to schedule tasks on large distributed time-triggered sys- tems. In order to provide end-to-end guarantees, we also extend our modular scheduler to quickly generate schedules for time-triggered network traffic in large TTEthernet based networks. We evaluate our schedulers on synthetic but practical task-sets and demonstrate that our pruning technique efficiently reduces scheduler run-times and ex- hibits adequate scalability for future time-triggered distributed systems. In safety critical systems, the certification process also requires strict isolation between independent components. This isolation is enforced by utilizing resource partitioning approach, where different criticality components execute in different partitions (each temporally and spatially isolated from each other). However, existing partitioning ap- proaches use periodic servers or tasks to service aperiodic activities. This approach leads to utilization loss and potentially leads to large latencies. On the contrary to the peri- odic approaches, state-of-the-art aperiodic task admission algorithms do not suffer from problems like utilization loss. However, these approaches do not support partitioned iii scheduling or mixed-criticality execution environment. To solve this problem, we pro- pose an algorithm for online admission of aperiodic tasks which provides job execution flexibility, jitter control and leads to lower latencies of aperiodic tasks. For safety critical systems, fault-tolerance is one of the most important requirements. In time-triggered systems, modes are often used to ensure survivability against faults, i.e., when a fault is detected, current system configuration (or mode) is changed such that the overall system performance is either unaffected or degrades gracefully. In lit- erature, it has been asserted that a task-set might be schedulable in individual modes but unschedulable during a mode-change. Moreover, conventional mode-change exe- cution strategies might cause significant delays until the next mode is established. In order to address these issues, in this dissertation, we present an approach for schedu- lability analysis of mode-changes and propose mode-change delay reduction techniques in distributed system architecture defined by the DREAMS project. We evaluate our approach on an avionics use case and demonstrate that our approach can drastically reduce mode-change delays. In order to manage increasing system complexity, real-time applications also require new design and development technologies. Other than fulfilling the technical require- ments, the main features required from such technologies include modularity and re- usability. AUTOSAR is one of these technologies in automotive industry, which defines an open standard for software architecture of a real-time operating system. However, being an industrial standard, the available proprietary tools do not support model exten- sions and/or new developments by third-parties and, therefore, hinder the software evo- lution. To solve this problem, we developed an open-source AUTOSAR toolchain which supports application development and code generation for several modules. In order to exhibit the capabilities of our toolchain, we developed two case studies. These case stud- ies demonstrate that our toolchain generates valid artifacts, avoids dirty workarounds and supports application development. In order to cope with evolving system designs and hardware platforms, rapid- development of scheduling and analysis algorithms is required. In order to ease the process of algorithm development, a number of scheduling and analysis frameworks are proposed in literature. However, these frameworks focus on a specific class of applica- tions and are limited in functionality. In this dissertation, we provide the skeleton of a scheduling and analysis framework for real-time systems. In order to support rapid- development, we also highlight different development components which promote code reuse and component modularity. iv TO MY LOVING PARENTS ASIF AND GUL-E-ZEHRA “The world cannot defeat you, unless you accept the defeat.” — Ali Ibn-e-Abi Talib Preface During the four years of my work as a researcher and a PhD student, I had a chance to learn a lot about different cultures, work ethics and technical skills. This learning experience also helped in developing a research aptitude and presentation skills, which I lacked at the start. During my working period, I had a chance to meet and work with people from all around the world, who helped me expand the horizon of my knowledge as a researcher. At this point, it would not be an exaggeration to say that in the technical world, whatever I know now, I learned it from Technische Universität Kaiserslautern and, more specifically, from the Chair of Real-Time Systems. At this point, I would like to thank all the people who helped me reach where I am today. First and foremost, I would like to thank Prof. Gerhard Fohler for providing inspiration, be it for research work or for dealing with everyday life. At times, he has been so tough that I thought of giving up. Other times, he has been so patient and supportive that he became an ideal of mine. I believe that this union of yin and yang was necessary for keeping me active and thriving for future. And I am thankful to Prof. Fohler for providing me just that. Other than the work related issues, it has been a pleasure to spend time with him due to his open personality and friendly nature, which is perceived by everyone around him. After having a chance to know about different working environments in Europe, I don’t think that I will ever be as close to my boss as I am to Prof. Fohler. Secondly, I would like to thank Prof. Rolf Ernst and Prof. Wolfgang Kunz for being part of my PhD defense committee and providing valuable feedback which helped improve the quality of the contributions presented in this dissertation. Moreover, I would like to thank all the people who had never-ending but fruitful discussions with me in order to expand my perspective of thinking and, therefore, to improve the work I presented in this dissertation. Specifically, I would like to thank my former colleagues Stefan Schorr, Mitra Nasri, Raphael Guerra and Jens Theis; and my current colleagues Rodrigo Coelho, Gautam Gala, Kritin Krüger, Florian Heilmann, Steven Dietrich and Ankit Agrawal. I am also grateful to Stephanie Jung (aka Steffi) for her support in the world of bureaucracy and thankful to Markus Müller (aka Striker) for his support with extra- ordinary technical acumen. Thank you very much Steffi for helping me out with all the official documentation and for explaining German laws, regulations and bureaucracy, ix which help me in everyday life in Germany. My utmost respect and thanks go to the Striker and the technical assistant at the Chair of Real-Time