Hardware Reference
In-Depth Information
real-time systems, predictability is more important than high performance, and
often an increased functionality can only be reached at the expense of a higher
runtime overhead. Other important features that a real-time system should have
include maintainability, fault-tolerance, and overload management.
1.4
Three approaches can be used. The first one is to disable all external interrupts,
letting application tasks access peripheral devices through polling. This solu-
tion gives great programming flexibility and reduces unbounded delays caused
by the driver execution, but it characterized by a low processor efficiency on
I/O operations, due to the busy wait.
A second solution is to disable interrupts and handle I/O devices by polling
through a dedicated periodic kernel routine, whose load can be taken into ac-
count through a specific utilization factor. As in the previous solution, the
major problem of this approach is due to the busy wait, but the advantage is
that all hardware details can be encapsulated into a kernel routine and do not
need to be known to the application tasks. An additional overhead is due to the
extra communication required among application tasks and the kernel routine
for exchanging I/O data.
A third approach is to enable interrupts but limit the execution of interrupt
handlers as much as possible. In this solution, the interrupt handler activates a
device handler, which is a dedicated task that is scheduled (and guaranteed) by
the kernel as any other application task. This solution is efficient and minimizes
the interference caused by interrupts.
1.5
The restrictions that should be used in a programming language to permit
the analysis of real-time applications should limit the variability of execution
times. Hence, a programmer should avoid using dynamic data structures, re-
cursion, and all high level constructs that make execution time unpredictable.
Possible language extensions should be aimed at facilitating the estimation of
worst-case execution times. For example, a language could allow the program-
mer to specify the maximum number of iterations in each loop construct, and
the probability of taking a branch in conditional statements.
SOLUTIONS FOR CHAPTER 2
+
2.1
A schedule is formally defined as a step function σ :
R
N
such that
+ ,
t
[ t 1 ,t 2 ) σ ( t )= σ ( t ). For any
t
R
t 1 ,t 2 such that t
[ t 1 ,t 2 ) and
k> 0, σ ( t )= k , means that task J k
is executing at time t , while σ ( t )=0
Search WWH ::




Custom Search