This preview shows page 1. Sign up to view the full content.
Unformatted text preview: the cache before each measurement. These parameters can be set by functions that are also in the library. See the ﬁle fcyc.h for details. 9.9 Summary
We have seen that computer systems have two fundamentally different methods of recording the passage of time. Timer interrupts occur at a rate that seems very fast when viewed on a macroscopic scale but very slow when viewed on a microscopic scale. By counting intervals, the system can get a very rough measure of program execution time. This method is only useful for long-duration measurements. Cycle counters are very fast, giving good measurements on a microscopic scale. For cycle counters that measure absolute time, the effects of context switching can induce error ranging from small (on a lightly loaded system) to very large (on a heavily loaded system). Thus, no scheme is ideal. It is important to understand the accuracy achievable on a particular system. Through this effort to devise an accurate timing scheme and to evaluate its performance on a number...
View Full Document