Question: 1 . A computer supports three I / O techniques: programmed I / O , interrupt - driven I / O and DMA. a .

1. A computer supports three I/O techniques: programmed I/O, interrupt-driven I/O and DMA.
a. The programmed I/O does not incur any extra overhead to access data in device A, if the device is available. If the device is unavailable, the CPU has to keeping polling the device, until it is available.
b. The interrupt-driven I/O incurs 0.5ms overhead for each interrupt service.
c. The DMA incurs 10ms overhead each time it is configured.
Suppose a program needs to access 10MB data in device A in total, each time access 1MB. The device is available every 4ms.
If we do not consider the time for the program to access the data in device A, its pure execution time is 100ms.
The time to transfer 1KB data between the CPU and the device is 0.001ms. The time to transfer 1KB data between device and the memory is 0.0012ms, and the time to transfer 1KB data between CPU and the memory is 0.0008ms. To access the 10MB data, the DMA only needs to be configured once.
Which technique is the best for this program?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!