Unformatted text preview: at percent of the time would you expect the tracing process to be inactive when averaged over a longer time scale? 9.2 Measuring Time by Interval Counting
The operating system also uses the timer to record the cumulative time used by each process. This information provides a somewhat imprecise measure of program execution time. Figure 9.7 provides a graphic illustration of how this accounting works for the example of system operation shown in Figure 9.2. In this discussion, we refer to the period during which just one process executes as a time segment. 9.2. MEASURING TIME BY INTERVAL COUNTING 455 Activity Periods, Load = 2 Active Inactive 1 0 10 20 30 40 Time (ms) 50 60 70 80 Figure 9.6: Graphical Representation of Activity Periods for Trace in Figure 9.5. Timer interrupts are indicated by gray triangles (a) Interval Timings A (b) Actual Times A B A B A
A B 120.0u + 33.3s 73.3u + 23.3s B A B A A 110u + 40s B 70u + 30s Au Au Au As Bu Bs Bu Bu Bu Bu As Au Au Au Au Au Bs Bu Bu Bs Au Au Au As As 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 Figure 9.7: Process Timing by Interv...
View Full Document