edited by
2,389 views
5 votes
5 votes
A hard disk with a transfer rate of 1 KBps is constantly transferring data to memory using DMA cycle stealing mode. The size of the data transfer is 16 bytes. The processor runs at 400 kHz clock frequency. The DMA controller requires 10 cycles for initialization of operation and transfer takes 2 cycles to transfer one byte of data from the device to the memory. What is the percentage of processor time blocked during this DMA operation?

I am getting transfer time as 480 micro-sec and preparation time as 0.9375 sec

and percentage time CPU gets blocked = transfer time/preparation time (IN case of cycle stealing)
edited by

1 Answer

2 votes
2 votes
Transfer rate is 1KBps , So  1KB----------1 s  (second)

                                             1 Byte-------1/1000 s

                                             16 Bytes-----16/1000 = 16ms

Also ,it is given that the DMA controller requires 10 cycles for initialization of operation and transfer takes 2 cycles to transfer one byte of data from the device to the memory.

Therefore , to transfer 16 bytes cycles needed = 16*2=32 cycles , So total cycles needed is 32+10 = 42 cycles

Transfer Time = 42 * 1/400000 = 42/400 ms = 0.105 ms

Now , %age of CPU blocked state is (Transfer time/Preparation time) *100 = 0.105 / 16 *100 = 0.65

Related questions

1 votes
1 votes
2 answers
2
sidsunny asked Jan 26, 2017
827 views
I have gone through these types of questions but I'm unable to understand. how to appraoch these questions? And during the dma transfer, cpu is considered to be idle. bef...