06/01/2016 OS | |
---|---|
名稱 | OS |
日期 | 06/01/2016 |
課程名稱 | 作业系统 |
指導教師 | 劉艾華 |
1.Caches are useful when two or more components need to ex-change data, and the components perform transfers at differing speeds. Caches solve the transfer problem by providing a buffer of intermediate speed between the components. If the fast device finds the data it needs in the cache, it need not wait for the slower device. The data in the cache must be kept consistent with the data in the components. If a component has a data value change, and the datum is also in the cache, the cache must also be updated. This is especially a problem on multiprocessor systems where more than one process may be accessing a datum.
A component may be eliminated by an equal-sized cache, but only if:
(a) the cache and the component have equivalent state-saving capacity (that is, if the component retains its data when electricity is removed, the cache must retain data as well),
and
(b) the cache is affordable, because faster storage tends to be more expensive.
.An interrupt is a hardware-generated change of flow within the system. An interrupt handler is summoned to deal with the cause of the interrupt; control is then returned to the interrupted context and instruction.A trap is a software-generated interrupt. An interrupt can be used to signal the completion of an I/O to obviate the need for device polling. A trap can be used to call operating system routines or to catch arithmetic errors.
3.CPU starts an I/O operation, and continuously polls (checks) that device until the I/O operation finishes,device controller that makes sense of the signals going to, and coming from the CPU.The CPU and the device controllers can execute concurrently, competing for memory cycles.
4.When the CPU is interrupted, it stops what it is doing and immediately transfers execution to a fixed location. The fixed location usually contains the starting address where the service routine for the interrupt is located. The interrupt service routine executes; on completion, the CPU resumes the interrupted computation.
更新日期:2016/1/6 下午 05:24:18