This preview shows page 1. Sign up to view the full content.
Unformatted text preview: n behalf of the program, such as, handling page faults, input, or output. Recall that kernel 452 CHAPTER 9. MEASURING PROGRAM EXECUTION TIME (a) System Perspective A B A B A
User Kernel (b) Application As Perspective
Active Inactive Figure 9.2: System’s vs. Applications View of Time. The system switches from process to process, operating in either user or kernel mode. The application only gets useful computation done when its process is executing in user mode. operation is considered part of each regular process rather than a separate process. The operating system scheduler is invoked every time there is an external event or a timer interrupt. The occurrences of timer interrupts are indicated by the tick marks in the ﬁgure. This means that there is actually some amount of kernel activity at every tick mark, but for simplicity we do not show it in the ﬁgure. When the scheduler switches from process A to process B, it must enter kernel mode to save the state of process A (still considered part of process A) and to restore the state of process B (considered part of pro...
View Full Document