Practice Exercise 18
-
Your computer has the following peripherals attached to it.
keyboard monitor speaker
microphone mouse printer
modem CD-ROM hard drive
floppy drive PCMCIA card streaming tape drive
-
How many ports on the processor chip would it need if only direct
(isolated) I/O were to be used?
-
How many contact pads would be needed on the chip if each port were 8
bits wide? Further suppose that each contact pad is 2 millimeters wide.
How big would the circumference of the chip need to be in feet? (There are
39.37 inches in a meter and 12 inches in a foot).
-
List a couple protocols or standards around the house that have to do
with communication or electrical devices. Think of both sequences of
actions and of physical shapes and sizes.
-
In the tape reader protocol example, why is it necessary for the CPU to
set the DA bit to 1 after it gets the byte from the data port, even if the
CPU is always a lot faster than the peripheral? (HINT: Look at the
assembler code in Fig. 3 and imagine that the CPU is a lot faster than the
peripheral.)
-
In a certain computer that uses memory-mapped I/O, each device is given
4 addresses because it can have up to 4 registers through which it
communicates with the CPU. The addresses from 0...0000100 to 0...1111111
are set aside for memory mapped I/O. How many devices can this computer
have attached to it?
-
Why is location 0 usually never used for memory-mapped I/O?
-
Refer to Figures 18.7.2 and 18.7.3. Suppose that a new device had to
be attached and it was given addresses 00011000 to 00011111 for its registers.
-
Show the decoder for the device active wire for this device.
-
Show the decoder for the device active wire for memory now.
-
A certain computer runs at 1 MIPS. The keyboard interrupts it 60 times
a second and the keyboard interrupt routine is 50 instructions long.
-
How many instructions can this computer do in 1/60th of a second?
-
Of the 1 million instructions which this computer will do every second,
what percentage is devoted to the overhead of handling the keyboard?