CPU Utilization
The final and most important term to be defined is a critical measure of real-time system performance. Because in the von Neumann paradigm, the CPU continues to fetch, decode, and execute instructions as long as power is applied, the CPU will execute either no-ops or instructions or instructions that are not related to the satisfaction of a deadline (for example, noncritical “housekeeping”). The measure of the time spent doing idle processing, in a sense, indicates how much real-time processing is occurring.
Definition: The (CPU) utilization or time-loading factor, U, is a measure of the percentage of non idle processing.
A system is said to be time-overloaded if U> 100%. Systems that are too highly utilized are undesirable because changes or additions cannot be made to the system without risk of time overloading. Systems that are not sufficiently utilized are not necessarily good, because this implies that the system was over engineered and that costs can be reduced with less expensive hardware. While a utilization of 50% is common for new products, 80% might be acceptable for systems that do not expect growth. However, 70% as a target for U is one of the most celebrated and potentially useful results in the theory of real-time systems where tasks are periodic and independent – a result that will be examined later. Table below gives a summary of certain CPU utilizations and typical situations in which they are associated.
U is calculated by summing the contribution of utilization factors for each (periodic or aperiodic) task. Suppose a system has n ≥ 1 periodic tasks, each with an execution period of pi , and hence, execution frequency, fi = 1/pi .If task i is known to have (or has been estimated to have) a maximum (worst case) execution time of ei , then the utilization factor, ui , for task ei is
ui = ei /pi
Then the overall system utilization is
Note that the deadline for periodic task i, di , is typically the next cycle or time period, and is a critical design factor that is constrained by ei . The determination of the ei either prior to or after the code has been written can be extremely difficult, and in many cases, impossible, in which case estimation must be used. For aperiodic and sporadic tasks ui is calculated by assuming some worst-case execution period, usually the worst-case delay between event occurrences. Such approximations can inflate the utilization factor unnecessarily or can lead to overconfidence because of the tendency to “not worry” about its excessive contribution. The danger is to discover later that a higher frequency of occurrence than budgeted has led to a time-overload and system failure. The utilization factor differs from CPU throughput, which is a measure of the number of macroinstructions per second that can be processed based on some predetermined instruction mix. This type of measurement is typically used to compare CPU horsepower for a particular application.
0 comments:
Post a Comment