retagged by
813 views
1 votes
1 votes
A DMA module is transferring bytes to memory using cycle stealing mode from a device transmitting at $16$ KB/s. The processor is fetching instructions at the rate of $1$ MB/s. The percentage by which the processor will be slowed down due to the DMA activity is ______
retagged by

2 Answers

Best answer
4 votes
4 votes

Here DMA is using cycle stealing mode to transfer data to memory. In cycle stealing mode 1 Byte is transferred in each cycle.

Device transfers 16 kb in 1 sec 

=> 1 kb in (1/16 ) sec 

now 1 kb = 1000 Bytes 

so 1000 B in 0.0625 sec 

=> 1 B in ( 0.0625 / 1000 ) sec = 0.0000625 sec , 1 sec = 106  =1000000  μs

That means Device transfers 1 Byte in 62.5 μs.


Memory operation transfers  1 MB in 1 sec

=> 106 B in 1 sec

=> 1 B in (1/106) secs = (1/106 )* 106 μs = 1 μs

so memory transfer rate is 1 Byte in 1 μ second. ( same as above calculation as processor fetch at 1MB / s ).

To fetch 1 Byte data processor needs 1 Microseconds 

% time cpu is idle is for 1 cycle  , while DMA is transferring data 

so cpu time is 1 μs and total transfer time is 62.5 μs 


%CPU idle time = 1/(62.5) * 100 = 0.016 * 100 = 1.60 %

selected by
3 votes
3 votes
DMA will interrupt CPU to transfer 16KB in 1 second, as Cycle Stealing method is used by DMA, it will interrupt CPU 16 K times in 1 second.
If DMA doesn't interrupt CPU, then CPU will fetch 1 million (10^6) instruction 1 second.

because of DMA steal 16K cycles from CPU, CPU will be idle for 16K cycles and now it will fetch 1,000,000 - 16,000 = 984,000 instructions hence it is slow down by 1 - (984000/1000,000)=0.016 or 1.6%
Answer:

Related questions