1. .
Improve access time and rate.
Reduce the need for bandwidth
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 devices.
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 it :
(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.
2.
CPU immediately stop a running job.
Interrupts are hardware interrupts, while traps are software-invoked interrupts. Occurrences of hardware interrupts usually disable other hardware interrupts, but this is not true for traps. If you need to disallow hardware interrupts until a trap is served, you need to explicitly clear the interrupt flag. And usually the interrupt flag on the computer affects (hardware) interrupts as opposed to traps. This means that clearing this flag will not prevent traps. Unlike traps, interrupts should preserve the
Yes. User programs create traps for debugging purposes. A trap can be used to call the OS routines or to catch arithmetic errors.
3.
A device controller is a part of a computer system that makes sense of the signals going to, and coming from the CPU.
CPU is mainly explained computers and computer software in data processing.
CPU and device controller all can generate interrupts.
4.
Program execution sequence, but an interrupt is generated, it will leave the program being executed immediately interrupt priority order. When finished with all emergency work, back to the original program interruption place, to finish the work.