This preview shows page 1. Sign up to view the full content.
Unformatted text preview: such an evaluation for 100 periods of inactivity and found that the minimum timer interrupt processing period required 251,466 cycles. To determine the number of timer interrupts that occur during the program we are measuring, we simply call the times function twice—once before and once after the program, and then compute their difference. Figure 9.16 shows the results obtained by this revised measurement scheme. As the ﬁgure illustrates, we can now get very accurate (within 1.0%) measurements on a lightly loaded machine, even for programs that execute for multiple time intervals. By removing the systematic error of timer interrupts, we now have a very reliable measurement scheme. On the other hand, we can see that this compensation does not help for programs running on heavily loaded machines. 9.4. MEASURING PROGRAM EXECUTION TIME WITH CYCLE COUNTERS
Intel Pentium III, Linux
10 473 1 Measured:Expected Error 0.1 Load 1 Load 11 0.01 0.001 0.0001 0 50 100 150 200 250 300 Expected CPU Time (ms) Fi...
View Full Document
- Spring '10
- The American