10/14 10/8 OS作業 | |
---|---|
名稱 | 10/8 OS作業 |
日期 | 10/14 |
課程名稱 | 作業系統 |
指導教師 | 劉艾華 |
1. Caches are useful when two or more components need to ex-change data.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,component has a data value change, and the datum is also in the cache, the cache must also be updated.
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).
(b) the cache is affordable, because faster storage tends to be more expensive.
2. Interrupts are calls to the CPU that inform the system about peripherals and other system programs. The CPU will be in a specific state and an interrupt changes that state. They are very important to the computer's architecture.
A trap is a software generated interrupt. It can be caused by an error (which is why traps are synonymous with exception) or by a request from a user program.
Interrupts come from hardware and the handling is asynchronous, meaning that they don't happen at predictable places. Traps are software generated and the
handling is synchronous, meaning that they do happen in predictable places.
3. The differences between CPU and device controller is CPU is the device, that controls all the operations, but device controller translates software input into something a hardware device understands. Controllers sometimes have their own memory and their own CPU.
The similarity between them is both of CPU and device controller can execute in parallel,competing for memory cycles.
4. Receive an interrupt instruction (ex:keyboard,mouse), then go to I/O device to transfer data and send interrupt to CPU when done the job and return control.
更新日期:2015/10/15 上午 10:21:25