-操作系统精髓与设计原理(第五版)+课后题答案1
CHAPTER 11
I/O MANAGEMENT AND DISK SCHEDULING
Review Questions
11.1 Programmed I/O: The processor issues an I/O command, on behalf of a
process, to an I/O module; that process then busy-waits for the
operation to be completed before proceeding. Interrupt-driven I/O: The processor issues an I/O command on behalf of a process, continues to execute subsequent instructions, and is interrupted by the I/O module when the latter has completed its work. The subsequent instructions may be in the same process, if it is not necessary for that process to wait for the completion of the I/O. Otherwise, the process is suspended pending the interrupt and other work is performed. Direct memory access (DMA): A DMA module controls the exchange of data between main memory and an I/O module. The processor sends a request for the transfer of a block of data to the DMA module and is interrupted only after the entire block has been transferred. 11.5 Seek time, rotational delay, access time.
Problems
11.1 If the calculation time exactly equals the I/O time (which is the most
favorable situation), both the processor and the peripheral device
running simultaneously will take half as long as if they ran separately. Formally, let C be the calculation time for the entire program and let T be the total I/O time required. Then the best possible running time with
buffering is max(C, T), while the running time without buffering is C + T; and of course ((C + T)/2) max(C, T) (C + T). Source: [KNUT97].