in CO and Architecture retagged by
557 views
0 votes
0 votes
An I/O device transfers data at a rate of 10MB/s over a 100MB/S bus. The data is transferred in 4KB blocks. If the processor operates at 500MHz, and it takes a total of 5000 cycles to handle  each DMA request, find the fraction of CPU time handling the data transfer with and without DMA.
in CO and Architecture retagged by
557 views

1 Answer

0 votes
0 votes
Given, Data Transfer rate =10 MB/s , size of data block = 4 KB, Processor operates at 500 MHz and each DMA requires 5000 cycles
Since processor is operating at 500 MHz we have a cycle time of 1/(500 x $10^6$) = 2 x $10^{-9}$ s = 2 ns

With DMA –
By default we consider Burst mode,
hence, % of CPU spent handling the data = Y/(X+Y) where X = data transfer time and Y = memory cycle time
X = 4 KB / 10 MB = 0.390625 x $10^{-3}$ s = 390.625 $\mu$s
Each DMA requires 5000 cycles = 5000 x 2 x $10^{-9}$ = 10 x $10^{-6}$ = 10 $\mu$s
Therefore, % of CPU idle/blocked or handling the data = Y/(X+Y) = 10 x $10^{-6}$ / ( 390.625 + 10 ) x $10^{-6}$ = 0.0249609 = 2.4961 % $\approx$ 2.5 %

Without DMA –
The processor here copies the data into memory as it is sent over the bus. Since the I/O device sends data at a rate of 10MB/s over the 100MB/s bus, 10 % of each second is spent transferring data. Thus 10% of the CPU time is spent copying data to memory.

1 comment

@Sachin Mittal 1 sir, If there is anything wrong with the answer I have added please point it out.

0
0

Related questions