
Institute of Software Technology Department of Programming Languages and Compilers University of Stuttgart Universitätsstraße 38 D–70569 Stuttgart Master Thesis Nr. 3372 Visualization of Scheduling in Real-Time Embedded Systems Peter Munk Course of Study: INFOTECH Examiner: Prof. Dr. rer. nat./Harvard Univ. Erhard Plödereder Supervisor: Dipl.-Inf. Mikhail Prokharau Commenced: July 17, 2012 Completed: January 16, 2013 CR-Classification: D.4.1, D.4.8, C.4.d, I.6.8.i Abstract Many embedded systems, especially real-time systems, are used in safety-critical applications such as cars and aircraft. The consequences of different scheduling algorithms for such systems have to be properly understood. Software which simulates scheduling processes supports the research and development of new scheduling policies. It may be used for educational purposes, as simulation and visualization enhance the understanding of the consequences of scheduling decisions. This thesis introduces new, flexible, and extensible discrete event-driven simulation software. The software focuses on but is not limited to scheduling policies primarily used in real-time and embedded systems. Contrary to most existing scheduling simulators, it synchronously simulates and visualizes the current simulation result. In order to inspect the current scheduling situation in closer detail, the software is designed to allow pausing the simulation automatically on the occurrence of specific points of interest or manually at an arbitrary time. The simulation model is specified by a human-readable file which is loaded by the software. During the simulation, elements are added to the simulation model and each element is visualized. The simulation meta-model is designed to support a variety of system configurations. It supports shared resources with several units as well as multiple processing units. A set of scheduling policies and resource access protocols for single-core systems as well as a basic multi-core protocol were implemented and demonstrate the functionality of the software. 3 Acknowledgement I want to thank Prof. Dr. rer. nat./Harvard Univ. Erhard Plödereder for giving me the possibility to write my master thesis at the Institute of Software Technology, Department of Programming Languages and Compilers at the University of Stuttgart. Furthermore I would like to thank my supervisor Dipl.-Inf. Mikhail Prokharau for his continuous supervision and insightful guidance with fruitful discussions, inspiring suggestions and valuable reviews throughout my work on this thesis. A special thank you goes to Sandra Erne for both, proof-reading this work and always having a sympathetic ear. I am profoundly grateful to my parents Roland and Mechthild Munk for their constant encouragement and support during the past 26 years. It is my pleasure to express my gratitude to all the people who contributed, in whatever manner, to the success of this work. 5 Contents 1 Introduction 13 1.1 Motivation...................................... 13 1.2 Objective....................................... 14 1.3 Structure....................................... 14 2 Definitions 17 2.1 An Embedded System................................ 17 2.2 A Real-Time System................................. 17 2.3 Task.......................................... 18 2.4 Core.......................................... 19 2.5 Resource........................................ 20 2.6 Scheduler....................................... 20 3 Project Management and Software Engineering 21 3.1 Project Management................................. 21 3.2 Software Engineering Methods........................... 21 3.2.1 Prototyping.................................. 22 3.2.2 Incremental Delivery............................. 22 3.2.3 Continuous Integration........................... 22 4 Related Work 23 4.1 Schedule Visualization Projects........................... 23 4.1.1 Jedule..................................... 23 4.1.2 Pajé...................................... 23 4.1.3 Summary................................... 24 4.2 Schedule Simulation Projects............................ 24 4.2.1 STRESS.................................... 24 4.2.2 GHOST.................................... 24 4.2.3 RTSIM.................................... 25 4.2.4 FORTISSIMO................................ 25 4.2.5 MAST..................................... 26 4.2.6 RTsim..................................... 27 4.2.7 VizzScheduler................................. 27 4.2.8 ARTISST................................... 27 4.2.9 Cheddar.................................... 27 4.2.10 Realtss.................................... 28 4.2.11 RTSSim.................................... 28 7 4.2.12 Alea 2..................................... 29 4.2.13 STORM.................................... 29 4.2.14 Schesim.................................... 30 4.2.15 Summary................................... 30 5 Frameworks and Libraries 33 5.1 Graphical Frameworks................................ 33 5.1.1 Swing..................................... 33 5.1.2 Visualization Libraries for Swing...................... 34 5.1.3 A Swing prototype.............................. 35 5.1.4 Eclipse RCP and SWT............................ 36 5.1.5 An Eclipse prototype............................. 38 5.1.6 Comparison of Swing and Eclipse...................... 39 5.2 Serialization Frameworks............................... 40 5.2.1 JBP...................................... 40 5.2.2 JAXB..................................... 42 5.2.3 EMF...................................... 43 5.2.4 Summary................................... 44 6 Design 45 6.1 System Model..................................... 46 6.1.1 Tasks..................................... 47 6.1.2 Cores..................................... 49 6.1.3 Resources................................... 49 6.1.4 Events..................................... 50 6.2 Simulation Parameters................................ 50 6.3 Simulator....................................... 51 6.3.1 Discrete Event Simulation.......................... 51 6.3.2 Simulation Thread.............................. 52 6.3.3 Time Axis and Jobs............................. 53 6.3.4 Scheduler Interface.............................. 54 6.3.5 Task Monitor................................. 55 6.3.6 Resource Monitor............................... 56 6.3.7 Event Analyzer................................ 56 6.3.8 Operation of the simulator......................... 56 6.4 Visualization..................................... 58 6.4.1 Edit Parts................................... 59 6.4.2 Main View.................................. 59 6.5 Exception Handling................................. 59 7 Implementation 61 7.1 Eclipse RCP Specifics................................ 61 7.1.1 Plug-in Hierarchy............................... 61 7.1.2 Commands and Handlers.......................... 62 7.1.3 Preferences.................................. 62 8 7.1.4 Scheduler and Event Analyzer Extension Points.............. 63 7.1.5 Deployment.................................. 63 7.2 Visualization..................................... 64 7.2.1 Element Overview.............................. 64 7.2.2 Raster Graphics Export........................... 65 7.2.3 Vector Image Export............................. 66 7.2.4 Tool Bar Contribution............................ 66 7.2.5 Property View................................ 67 7.3 Simulation Kernel.................................. 68 7.3.1 Simulator................................... 68 7.3.2 Time Axis and Jobs............................. 68 7.3.3 Task Monitor................................. 68 7.3.4 Resource Monitor............................... 70 7.3.5 Event Analyzer................................ 70 8 Scheduling Policies 71 8.1 Cyclic Executive................................... 71 8.2 Fixed-Priority Preemptive Scheduler........................ 72 8.2.1 Task Creation Delay............................. 72 8.2.2 RMS and DMS................................ 73 8.2.3 Priority Queues................................ 73 8.3 Fixed-Priority Non-Preemptive Scheduler..................... 73 8.4 Simple Priority Inheritance............................. 73 8.5 Transitive Priority Inheritance........................... 74 8.6 Original Ceiling Priority Protocol.......................... 75 8.7 Immediate Ceiling Priority Protocol........................ 76 8.7.1 ICPP definition................................ 76 8.7.2 Unspecified Behavior............................. 77 8.7.3 Extended ICPP Definition.......................... 78 8.7.4 ICPP Implementation............................ 80 8.8 Differentiation of Blocking States.......................... 80 8.8.1 Direct blocking................................ 81 8.8.2 Inheritance blocking............................. 83 8.8.3 Ceiling blocking............................... 83 8.9 Earliest Deadline First................................ 84 8.10 Stack Resource Protocol............................... 85 8.11 Adding a Scheduler.................................. 86 8.12 Multi-Core Scheduling Policies........................... 86 8.12.1 Partitioned Multi-Core Scheduler...................... 87 9 Validation and Tests 89 9.1 Unit Testing...................................... 89 9.2 System Testing.................................... 90 9.3 Code Conventions Check............................... 91 9 10 Conclusion and further research 93 10.1 Conclusion...................................... 93 10.2 Further Research................................... 95 Bibliography 97 Glossary
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages109 Page
-
File Size-