ebook img

Reducing the Cost of Real-Time Software through a Cyclic Task Abstraction for Ada PDF

211 Pages·2017·11.09 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Reducing the Cost of Real-Time Software through a Cyclic Task Abstraction for Ada

Reducing the Cost of Real-Time Software through a Cyclic Task Abstraction for Ada Assisted by Acton: the novel Ada real-time executive Patrick Bernardi A thesis submitted for the degree of Doctor of Philosophy The Australian National University February 2017 Declaration I hereby declare this thesis is my own original work carried out exclusively for the degree of Doctor of Philosophy at the Australian National University. Contribution by others though feedback, editing and prior work are acknowl- edged in the customary manner. Patrick Bernardi February 9, 2017 © Patrick Bernardi 2017 i 2 ii Abstract Ada is unique as a software engineering language, facilitating the development of reliable and maintainable software through clear, unam- biguous, modular code enforced to a specification. However, despite compre- hensive real-time systems support, Ada lacks the abstraction at the heart of these systems: cyclic tasks. Without it, users resort to solutions decomposing their designs: introducing unnecessary complexity to a real-time systems prim- itive. Furthermore, the only Ada executive for microcontrollers, GNAT for Bare Boards, impedes the timing analysis of tasks and schedulability analysis of systems. Consequently, Ada and its environments do not reach their potential of producing low-cost, reliable and maintainable real-time systems. This thesis unlocks this latent potential through the development of the Cyclic Task Specification and Acton. The Specification extends Ada to incorporate cyclic tasks within Ada’s existing task abstraction using a simple but powerful model. Acton, on the other hand, is a new Ada executive built from the ground up to support real-time systems, forgoing an existing Ada tasking run-time in favour of building the tasking semantics natively within its kernel. The result is a flexible and portable Ada executive which correctly apportions execution time and enforces cyclic task attributes. Furthermore, tasks only perform user assigned activities and lower priority tasks cannot interrupt a running task. Their contributions come at the cost of a more complex language and larger execution time overheads for kernel operations. For Acton, the up to order of magnitude larger overheads is the cost of simplifying task timing and system schedulability analysis. For the Cyclic Task Specification, the added complexity simplifies the expression of cyclic task patterns for a wide range of systems. Its simple model centred on task attributes permits model expansion outside the formal language, addressing aversions to incorporating high-level abstractions. Together, the Cyclic Task Specification and Acton advance real-time systems by providing the clarity, structure and simplicity needed to express cyclic tasks and have their real-time constraints enforced at run-time. Furthermore, real-time analysis tools can now use the same cyclic task semantic information as the compiler to provide automatic timing verification and run-time enforceable cyclic constraints. Consequently, the contributions of this thesis allow real-time systems to use less code and have less scope for faults: reducing the life-cycle cost of real-time systems through quicker development and maintenance. iii 2 iv Acknowledgements I would not have embarked down the long journey of a postgrad- uate degree if not for my supervisor Uwe Zimmer. His convincing arguments for a topic on autonomous model helicopters proved irresistible compared to my then favoured option of working in telecommunication industry. For the reader this will be puzzling because, as presented, this thesis has nothing to do with autonomous model helicopters. However, when push came to shove on a failing autonomous model helicopter project, I switched to a question that was gnawing at me more than the failed autonomous electronic hardware I had in my hands: “Why was there no Ada tasking run-time for my rather powerful mi- crocontroller and why does Ada not support the high-level real-time abstractions I was taught and used in my designs? ” The origin of this question lies very much with Uwe, but from his role as a teacher rather than as a supervisor. Uwe taught Ada and real-time systems in two courses I took as an undergraduate. His style of teaching led me to ap- preciate and value the power Ada and real-time systems bring to the building of reliable, maintainable and predicable systems. However, the hallmark of a great teacher is not the knowledge imparted but the inspiration and curiosity planted to seize on the gained knowledge. Uwe achieved this, instilling the expectation of having the right tools for the task at hand. Uwe is a teacher par excellence, whom I thank for his teaching, and his ongoing advice, appraisal and support throughout the thesis. I am also grateful to acknowledge another teacher par excellence from my youth, Frank O’Shea, for his influence and passion for mathematics. This thesis, however, needed more than determination, inspiration and support to make it possible: it needed a high quality Ada environment from which my ideas could integrate. AdaCore delivered this in the form of the GNAT Ada en- vironment and I thank the many people who developed it for producing such a high-quality and accessible open-source Ada environment. It is a testament to its design that someone without any experience developing compilers can step-in and learn not just how the GNAT compiler works, but also how com- pilers work generally. Furthermore, exposure to GNAT has taught me how to properly write software, particularly for large systems, for which I am thankful. v vi Nevertheless, I cannot diminish the immense support by others. To my fellow PhD students Florian Poppa and Ben Coughlan I thank for the amazing of- fice atmosphere and friendships. Our office was one of engaging discussions, encouragement and support: providing a valuable environment for sounding board ideas. To the participants of IRTAW-17 I thank for the warm welcome I received to the small community, and for their invaluable input to refine the rough edges of the Cyclic Task Specification. I would like to end by thanking my friends and family who provided vast support and encouragement over the course of my thesis; each in their own cherished way. In particular, special mention goes to Paul Altin and Steve Pe- terson. To my brother James and sister Maria I thank them for reading sections of my thesis and making my life more fulfilling. Finally, to my parents Linda and John, I thank them for their unwavering sup- port and generosity. Without them, I would not be where I am today. Contents Declaration i Abstract iii Acknowledgements v Contents vii Chapter 1 Introduction 1 Task Abstraction 2 Task Abstraction Implementation 3 Outline 5 Thesis Conventions 6 Chapter 2 Cyclic Tasks and Ada 9 Cyclic Task Definitions and Properties 11 Ada’s Real-Time Facilities 15 Implementing Cyclic Tasks in Ada 16 Prior Work Incorporating Cyclic Tasks into Ada 30 Cyclic Tasks in Other Languages 32 Conclusion 38 Chapter 3 The Cyclic Task Specification 41 The Specification 42 Examples 51 Implementation 54 Ada Semantic Interface Specification 56 Language Impact and Flexibility 62 Comparison with Existing Ada Approaches 65 Conclusion 72 Chapter 4 Review of GNAT for Bare Boards for Real-Time Systems 75 GNAT 76 GNAT for Bare Boards 79 Real-Time Problems in GNAT for Bare Boards 84 Conclusion 89 vii viii Chapter 5 Acton 91 Rationale 92 Architecture 93 Oak Resources 96 The Oak Run-Loop 112 Scheduling 116 Task Management 123 Cyclic Tasks 128 Protected Objects 134 Interrupt Handling 143 Conclusion 148 Chapter 6 Review of Acton 151 Platforms and Setup 152 Kernel Design 154 Scheduling and Task Dispatching 158 Idle State 163 Protected Objects 164 Interrupt Handling 165 Memory Footprint 166 Portability 169 Language Cover 169 Conclusion 172 Chapter 7 Conclusion 175 Future Work 179 Appendix A Cyclic Task Libraries 181 Appendix B References 189

Description:
icy. Thus, a task with a deadline can run unmodified on any Ada task .. STMicroelectronics' STM32F4 — devices possessing as little as 64KB RAM
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.