Book contents
- Frontmatter
- Contents
- List of illustrations
- List of tables
- Foreword
- Preface
- 1 Introduction and overview
- 2 Sequential programming with Ada
- 3 Task basics
- 4 Communication and synchronization based on shared objects
- 5 Communication and synchronization based on direct interaction
- 6 Distributed systems with Ada
- 7 Real-time systems and scheduling concepts
- 8 Real-time programming with Ada
- 9 Tools for building and verifying real-time applications
- References
- Index
8 - Real-time programming with Ada
Published online by Cambridge University Press: 01 June 2011
- Frontmatter
- Contents
- List of illustrations
- List of tables
- Foreword
- Preface
- 1 Introduction and overview
- 2 Sequential programming with Ada
- 3 Task basics
- 4 Communication and synchronization based on shared objects
- 5 Communication and synchronization based on direct interaction
- 6 Distributed systems with Ada
- 7 Real-time systems and scheduling concepts
- 8 Real-time programming with Ada
- 9 Tools for building and verifying real-time applications
- References
- Index
Summary
In Chapter 7, we presented an overview of real-time scheduling theory. Those discussions were independent of any programming language. This chapter explains how to write real-time applications in Ada that are compliant with that scheduling theory. A compliant Ada program can be analyzed thereby increasing the application's reliability.
Ada practitioners have two international standards available for producing compliant Ada programs: Ada 2005 and POSIX 1003.1b. In order to apply real-time scheduling theory with these standards, we need some means to:
Implement periodic tasks. This implementation requires a way to represent time, a way to enforce periodic task release times, and a way to assign priorities to both tasks and shared resources.
Activate priority inheritance protocols for the shared resources.
And of course, select and apply a scheduler such as those presented in Chapter 7 (e.g. fixed priority scheduler or Earliest Deadline First).
The Ada 2005 and POSIX 1003.1b standards provide the means to create compliant programs through pragmas and specific packages. Real-time specific pragmas and packages for Ada 2005 are defined in Annex D of the Ada Reference Manual. The Ada binding POSIX 1003.5 provides the packages that allow us to create compliant real-time Ada programs using the POSIX standard.
The first six sections of this chapter discuss and use the packages and pragmas of Annex D. Section 8.1 shows how to express timing constraints of tasks with an Ada package called Ada.Real_Time.
- Type
- Chapter
- Information
- Building Parallel, Embedded, and Real-Time Applications with Ada , pp. 294 - 332Publisher: Cambridge University PressPrint publication year: 2011