心得分享

Card image cap

陳同學 報告/作業 分享經驗 10/8 OS作業

10/8 OS作業
名稱 10/8 OS作業
日期 10/14
課程名稱 作業系統
指導教師 劉艾華

1.
Give two reasons why caches are useful.
(1)There are only important information in the caches.
(2)It is faster than other memory systems.

What problems do they solve?
Caches can improve performance where a large disparity in access time
or transfer rate exists between two components.

What problems do they cause?
Caches are temporary.
When the computer is restarted,information in the caches will be delete;
and then caches must need some times to retrieve the information again.

If a cache can be made as large as the device for which it is caching
(for instance, a cache as large as a disk), why not make it that large and eliminate the device?
Because caches are too expensive.
The faster memory system they work,the more expensive they are.

2.
What Is the purpose of interrupts?
It can stop what CPU is doing and transfers to do another instruction right away.

What are the differences between a trap and an interrupt?
A trap is a special device, it is used to debug.
And a interrupt is like .. when there is some problem in your instruction that CPU can't execute it.
or something you want the CPU to do first. Then you use a interrupt.

Can traps be generated intentionally by a user program?
If so, for what purpose?
User can use trap to back directly to the next instruction of the very instruction the CPU was in.

3.
Please tell the functional differences between CPU and device controller.
The device controller can send signals to CPU,or receive signals from CPU.
It connect hardware like I/O device to CPU.

Is there any similarity between them?
They share the same memory.

4.
Please discuss, in your own words, the cycle of the handling of an interrupt.
When you want your computer to do something, you can use your mouse and click.
The act of click is a signal that you send in to CPU and tell it to stop what it's doing.
When you finish the instruction(click), there comes interrupt to tell CPU that
it is available again, so it can do next instruction or keep idling.

更新日期:2015/10/14 下午 09:49:02