A file is transferred from one location to another in ‘buckets’. The size of the bucket is 10 kilobytes. Eh bucket gets filled at the rate of 0.0001 kilobytes per millisecond. The transmission time from sender to receiver is 10 milliseconds per bucket. After the receipt of the bucket the receiver sends an acknowledgement that reaches sender in 100 milliseconds. Assuming no error during transmission, write a formula to calculate the time taken in seconds to successfully complete the transfer of a file of size N kilobytes.

Bucket filling rate is 0.0001KB/msec So - to fill 1KB it would take 10 sec - to fill 10KB it would take 100 sec

Transmission time from sender to receiver is 10ms/bucket Transferring of Acknowledgement takes 100ms from receiver to sender.

As the bucket has only 10KB as capacity. Therefore only 10KB transferred each time.

Time taken to transfer 10KB successfully is = 100 + .01 + .1 = 100.11sec Therefore to transfer 1KB = (100.11)/10 = 10.011 sec

So to transfer N KB it would take N * 10.011 sec

The formulae to find the time taken to transfer N KB = N * 10.011 sec

DIGVIJENDRA SINGH

Jan 25th, 2018

I Second = 1000 Millisecond...So I KB will take 1 second.

Zishan

Mar 22nd, 2018

Basically 1 KB is transmitted from sender to reciever in 1 mili second and 100 mili second is required for acknowledgement.
So for 1kB Time=1ms+100ms(ACK) So for N KB Time= N ms+100ms(ACK)

## A file is transferred from one location to another in ‘buckets’. The size of the bucket is 10 kilobytes. Eh bucket gets filled at the rate of 0.0001 kilobytes per millisecond. The transmission time from sender to receiver is 10 milliseconds per bucket. After the receipt of the bucket the receiver sends an acknowledgement that reaches sender in 100 milliseconds. Assuming no error during transmission, write a formula to calculate the time taken in seconds to successfully complete the transfer of a file of size N kilobytes.

This question is related to TCS Interview## Related Answered Questions

## Related Open Questions