0% found this document useful (0 votes)
4 views

IO Review

Uploaded by

huyptn.21ad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

IO Review

Uploaded by

huyptn.21ad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

IO Review

1. What is memory mapped I/O?


 Memory-mapped I/O is a technique used by computer hardware that allows I/O devices to write
or read data directly from or to memory, without going through the CPU. In this technique, the
I/O device is mapped to a portion of the memory address space, and the device registers are
accessed through memory instructions, such as load or store, rather than by explicit input and
output instructions.

2. Why is DMA an improvement over CPU programmed I/O?


 Firstly, with programmed I/O, data transfer is performed by the CPU, which means that the CPU
has to continuously poll the I/O device to check whether data is ready to be extracted or
whether data needs to be sent to the device. This can significantly slow down the overall
processing speed of the system. On the other hand, DMA allows data to be transferred to and
from the memory without the intervention of the CPU, freeing up the CPU to perform other
tasks.
 Secondly, DMA reduces the amount of memory and CPU overhead required to transfer data
between I/O devices and memory. The CPU has to coordinate all data transfers in programmed
I/O, and this process can consume a lot of memory and CPU cycles. In contrast, DMA controllers
use dedicated hardware to transfer the data, which reduces the burden on the CPU and
improves the overall efficiency of the system.
 Finally, DMA can enable more efficient use of buffering and caching techniques. With DMA, data
can be transferred directly to and from the cache, which can improve the performance of the
system by reducing the number of memory accesses required. This can lead to faster and more
efficient data transfers overall.

3. When would DMA transfer be a poor choice?


 High-frequency interrupts: Some systems may have high-frequency interrupts that require
frequent access to the CPU. Using DMA transfers may interfere with these interrupts and reduce
system responsiveness.
 Slow devices: DMA transfers are only as fast as the slowest device involved. If one of the devices
involved in the transfer is slow, the overall performance of the transfer may be limited by that
device.
 Non-contiguous transfers: DMA transfers are most efficient when the data is contiguous in
memory. If the data is scattered throughout memory, the DMA transfer may require additional
processing to handle these non-contiguous transfers.
 Limited DMA channels: Some systems may have a limited number of DMA channels. If all of the
channels are already in use, using DMA transfers for additional transfers may not be possible or
may cause contention for resources.

You might also like