Hardware Reference
In-Depth Information
1.3.7
PROGRAMMING LANGUAGE
Besides the hardware characteristics of the physical machine and the internal mech-
anisms implemented in the kernel, there are other factors that can determine the pre-
dictability of a real-time system. One of these factors is certainly the programming
language used to develop the application. As the complexity of real-time systems in-
creases, high demand will be placed on the programming abstractions provided by
languages.
Unfortunately, current programming languages are not expressive enough to prescribe
certain timing behavior and hence are not suited for realizing predictable real-time
applications. For example, the Ada language (required by the Department of Defense
of the United States for implementing embedded real-time concurrent applications)
does not allow the definition of explicit time constraints on tasks' execution. The delay
statement puts only a lower bound on the time the task is suspended, and there is no
language support to guarantee that a task cannot be delayed longer than a desired upper
bound. The existence of nondeterministic constructs, such as the select statement,
prevents the performing of a reliable worst-case analysis of the concurrent activities.
Moreover, the lack of protocols for accessing shared resources allows a high-priority
task to wait for a low-priority task for an unbounded duration. As a consequence, if
a real-time application is implemented using the Ada language, the resulting timing
behavior of the system is likely to be unpredictable.
Recently, new high-level languages have been proposed to support the development
of hard real-time applications. For example, Real-Time Euclid [KS86] is a program-
ming language specifically designed to address reliability and guaranteed schedula-
bility issues in real-time systems. To achieve this goal, Real-Time Euclid forces the
programmer to specify time bounds and timeout exceptions in all loops, waits, and
device accessing statements. Moreover, it imposes several programming restrictions,
such as the ones listed below:
Absence of dynamic data structures . Third-generation languages normally per-
mit the use of dynamic arrays, pointers, and arbitrarily long strings. In real-time
languages, however, these features must be eliminated because they would pre-
vent a correct evaluation of the time required to allocate and deallocate dynamic
structures.
Absence of recursion . If recursive calls were permitted, the schedulability ana-
lyzer could not determine the execution time of subprograms involving recursion
or how much storage will be required during execution.
Search WWH ::




Custom Search