retagged by
2,546 views
1 1 vote
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 ______

2 Answers

Best answer
4 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
4 4 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:
Position:
Show:

Related questions

0 0 votes
1 answers 1 answer
763
763 views
Bikram asked May 27, 2017
763 views
Consider a hypothetical processor that supports two address, one address and zero address instructions. It has a $256$ word memory, and a $20$ bit instruction is placed i...
0 0 votes
2 answers 2 answers
993
993 views
Bikram asked May 27, 2017
993 views
Consider a memory hierarchy system consisting of two levels. The access time of level $1$ is $2$ ns. The miss penalty (The time to get data from level $2$, in case of mis...
2 2 votes
2 answers 2 answers
1.5k
1.5k views
Bikram asked May 27, 2017
1,504 views
Suppose there are $500$ memory references in which $50$ misses in the $1$st level cache and $20$ misses in the $2$nd level cache . Let the miss penalty from L2 cache to m...
0 0 votes
2 answers 2 answers
1.5k
1.5k views
Bikram asked May 27, 2017
1,548 views
Consider a two level memory hierarchy having only one level cache and main memory. Cache and Main memory access times are $20$ ns and $120$ ns/word respectively. The size...