This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 13 C H A P T E R I/O Systems Practice Exercises 13.1 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 require a hardware update rather than just a kernel or device-driver update Embedded algorithms could conflict with application’s use of the de- vice, causing decreased performance. 13.2 The example of handshaking in Section 13.2 used 2 bits: a b usy bit and a c ommand-ready bit. Is it possible to implement this handshaking with only 1 bit? If it is, describe the protocol. If it is not, explain why 1 bit is insufficient. Answer: It is possible, using the following algorithm. Let’s assume we simply use the busy-bit (or the command-ready bit; this answer is the same regardless). When the bit is off, the controller is idle. The host writes to data-out and sets the bit to signal that an operation is...
View Full Document
- Winter '09
- Operating Systems