10/14 10/8 OS作業 | |
---|---|
名稱 | 10/8 OS作業 |
日期 | 10/14 |
課程名稱 | 作業系統 |
指導教師 | 劉艾華 |
1.(1)Caches are useful because they are fast and can
act as a buffer.
(2)They solve the problems of interfacing devices of
different speeds and the fact that main memory is
slower.
(3)They cause problems such as incoherent data and
more complex circuitry.
(4)A large cache may not be desirable because of cost
and volatility.
2.(1)The purpose of interrupts is to alter the flow of
execution in response to some event.
(2)An interrupt is triggered in hardware and a trap is
triggered in software.
(3)User programs can generate traps intentionally.
(4)They may want to interact with some I/O which
requires a system call.
3.(1)The function of device controller is to send interrupt to
CPU when done the job. The function of CPU is to
execute an interrupt handler.
(2)CPU and device controller use the same bus for
communication. Both CPU and device controller are
dealing with interrupt.
4.First, the device driver will load the appropriate registers
within the device controller. Then, the device controller
examines the contents of these registers to determine
what action to take. The device controller starts to transfer
data form the device to its local buffer. When the transfer
is complete, the device controller will send interrupt to
device driver. The device driver then returns control to the
operating system.
更新日期:2015/10/14 上午 11:03:43