Towards Energy-Efficient Real-Time Computing in Embedded Systems
Total Page:16
File Type:pdf, Size:1020Kb
Towards Energy-Efficient Real-Time Computing in Embedded Systems Ashraf Suyyagh Department of Electrical and Computer Engineering Faculty of Engineering, McGill University Montreal, Canada October 2018 A thesis submitted to McGill University in partial fulfillment of the requirements for the degree of Doctor of Philosophy. © 2019 Ashraf Suyyagh ii Dedication For my beloved parents Emad and Lina, For my sisters Diana and Nancy, In memory of my closest friend and mentor Brian Brice, September 25th, 1946 - August 7th, 2018 iv Acknowledgments \And not in utter loneliness to live, Myself at last did to the Devil give!" Goethe, Faust Part II Throughout the time of doing my graduate studies, and as years went by, I came to think of myself as Faust. With no clear path to the end, it has always felt like I have sold my soul to the devil and the time to recollect is ticking. Albeit, this contract is real, and the consequences are dire. Despite this anxious feeling, I am blessed to have known remarkable people who shared this very long journey with me, personally and professionally. These people either directly or indirectly made the journey at times tolerable, at others enjoyable. I would like to take the chance to thank them. First and foremost, I dearly thank my supervisor Prof. Zeljko Zilic, for his continued support, standing by my side, and whenever I doubted myself, he never stopped believing in me. I am greatly indebted to him and thankful for allowing me to learn and share the knowledge of modern embedded systems and ARM technologies. I would also like to thank the University of Jordan for their financial help in my first three years of my program, without which, I would not have started my PhD. I also extend my thanks to my professors and colleagues at the Department of Computer Engineering at the University of Jordan for their support and patience. I would like to thank Prof. Juan Carlos S´aezAlcaide for his generous help and time in helping me use the PMCTrack tool in my research. A multitude of thanks goes to the legions of unsung contributors over all online forums who lent their time and knowledge to help me tackle technical issues related to Linux and bash scripting. To the members of the Integrated Microsystems Laboratory (in no particular order) I want to thank, Ben Nahill, Steve Ding, and Andrey Tolstikhin with whom I had insight- ful and inspirational research discussions that enriched my technical knowledge. To Jason Tong, Bojan Mihajlovi´c,Omid Sarbishei, Majid Janidarmian, Atena Roshan Fekr, Dimitrios Stamoulis, Ari Ramdial, Amir Shahshahani and his wife Sadaf, and Omar Abdelfattah for their unwavering friendship, continued support, and for making my stay in the lab fun and enjoyable. To Chuansheng Dong, George Gal, and Atousa Assadi for the good times we had together. I would also like to acknowledge Alexandre Courtemanche, Harsh Aurora and Loren Peter Lugosch whom I had the pleasure of teaching the microprocessor systems course with. To my current lab colleagues, Anastasios Alexandridis, Junchao Wang, Pavel Sinha, and Farimah Poursafaei, though our time together was short, I extend my best wishes for v your success. Warm thanks go to Aileen Roungou for her friendship and help in editing my French abstract translation. On a personal note, a special thanks goes to Prof. Andraws Sweidan who has always been like a father figure to me, and his family whose kindness will forever be cherished. To my uncle Radwan to whom I am indebted for helping me overcome initial obstacles. To my friend Osaid Matar, his wife Heba Alqub and their son Laith, the good times we have had shall be remembered fondly. To Tammy Hurst for taking her time to introduce me to Montreal, and the opportunities to explore the city and get out of my comfort zone. To Audrey-Ann Raymond, your presence in my life enriched me and helped me grow personally. To my friends in Jordan and over the world, Enas Jaara, Adiy Tweissi, Fadi Ghawanmeh, Ahmad Souri, Diana Nassar, Alia Al-Bashir, Hamza Nassar, and Imen Ben Khalid who tried to the best of their abilities to stay in touch despite the distance, their busy schedule, and time difference. To the memory of Brian Brice, my mentor, and my closest friend. I shall ever be thankful to the daily coffee hour during which we discussed our many shared interests. Your wisdom, unique perspective on various issues, and advice have had a major influence on me. To the countless hours we spent discussing Shakespeare, English history, Greek tragedy, the operas of Wagner and Verdi and the works of Gilbert and Sullivan, Russian literature and world politics. The last months of your worldly existence brought both joyful and painful moments alike. May your soul rest in peace. To the friends of Brian and members of his Carmina Choir, especially Danielle Pullen and her husband Jack Denison, Dr. Gillian Bramwell, Van Lam, and Catherine Pycock, thanks for your support after Brian's passing. Last but not least, I want to thank my parents and sisters for their unconditional love, support, and encouragement. I can never find the right words to give them their due for the sacrifices they have made and the stress and pain my path have caused them. vi Abstract Modern embedded real-time systems are increasingly interconnected with a multitude of sensory devices, other embedded systems, and the cloud. The adoption of high-end embed- ded single core processors and multiprocessors emanates from complex application processing requirements. Timeliness, safety, and deterministic systems are long-standing design and op- erational requirements of embedded systems. Recently, mobility, energy-efficiency, and heat dissipation are equally crucial design requirements in applications including autonomous mo- bile robots, wearable devices, and sensor networks. High-end embedded processors employ energy-reduction techniques like Dynamic Voltage and Frequency Scaling (DVFS) and Dy- namic Power Management (DPM). An effective energy-management strategy simultaneously exploits hardware- and software-level energy-reduction techniques. Initially, this thesis addresses the issue of energy-reduction on DVFS-capable single core systems with peripheral devices. We consider a system-wide minimization problem where we concurrently consider DVFS and DPM. Given that the frequency to task assignment is an NP-hard problem, we appropriate and adapt two metaheuristics in our approach to frequency assignment; namely the differential evolution and genetic algorithms. We ana- lyze the performance of the metaheuristics given various initial conditions and show in our simulations that our approach yields better results than two well-known heuristics. Further, even though discrete-time simulators are sufficient for analyzing real-time sched- ule feasibility, they fall short when evaluating energy-efficient scheduling. This is due to incorrect processor modeling (i.e. due to IP rights, complex processor designs) and the in- ability to capture realistic task behavior. The literature often presents case studies on real hardware to corroborate simulations. However, these approaches are often ambiguous. We propose a methodology that facilitates evaluating real-time systems on real hardware using available embedded benchmarks as system tasks at various system load points. Similar to software simulations, our methodology tackles the issue of examining the system at different utilization points. We build on previous work that estimates task WCET, generates task periods, and assigns task utilizations. The three parameters are interlocked, which limits the flexibility of changing one without affecting the others. We propose a set of efficient algo- rithms that pair tasks with bounded or discrete periods to meet the total system utilization with minimal relative errors. Finally, we address the issue of energy-efficient scheduling on clustered heterogeneous platforms. We focus on energy-efficient partitioning where task allocation to heterogeneous clusters directly impacts the total system energy. In this thesis, we couple the problem of vii energy-efficient partitioning on single-ISA heterogeneous platforms with task-aware schedul- ing. Tasks differ in their instruction mix, cache behavior, memory and I/O access, execution path, and active processing and SoC circuitry. This affects their power demand. We make further use of underlying frequency scaling hardware and sleep states to minimize the system energy. We propose two variants of our Task and Cluster Heterogeneity Aware Partition- ing (TCHAP) algorithm targeting ARM big.LITTLE platforms. Based on our methodology for simulation on real hardware, we show that our algorithms achieve between 13% to 23% energy-reduction on average compared to a state-of-the-art schemes. viii Abr´eg´e Les syst`emestemps-r´eelembarqu´esmodernes sont de plus en plus interconnect´esavec une multitude d'appareils sensoriels, d'autres syst`emesembarqu´eset du \cloud". L'adoption de processeurs monocœurs et multicœurs haut de gamme dans les applications embarqu´ees ´emane des exigences de traitement d'applications complexes. La p´erennit´e,la s´ecurit´eet les syst`emesd´eterministes sont des obligations de conception et de fonctionnement de longue date des syst`emes embarqu´es.R´ecemment, la mobilit´e,l’efficacit´e´energ´etiqueet la dissipa- tion de chaleur sont des exigences de conception tout aussi cruciales dans les applications comprenant les robots mobiles autonomes, les appareils portables et les r´eseauxsensoriels. Les processeurs embarqu´eshaut de gamme utilisent des techniques de r´eductiond'´energie telles que le voltage dynamique, la mise `al'´echelle de la fr´equence(DVFS) et la gestion dynamique de la puissance (DPM). Une strat´egieefficace de gestion de l'´energieexploite simultan´ement les techniques de r´eductionde l'´energieau niveau mat´erielet logiciel. Initialement, cette th`eseaborde le probl`eme de la r´eductionde la consommation d'´energie sur les syst`emesmonocœurs avec mat´erielDVFS et p´eriph´eriques.