Hardware Reference
In-Depth Information
timer interrupts
J 1
J
2
Q
σ
δ
Figure 10.18
Effects of the overhead on tasks' execution.
10.7
SYSTEM OVERHEAD
The overhead of an operating system represents the time used by the processor for han-
dling all kernel mechanisms, such as enqueueing tasks, performing context switches,
updating the internal data structures, sending messages to communication channels,
servicing the interrupt requests, and so on. The time required to perform these opera-
tions is usually much smaller than the execution times of the application tasks; hence,
it can be neglected in the schedulability analysis and in the resulting guarantee test.
In some cases, however, when application tasks have small execution times and tight
timing constraints, the activities performed by the kernel may not be so negligible
and may create a significant interference on tasks' execution. In these situations, pre-
dictability can be achieved only by considering the effects of the runtime overhead in
the schedulability analysis.
The context switch time is one of the most significant overhead factors in any operat-
ing system. It is an intrinsic limit of the kernel that does not depend on the specific
scheduling algorithm, nor on the structure of the application tasks. For a real-time
system, another important overhead factor is the time needed by the processor to ex-
ecute the timer interrupt handling routine. If Q is the system tick (that is, the period
of the interrupt requests from the timer) and σ is the worst-case execution time of the
corresponding driver, the timer overhead can be computed as the utilization factor U t
of an equivalent periodic task:
U t = σ
Q .
Figure 10.18 illustrates the execution intervals ( σ ) due to the timer routine and the
execution intervals ( δ ) necessary for a context switch. The effects of the timer routine
on the schedulability of a periodic task set can be taken into account by adding the
factor U t
to the total utilization of the task set. This is the same as reducing the least
 
Search WWH ::




Custom Search