心得分享

Card image cap

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

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

1.reduce the wating time of CPU and raise the efficiency of system

CPU can read all most dates by cache without all ways read by slower divice

if the program start change 2 dates without stoping then those two date will occupy the cache so the efficiency of cache will be slow down

if the cahce capacity more larger and it will makes mistakes by compulsion

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 polling. A trap can be used to call operating system routines or to catch arithmetic errors.
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 previous state of the CPU.
Yes. User programs create traps for debugging purposes. A trap can be used to call the OS routines or to catch arithmetic errors.

3.CPU and device controllers all use a common bus for communication.
They both can recieve the control signals from the unit.

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/15 上午 09:47:24