page 1  (14 pages)
2to next section

Implementing Analysable Hard Real-time Sporadic Tasks in Ada 9X

A. Burns and A.J. Wellings

Real-time Systems Research Group, Department of Computer Science, University of York, UK

ABSTRACT

In this paper we illustrate how systems containing hard real-time sporadic tasks can

be analysed for their worst case behaviour. In order to undertake this schedulability

analysis, it is necessary to define the minimum inter-arrival time and/or maximum

arrival frequency of sporadic tasks. Furthermore, at run-time it is essential to ensure

that sporadic tasks are not invoked more often than has been guaranteed by the

analysis. We assume that sporadics are invoked by interrupts and that interrupts can

be masked under software control.

Sporadic tasks are often analysed using the notion of bandwidth preserving

sporadic servers within the Rate Monotonic Scheduling Analysis scheme. At run-

time this requires the underlying kernel to support complex execution time

monitoring mechanisms. Unfortunately such mechanisms are not generally

supported by Ada 9X. This paper shows that by using Deadline Monotonic

Scheduling Analysis there is no need to resort to bandwidth preserving sporadic

servers, and the facilities available in Ada 9X can be used.

1. Introduction

In a hard real-time system, tasks are often classified as being either periodic or aperiodic. Periodic

tasks typically sample data or execute a control loop and have explicit deadlines that must be met.

Aperiodic, or sporadic, tasks usually arise from asynchronous events outside the embedded computer.

These tasks have specified response times associated with them. Both periodic and aperiodic tasks

must, if possible, be analysed to give their worst case response times.

In general, aperiodic tasks are viewed as being activated randomly, following for example a

Poisson distribution. Such a distribution allows for "bursty" arrivals of external events but does not

preclude any possible concentration of aperiodic activity. It is therefore not possible to do worst case

schedulability analysis (there is a non-zero probability of any number of aperiodic events occurring).

To allow worst case calculations to be made, there is often defined a minimum interval between any

two aperiodic events (from the same source) or a maximum arrival frequency. If this is the case, the

task involved is said to be sporadic.

Once analysis has been undertaken and the system is deemed to be schedulable at run-time, it

may be necessary to monitor the run-time performance of the system to ensure that the system does

not execute outside its design parameters. Consequently at run-time it is essential to ensure that

sporadic tasks are not invoked more often than has been allowed for by the analysis. We assume that

sporadics are invoked by interrupts and that interrupts can be masked under software control by two

mechanisms: the first is by raising the priority of the processor to the priority of the interrupt; the

second is by setting a status bit in the associated device control register.

Sporadic tasks are often analysed using the notion of bandwidth preserving sporadic

servers5, 9, 10 within the Rate Monotonic Scheduling Analysis scheme. 6 At run-time this requires the

underlying kernel to support complex execution time monitoring mechanisms. Unfortunately such

mechanisms are not generally supported by Ada 9X. This paper shows that by using Deadline

Monotonic Scheduling Analysis there is no need to resort to bandwidth preserving sporadic servers,

and a more natural run-time representation of sporadic tasks can be achieved. Furthermore, the

facilities available in Ada 9X can be used to monitor and enforce sporadic arrival rates such that the