Tutorial 04s
Tutorial 04s
Problems:
7.10 Consider a system employing interrupt-driven I/O for a particular device that
transfers data at an average of 8 KB/s on a continuous basis.
a. Assume that interrupt processing takes about 100 s (i.e., the time to jump
to the interrupt service routine (ISR), execute it, and return to the main program).
Determine what fraction of processor time is consumed by this I/O device if it
interrupts for every byte.
b. Now assume that the device has two 16-byte buffers and interrupts the
processor when one of the buffers is full. Naturally, interrupt processing takes
longer, because the ISR must transfer 16 bytes. While executing the ISR, the
processor takes about 8 s for the transfer of each byte. Determine what fraction
of processor time is consumed by this I/O device in this case.
c. Now assume that the processor is equipped with a block transfer I/O
instruction such as that found on the Z8000.This permits the associated ISR to
transfer each byte of a block in only 2 s. Determine what fraction of processor
time is consumed by this I/O device in this case.
a. The device generates 8 1024 = 8192 bytes per second or a rate of one
every 122 s. If each interrupt consumes 100 s, then the fraction of
processor time consumed is 100/122 = 0.82
b. In this case, the time interval between interrupts is 16 122 = 1952 s.
Each interrupt now requires 100 s for the first byte plus the time for
transferring each remaining byte, which adds up to 8 15 = 120 s, for a total
of 220 s. The fraction of processor time consumed is 220/1952 = 0.11
c. Each interrupt requires 100 s for the first byte plus 2 15 = 30 s for the
remaining bytes, for a total of 130 s. The fraction of processor time
consumed is 130/1952 = 0.06
7.17 A 32-bit computer has two selector channels and one multiplexor channel.
Each selector channel supports two magnetic disk and two magnetic tape units.
The multiplexor channel has two line printers, two card readers, and 10 VDT
terminals connected to it. Assume the following transfer rates:
Disk drive = 800 KBytes/s , Magnetic tape drive = 200 KBytes/s, Line printer = 6.6
KBytes/s, Card reader = 1.2 KBytes/s and VDT = 1 KBytes/s
Estimate the maximum aggregate I/O transfer rate in this system.
Only one device at a time can be serviced on a selector channel. Thus,
Maximum rate = 800 + 800 + 2 6.6 + 2 1.2 + 10 1 = 1625.6 k Bytes/sec