Skip to main content Accessibility help
×
Hostname: page-component-8448b6f56d-c4f8m Total loading time: 0 Render date: 2024-04-19T16:42:56.233Z Has data issue: false hasContentIssue false

8 - Real-time programming with Ada

Published online by Cambridge University Press:  01 June 2011

John W. McCormick
Affiliation:
University of Northern Iowa
Frank Singhoff
Affiliation:
Université de Bretagne Occidentale
Jérôme Hugues
Affiliation:
Institute for Space and Aeronautics Engineering (ISAE), Toulouse
Get access

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:

  1. 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.

  2. Activate priority inheritance protocols for the shared resources.

  3. 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
Publisher: Cambridge University Press
Print publication year: 2011

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×