Assignment 2
Assignment 2
Q-4. How interrupt initiated I/O is different from program controlled I/O? Explain in detail
Programmed I/O
Programmed I/O (PIO) refers to data transfers initiated by a CPU under driver software control
to access registers or memory on a device.
The CPU issues a command then waits for I/O operations to be complete. As the CPU is faster
than the I/O module, the problem with programmed I/O is that the CPU has to wait a long time
for the I/O module of concern to be ready for either reception or transmission of data. The CPU,
while waiting, must repeatedly check the status of the I/O module, and this process is known as
Polling. As a result, the level of the performance of the entire system is severely degraded.
Interrupt
The CPU issues commands to the I/O module then proceeds with its normal work until
interrupted by I/O device on completion of its work.
For input, the device interrupts the CPU when new data has arrived and is ready to be retrieved
by the system processor. The actual actions to perform depend on whether the device uses I/O
ports, memory mapping.
PINKESH SIDDHAPURA 1
For output, the device delivers an interrupt either when it is ready to accept new data or to
acknowledge a successful data transfer. Memory-mapped and DMA-capable devices usually
generate interrupts to tell the system they are done with the buffer.
Although Interrupt relieves the CPU of having to wait for the devices, but it is still inefficient in
data transfer of large amount because the CPU has to transfer the data word by word between I/O
module and memory.
Q-10. 1.How many 1288 RAM chips are needed to provide a memory
capacity of 2048 bytes?
2.How many lines of address bus must be used to access 2048 bytes of
memory? How many of these lines will be common to all chips?
3.How many lines must be decoded for chip select? Specify the size of
decoders.
PINKESH SIDDHAPURA 2
a)
128 x 8 RAM => 128 Bytes (8bits) / chip => Nbr of chips = 2048 / 128 = 16
b)
2048 = 2d, Where d is nbr of address lines => d = 11 We have 16 chips => 4 bits for chip select
Number of common address lines is 11 - 4 = 7 Summary: 4 bits (MSB) to select the correct chip
and 7 bits (LSB) to select the memory location inside the selected chip.
c)
PINKESH SIDDHAPURA 3
PINKESH SIDDHAPURA 4