Redirected
retagged by
7,230 views
15 votes
15 votes

Consider a system in which bus cycle takes 100 ns. Transfer of bus control from processor to device or device to processor, takes 250 ns. One of the IO device has data transfer rate of 75 KB/sec and employs DMA. Data are transferred one byte at a time.
How long would the device tie up with the bus when transferring a block of 256 bytes assuming DMA uses cycle stealing mode?

  1.   0.153 ms
  2.   0.546 ms
  3.   1.2ms
  4.   3.4ms
retagged by

3 Answers

Best answer
24 votes
24 votes

Bus cycle takes 100 ns

Transfer of bus control from processor to device or device to processor, takes 250 ns

How long would the device tie up with the bus when transferring a block of 256 bytes assuming DMA uses cycle stealing mode?

In cycle stealing mode, bus is stolen by I/O device per bus cycle. Hence, in a bus cycle, 1 B is transferred at a time and then it releases bus and CPU executes an instruction for 1 bus cycle . And this is how both I/O and CPU alternate between bus cycles.

Hence, how long I/O ties up the bus =>

=> 256 ( 250 (to steal the bus) + 100 (transfer 1 B in one bus cycle) + 250 (to release the bus ))

=> 153600 ns

=> 0.153 ms


AND


Had it been burst mode for the transfer. There is no such stealing or any alternation for bus cycles. In one shot, complete data is sent.

75 KB/sec => So, to send 256 B, time taken for this transfer => 3.41 ms

Hence, how long I/O ties up the bus =>

=> 250 ns to transfer control to the I/O + send data in one shot  + 250 ns to release the bus

=> 3.41 ms + 500 ns 

=> 3.41 ms

selected by
2 votes
2 votes

IO device data transfer rate = 75KB/sec

So to transfer 1 Byte, time required = $\frac{1 byte}{75kB}$ = 13333.33 nsec

So total time required to send 1 byte = 250 + 13333.33 + 100 + 250 = 13933.33 nsec ---------------------- ( Include 250 nsec twice becoz first control is transfer from processor to device and then device to processor )

So total time required to send 256 bytes = 256 * 13933.33 nsec = 3.56 msec

So I would have choosed option 4)

1 votes
1 votes
assuming bus width 8bits---1 byte

DMA transfers 1 byte = to get the bus control + stealing the bus cyel+ to release the bus control =250+100+250=600---this is for 1B

like these 256b so 256*600ns=153600 ns

Related questions

0 votes
0 votes
1 answer
1
Ajit J asked Dec 9, 2018
1,204 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
3
vishal chugh asked Jan 24, 2018
1,267 views
In the last step shouldn't it be (Y/X) and not (Y/X+Y) since its Cycle Stealing mode?
1 votes
1 votes
1 answer
4
Prajwal Bhat asked Dec 21, 2016
1,438 views
Explain in detail?