GATE CS 2024 Set 1 | Question 36
Consider a network path P—Q—R between nodes P and R via router Q. Node P sends a file of size \(10^{6}\) bytes to R via this path by splitting the file into chunks of \(10^{3}\) bytes each. Node P sends these chunks one after the other without any wait time between the successive chunk transmissions. Assume that the size of extra headers added to these chunks is negligible, and that the chunk size is less than the MTU.
Each of the links P—Q and Q—R has a bandwidth of \(10^{6}\) bits/sec, and negligible propagation latency. Router Q immediately transmits every packet it receives from P to R, with negligible processing and queueing delays. Router Q can simultaneously receive on link P—Q and transmit on link Q—R.
Assume P starts transmitting the chunks at time \(t = 0\).
Which one of the following options gives the time (in seconds, rounded off to 3 decimal places) at which R receives all the chunks of the file?
Explanation
Answer: (B)
The file is split into \(10^{6} / 10^{3} = 1000\) chunks of 8000 bits each. Sending one chunk on a \(10^{6}\) bits/sec link takes \(8000 / 10^{6}\) s, that is 8 ms.
P sends the chunks back to back, so Q has received the last chunk at \(1000 \times 8\) ms \(= 8\) s. Q forwards each chunk as soon as it has fully arrived, and because it can send while it receives, it finishes forwarding one chunk just as the next one has arrived: no queue builds up. The last chunk then needs one more transmission time on Q—R, so R has everything at \(8 + 0.008 = 8.008\) s.
Holding the whole file at Q before forwarding would give 16.000 s, and 8.000 s leaves out the second hop of the last chunk.
Answer: B