Real Time Systems Design And Analysis

Chapter 7.2. - Performance Analysis

7.2   PERFORMANCE ANALYSIS

It is natural to desire to analyze systems a priori to see if they will meet
their deadlines. Unfortunately, in a practical sense, this is rarely possible due
to the NP-completeness of most scheduling problems and constraints imposed
by synchronization mechanisms. Nonetheless, it is possible to get a handle on
the system’s behavior through analysis. The first step in performing any kind
of schedulability analysis is to determine, measure, or otherwise estimate the
execution of specific code units.

The need to know the execution time of various modules and the overall system
time-loading before implementation is important from both a management and
an engineering perspective. Not only are CPU utilization requirements stated as
specific design goals, but also knowing them a priori is important in selecting
hardware and the system design approach. During the coding and testing phases,
careful tracking of CPU utilization is needed to focus on those code units that
are slow or whose response times are inadequate. Several methods can be used
to predict or measure module execution time and CPU utilization.


7.2.1   Code Execution Time Estimation

Most measures of real-time performance require an execution-time estimate, ei,
for each task. The best method for measuring the execution time of completed
code is to use the logic analyzer that is described in Chapter 8. One advantage of
this approach is that hardware latencies and other delays are taken into account.
The drawback in using the logic analyzer is that the system must be completely
(or partially) coded and the target hardware available. Hence, the logic analyzer is
usually only employed in the late stages of coding, during testing, and especially
during system integration.

When a logic analyzer is not available, the code execution time can be estimated
by examining the compiler output and counting macroinstructions either
manually or using automated tools. This technique also requires that the code
be written, an approximation of the final code exists, or similar systems are
available for analysis. The approach simply involves tracing the worst-case path
through the code, counting the macroinstructions along the way, and adding their
execution times.

Another accurate method of code execution timing uses the system clock,
which is read before and after executing code. The time difference can then be
measured to determine the actual time of execution. This technique, however, is
only viable when the code to be timed is large relative to the timer calls.

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: PCMCIA Memory Cards
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.