文档介绍:Chapter 12 I/O SYSTEMS
State three advantages of placing functionality in a device controller rather than in the kernel. State three disadvantages.
Answer:
Three advantages:
Bugs are less likely to cause an operating system crash.
Performance can be improved by utilizing dedicated hardware and hard-coded algorithms.
The kernel is simplified by moving algorithms out of it.
Three disadvantages:
Bugs are harder to fix—a new firmware version or new hardware is needed Improving algorithms likewise requires a hardware update rather than just a kernel or device driver update.
Embedded algorithms could conflict with the application’s use of the device, causing decreased performance.
Consider the following I/O scenarios on a single-user PC.
a. A mouse used with a graphical user interface
b. A tape drive on a multitasking operating system (assume no device preallocation is available)
c. A disk drive containing user files
d. A graphics card with direct bus connection, accessible through memory-mapped I/O
For each of these I/O scenarios, would you design the operating system to use buffering, spooling, caching, or bination? Would you use polled I/O, or interrupt-driven I/O? Give reasons for your choices.
Answer:
a. A mouse used with a graphical user interface Buffering may be needed to record mouse movement during times when higherpriority operations are t