Semi-Fixed-Priority Scheduling
Total Page:16
File Type:pdf, Size:1020Kb
Semi-Fixed-Priority Scheduling A Dissertation Presented by Hiroyuki Chishiro Submitted to the School of Science for Open and Environmental Systems in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy at Keio University March 2012 c 2012 Hiroyuki Chishiro All rights reserved i Acknowledgments First of all, I would like to express my sincere gratitude to my advisor Prof. Nobuyuki Yamasaki. He has supported my research since I was a bachelor student. I am thankful to Prof. Hiroki Matsutani for his detailed reading. I am proud of obtaining the first Ph.D. in Yamasaki and Matsutani Laboratory. I would like to give my sincere gratitude to Prof. Fumio Teraoka, Prof. Kenji Kono and Prof. Takahiro Yakoh for serving on the dissertation committee. Though they are busy, they have dedicated their time and effort beyond their duty. I sincerely appreciate the technical support from Dr. Kenji Funaoka and Akira Takeda. Without their support, this dissertation could not have been completed. My special thanks go to Dr. Hidenori Kobayashi for completing this dissertation. I am deeply grateful to Dai Yamanaka who invited me to the IRL track and field club. Thanks to his invitation, I have enjoyed my runner’s life. I would like to thank Toshio Utsunomiya for his friendship and encouragement since I was a high school student. Finally, I would like to express my heartfelt thanks to my parents for encouraging my life. ii Abstract Semi-Fixed-Priority Scheduling Hiroyuki Chishiro Real-time systems have been encountering overloaded conditions in dynamic environments. In order to perform real-time scheduling in such overloaded conditions, an imprecise com- putation model, which improves the quality of result with timing constraints, has been pro- posed. In the imprecise computation model, dynamic-priority scheduling algorithms cause high-jitter of the shortest period task. Unfortunately, no fixed-priority scheduling algorithm with low-jitter of the shortest period task can be adapted to the imprecise computation model due to the overrun of the non-critical part. This dissertation first proposes a concept of semi-fixed-priority scheduling to achieve both low-jitter and high-schedulability. Semi-fixed-priority scheduling schedules the part of each imprecise task by fixed-priority. This dissertation also proposes a novel semi-fixed- priority scheduling algorithm based on the Rate Monotonic (RM) algorithm, called Rate Monotonic with Wind-up Part (RMWP). The schedulability analysis proves that a task set is schedulable by the RMWP algorithm if the task set is schedulable by the RM algorithm. In addition, this dissertation extends the RMWP algorithm for global and partitioned schedul- ing algorithms on multiprocessors. This dissertation next presents a real-time operating system for semi-fixed-priority schedul- ing algorithms, called RT-Est. The RT-Est real-time operating system implements two queueing policies for semi-fixed-priority scheduling algorithms, called hybrid scheduler and dual scheduler. The hybrid scheduler is implemented to achieve semi-fixed-priority scheduling algorithms with low overhead. The dual scheduler is an extension of the hybrid scheduler for global scheduling. The effectiveness of semi-fixed-priority scheduling is confirmed through both simulation studies and experimental evaluations. This dissertation concludes that semi-fixed-priority scheduling contributes both theory and practice to practical imprecise computation. iii Contents Acknowledgments ii Abstract iii Contents iv List of Figures vii List of Tables ix 1 Introduction 1 1.1 Background .................................. 1 1.2 Overload in Real-Time Systems ....................... 3 1.3 Multiprocessor Real-Time Systems ...................... 4 1.4 Imprecise Computation ............................ 5 1.5 Motivation ................................... 6 1.6 Research Overview and Contributions .................... 8 1.7 Organization .................................. 9 2 State of the Art 10 2.1 Traditional Computation Models ....................... 10 2.1.1 Liu and Layland’s Model ....................... 10 2.1.2 Traditional Imprecise Computation Model . 10 2.1.3 Practical Imprecise Computation Model . 11 2.1.4 Summary of Traditional Computation Models . 12 2.2 Multiprocessor Real-Time Scheduling .................... 13 2.2.1 Partitioned Scheduling ........................ 13 2.2.2 Global Scheduling .......................... 15 2.2.3 Hybrid Scheduling .......................... 18 2.2.4 Summary of Multiprocessor Real-Time Scheduling . 20 2.3 Real-Time Scheduling for Imprecise Computation . 21 2.3.1 Real-Time Scheduling for Imprecise Computation on Uniprocessors 21 2.3.2 Real-Time Scheduling for Imprecise Computation on Multiprocessors 23 2.3.3 Summary of Real-Time Scheduling for Imprecise Computation . 23 2.4 Real-Time Operating Systems ........................ 24 2.4.1 Real-Time Extensions of General Purpose Operating Systems . 24 2.4.2 Proprietary Real-Time Operating Systems . 26 2.4.3 Summary of Real-Time Operating Systems . 33 iv CONTENTS 2.5 Experimental Evaluations of Multiprocessor Real-Time Scheduling . 34 2.6 Summary of State of the Art ......................... 34 3 System Model 36 3.1 Wind-up Operation .............................. 36 3.2 Computation Model .............................. 38 3.3 Optional Deadline ............................... 39 3.4 Linear Task Model .............................. 40 3.5 Jitter ...................................... 42 4 Semi-Fixed-Priority Scheduling 45 4.1 Basic Strategy ................................. 45 4.2 The RMWP Algorithm ............................ 46 4.2.1 Optional Deadline of the RMWP Algorithm . 46 4.2.2 Schedulability Analysis of the RMWP Algorithm . 48 4.3 The G-RMWP Algorithm ........................... 50 4.3.1 Optional Deadline of the G-RMWP Algorithm . 50 4.3.2 Schedulability Analysis of the G-RMWP Algorithm . 54 4.4 The P-RMWP Algorithm ........................... 55 4.5 Summary of Semi-Fixed-Priority Scheduling . 55 5 RT-Est Real-Time Operating System 57 5.1 System Time Management .......................... 58 5.2 Thread Management ............................. 58 5.3 Ultra Configurable Module .......................... 59 5.4 Implementation of Scheduler ......................... 60 5.4.1 Hybrid Scheduler ........................... 60 5.4.2 Dual Scheduler ............................ 61 5.5 Imprecise Computation ............................ 62 5.6 Architecure Dependent Implementation on x86 Multiprocessors . 65 5.7 Summary of RT-Est Real-Time Operating System . 66 6 Simulation Studies 67 6.1 Simulation Studies on Uniprocessors ..................... 68 6.1.1 Simulation Setups on Uniprocessors . 68 6.1.2 Simulation Results on Uniprocessors . 69 6.2 Simulation Studies on Multiprocessors .................... 71 6.2.1 Simulation Setups on Multiprocessors . 71 6.2.2 Simulation Results on Multiprocessors . 71 6.3 Discussion of Simulation Studies ....................... 91 6.4 Summary of Simulation Studies ....................... 91 7 Experimental Evaluations 93 7.1 Experimental Evaluations on an x86 Uniprocessor . 94 7.1.1 Experimental Setups on an x86 Uniprocessor . 94 7.1.2 Experimental Results on an x86 Uniprocessor . 94 7.2 Experimental Evaluations on an x86 Multiprocessor . 97 7.2.1 Experimental Setups on an x86 Multiprocessor . 97 v CONTENTS 7.2.2 Experimental Results on an x86 Multiprocessor . 98 7.3 Discussion of Experimental Evaluations . 101 7.4 Comparison of Simulation and Experimental Results . 101 7.5 Summary of Experimental Evaluations . 102 8 Conclusions 103 8.1 Summary of Contributions . 103 8.2 Future Directions ............................... 104 Bibliography 106 A Schedulability Analysis of the RMWP Algorithm for Two Tasks 120 List of Papers 124 vi List of Figures 1.1 Value of each computation .......................... 2 1.2 Area of this dissertation in real-time scheduling ............... 7 2.1 Example of task execution in Liu and Layland’s model . 11 2.2 Example of task execution in the traditional imprecise computation model . 11 2.3 Value of result ................................. 12 2.4 Example of task execution in the practical imprecise computation model . 12 2.5 Partitioned scheduling ............................ 13 2.6 Problem of partitioned scheduling ...................... 15 2.7 Global scheduling ............................... 15 2.8 Problem of global scheduling ......................... 17 3.1 Inadequacy of milestone methods ...................... 37 3.2 Infeasible schedule created by exception handling . 37 3.3 Feasible schedule in the practical imprecise computation model . 38 3.4 Feasible schdule with optional deadline in the practical imprecise computa- tion model ................................... 39 3.5 Linear task in the practical imprecise computation model . 40 3.6 Behavior of optional deadline ......................... 41 3.7 Block diagram of an automatic braking system . 42 3.8 Velocity during brake ............................. 43 3.9 Detection delay ................................ 43 3.10 Jitter ...................................... 44 4.1 Split one practical imprecise task into two general tasks . 46 4.2 General scheduling and semi-fixed-priority scheduling . 47 4.3 Task queue .................................. 48 4.4 The RMWP algorithm ............................ 49 4.5 Case of worst case interference time ..................... 50 4.6 Example of schedule generated by the RMWP and RM algorithms . 51 4.7 The G-RMWP algorithm ..........................