心得分享

Card image cap

鄭同學 報告/作業 分享經驗 10/15 OS作業

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

1.Reason 1: caches are useful when two or more components need toexchange data,
and the components perform transfers at different speeds. E.g.,
the CU registers and the disk are wo such components.
Caches solve this problem byproviding a buffer of intermediate speed to
store part of the data in the slow component.
If the fast component finds the data it needs in the cache,
it need not wait for the slowercomponent.
The data in the cache must be kept consistent with the data.

Reason 2: cache is used in prefetching of instructions in the CPU execution cycle
– weintroduce a cache to hold the next few instructions,
so that we do not have to wait forslow memory access.
In this case, the cache is more like a pipeline.

Problems solved by caches: improve speed for communication between components
with different speeds.
Problems created by caches: since cache hold temporary informationfor a slower memory component,
we need to maintain consistency between the copy in the cache with its actual value
in the memory component. This requires extra checking when writing to memory, etc.
Why not just replace the slow component by a large cache?
First problem is economic– cache memory is usually much more expensive than the slower memory that it is a
surrogate for. Second is difference in technology – usually cache memory is dynamic
(it does not retain its information when power is turned off, and thus it cannot be a
complete substitute for permanent memory such as a disk).

2.An interrupt is a hardware-generated change of flow within the system.
An interrupt handler is called 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 generated intentionally by a user program.
It can be used to call operating system routines or to catch arithmetic errors.

3.CPU -->Is one of the main equipment of the computer,
the main function is to interpret computer instructions and data processing computer software.
Programmable computer programming mainly refers to the central processor. Central processor,
internal memory, and input / output devices are the three core components of modern computer
device controller-->A computer apparatus can be used to control the data reading
and writing one or more input and output devices or display.
similarity-->All major computer

4.In order to quickly handle common interrupt, OS give a table to store the interrupt
service function of the entry point,If an interrupt occurs, you can quickly look-up table to find the function you want
the service, called this form of interruption Li,
are usually placed in local memory began. Each interrupt event will provide
Short program to service this interrupt, the interrupt service routine is called.
The interrupt vector is a 00H to FFH by the numbers, used to convict
Break interrupt type.

更新日期:2015/11/13 上午 12:38:10