Part of
the homework for 22C:50, Summer 2003
by
Douglas W. Jones
THE UNIVERSITY
OF IOWA
Department of Computer Science
Note that hitting erase when the character being erased is a tab is a particularly challenge. That counts as part b of this question.
Note: The above question has a specific answer, in the context of input-output drivers, as well as a general answer that applies generally to object-oriented programming, independent of the application demain.
Suppose you are writing to a block-sequential DMA device such as a high-speed tape backup on a UNIX system. The block size on the device is 512 bytes, but your software uses a buffer of 1000 bytes. Explain why the operating system cannot do output directly from the user's bufer, but must copy from the user's buffer to a system buffer before doing output to the device. Make careful use of the relevant terminology from Chapter 9.