|
|
|
|
|
|
|
The time above the one-second timeline describes the disk activity; the time below the line describes the processor activity. For n = 2 the achieved processor-disk request rate, la, was 44.5. This means that out of each second, the disk is busy for 44.5 ´ 20 ms = 890 ms and idle for 110 ms. The processor is executing user tasks for 44.5 ´ 10 ms = 445 ms and systems code for 44.5 ´ 2.5 = 111 ms; the remaining 444 ms the processor is idle. Thus, the processor is involved with user computation 445 ms out of each second. When n = 1, we have: |
|
|
|
|
|
|
|
|
Now the processor is doing useful user computation 470 ms (23.5 ´ 20 ms) out of each second and executing systems code for about 60 ms (23.5 ´ 2.5). |
|
|
|
|
|
|
|
|
We get 470 ms of user work done each second with n = 1 while only 445 ms of user work per second with n = 2. Clearly the single-program (n = 1) approach is preferable in this case. |
|
|
|
|
|
|
|
|
Moral: Make certain you are optimizing the use of the right part of the system! |
|
|
|
|
|
|
|
|
9.5 I/O Traffic and Virtual Memory Effects |
|
|
|
|
|
|
|
|
The I/O traffic that a particular system and program require depends upon a number of issues, particularly: |
|
|
|
|
|
|
|
|
1. The total number of I/Os that the program requires, and the average number of processor instructions between I/Os. These parameters vary considerably among programs, and are a function of the I/O block size and the management of I/O buffers. |
|
|
|
|
|
|
|
|
2. Traffic due to virtual memory paging. |
|
|
|
|
|