10/8 OS作業 | |
---|---|
名稱 | 10/8 OS作業 |
日期 | 10/15 |
課程名稱 | 作業系統 |
指導教師 | 劉艾華老師 |
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 don't need 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.
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 the cache is affordable, because faster storage tends to be more expensive.
2.
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 pooling.
Yes.
User programs create traps for debugging purposes.A trap can be used to call operating system routines or to catch arithmetic errors.
3.
The main function of the CPU is processing instructions given to the computer. Every operation that is carried out, including key strokes, opening and closing programs, and saving files, is
carried out by the CPU. This function is separated into four functions or steps for every operation: fetch, decode, execute and store.
A device controller is a part of a computer system that makes sense of the signals going to, and coming from the CPU.It functions as a bridge between the device and the operating system.
They both can recieve the control signals from the unit.
4.
For example,when a hardware or software makes a interrupt ,CPU will stops working and start executing the interrupt routine , when finishing the routine , the cpu will restores CPU state.
更新日期:2015/10/15 上午 12:07:47