IAE Academy

GATE 2024 CS1 Q.36: solution and answer

GATE 2024 · CS1Q.36 · 2 marks · MCQ

Consider a network path P—Q—R between nodes P and R via router Q. Node P sends a file of size bytes to R via this path by splitting the file into chunks of 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 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 .
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?

  1. (A)

    8.000

  2. (B)

    8.008

  3. (C)

    15.992

  4. (D)

    16.000

See the question in the paper

Answer and solution

ANSWER

R receives all chunks at 8.008 s, option (B).

Official answer: BSource: Official answer key, GATE 2024 CS1 (IISc Bengaluru)

  1. The file has bytes and each chunk has bytes, so there are chunks. Each chunk is bits.

  2. Each link runs at bits/s, so one chunk takes to transmit on one link. Propagation, processing and queueing delays are negligible.

  3. P sends the chunks back to back. Chunk is fully received at Q at seconds, so the last chunk (k = 1000) is fully received at Q at .

  4. Q receives a whole chunk before forwarding it (store and forward), and it can receive and transmit at the same time. Chunk reaches Q at , and the previous chunk finished leaving Q at . Link Q—R is therefore free exactly when each chunk arrives, and no chunk waits in a queue.

  5. So Q starts sending the last chunk to R at . This takes more.

  6. R has the whole file at . In general, for chunks over 2 equal-rate links the time is . The answer is option (B).

KEY IDEA

With store-and-forward over two equal-rate links, the transmissions overlap like a pipeline. The total time is (n + 1) chunk-transmission times, not 2n.

WATCH OUT FOR

Adding the two links' transmission times for the whole file (8 + 8 = 16 s). This forgets that Q forwards each chunk while it is still receiving the next one, so the second link only adds one chunk time (0.008 s).

From the GATE 2024 CS1 paper. Every question of this paper · Download the full paper · All 7 Performance questions, with notes

More Performance questions