Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the following I/O scenarios on a single-user PC. a. A mouse used with a

ID: 3540938 • Letter: C

Question

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 a combination? Would you use polled I/O, or interrupt-driven I/O?
Give reasons for your choices.

Explanation / Answer

a. A mouse used with a graphical user interface
Buffering may be needed to record mouse movement during times when higherpriority
operations are taking place. Spooling and caching are inappropriate. Interrupt
driven I/O is most appropriate.
b. A tape drive on a multitasking operating system (assume no device preallocation is
available)
Buffering may be needed to manage throughput difference between the tape drive
and the source or destination of the I/O, Caching can be used to hold copies of data
that resides on the tape, for faster access. Spooling could be used to stage data to the
device when multiple users desire to read from or write to it. Interrupt driven I/O
is likely to allow the best performance.
c. A disk drive containing user files
Buffering can be used to hold data while in transit from user space to the disk, and
visa versa. Caching can be used to hold disk-resident data for improved performance.
Spooling is not necessary because disks are shared-access devices. Interruptdriven
I/O is best for devices such as disks that transfer data at slow rates.
d. A graphics card with direct bus connection, accessible through memory-mapped
I/O
Buffering may be needed to control multiple access and for performance (doublebuffering
can be used to hold the next screen image while displaying the current
one). Caching and spooling are not necessary due to the fast and shared-access
natures of the device. Polling and interrupts are only useful for input and for I/O
completion detection, neither of which is needed for a memory-mapped device.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote