To clearly examine the performance characteristics of a
workload, a dynamic rather than a static model of program execution
is necessary, as shown in the following figure.
Figure 1. Program Execution Hierarchy. The figure
is a triangle on its base. The left side represents hardware entities
that are matched to the appropriate operating system entity on the
right side. A program must go from the lowest level of being stored
on disk, to the highest level being the processor running program
instructions. For instance, from bottom to top, the disk hardware
entity holds executable programs; real memory holds waiting operating
system threads and interrupt handlers; the translation lookaside buffer
holds dispatchable threads; cache contains the currently dispatched
thread and the processor pipeline and registers contain the current
instruction.
To run, a program must make its way up both the hardware and operating-system
hierarchies in parallel. Each element in the hardware hierarchy is
more scarce and more expensive than the element below it. Not only
does the program have to contend with other programs for each resource,
the transition from one level to the next takes time. To understand
the dynamics of program execution, you need a basic understanding
of each of the levels in the hierarchy.