<aside>
🍖 課本簡報要熟讀,這根骨頭沒有肉
</aside>
期中
U1 Introduction
- What are the three main purposes of an operating system?
- We have stressed the need for an operating system to make efficient use of the computing hardware. When is it appropriate for the operating system to forsake this principle and to “waste” resources? Why is such a system not really wasteful?
- Give two reasons why caches are useful. What problems do they solve? What problems do they cause? 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?
Direct memory access is used for high-speed I/O devices in order to avoid increasing the CPU’s execution load.
- How does the CPU interface with the device to coordinate the transfer?
- How does the CPU know when the memory operations are complete?
- The CPU is allowed to execute other programs while the DMA controller is transferring data. Does this process interfere with the execution of the user programs? If so, describe what forms of interference are caused.
- Many SMP systems have different levels of caches; one level is local to each processing core, and another level is shared among all processing cores. Why are caching systems designed this way?
- Consider an SMP system similar to the one we have shown. Illustrate with an example how data residing in memory could in fact have a different value in each of the local caches.
- How does an interrupt differ from a trap?
- Can traps be generated intentionally by a user program? If so, for what purpose?