2,252 views
2 votes
2 votes
A hard disk with transfer rate of 20 kbps is constantly transferring data to memory using DMA. The size of data transfer is 32 bytes. The processor runs at 800 kHz clock frequency. The DMA controller requires 12 cycles for initialization of operation and transfer takes 4 cycles to transfer 2 byte of data from device to the memory. Then the transfer time for transfer time ______(μs) in cycle stealing and burst mode is

1 Answer

Best answer
5 votes
5 votes
Burst Transfer:-
Total time = Data preparation time + Transfer Time + Bus release control time

Data Preparation time = 32*8/20kbps = 32*8/20*1024 = 1/80 s = (800*10^3)/80 cycles = 10^4 cycles

Data Transfer time = DMA initialization time + DMA transfer time = 12 + Size(Data to be Transferred)/Size(Data Bus) * 4 = 12 + 32/2 * 4 = 12 + 64 = 76 cycles

Bus release control time = Data Unavailable. Hence considered to be 0 cycles

Total time = (10^4 + 76 + 0) cycles = (10^4 + 76)/(800*10^3) s = 0.012595 s = 12.595 ms

 

Cycle Stealing:-
Total time = Data preparation time + Transfer Time + Bus release control time

Data Preparation time = 32*8/20kbps = 32*8/20*1024 = 1/80 s = (800*10^3)/80 cycles = 10^4 cycles

Data Transfer time:-
Data Initialization time for 1 Byte = 12 cycles
Data Transfer time for 1 byte = 4/2 = 2 cycles

Applying Pipelining concept
For 1st Byte 12+2 = 14 cycles. Now when the 1st Byte is being transferred, we can perform initialization for 2nd Byte

Hence only 10+2 = 12 cycles only needed

14+31*12 = 386 cycles

Bus release control time = Data Unavailable. Hence considered to be 0 cycles

Total time = (10^4 + 386 + 0) cycles = (10^4 + 386)/(800*10^3) s = 0.0129825 s = 12.9825 ms
selected by

Related questions

0 votes
0 votes
1 answer
1
Ajit J asked Dec 9, 2018
1,263 views
Consider a device with 1MB per second transfer rate and operating in cycle stealing mode of DMA. It requires 0.5 microsecond to transfer the data (1 byte) when it is read...
3 votes
3 votes
0 answers
4
vishal chugh asked Jan 24, 2018
1,309 views
In the last step shouldn't it be (Y/X) and not (Y/X+Y) since its Cycle Stealing mode?