Question

Two hosts are connected via a packet switch with 10710^7 bits per second links. Each link has a propagation delay of 20 microseconds. The switch begins forwarding a packet 35 microseconds after it receives the same. If 10000 bits of data are to be transmitted between the two hosts using a packet size of 5000 bits, the time elapsed between the transmission of the first bit of data and the reception of the last bit of the data in microseconds is _____.

Official answer and solution
Official answer
1575
From
Official GATE 2015 answer key

Solution

Trace the timeline of packet transmission, propagation, and store-and-forward switching delays.

Parameters:

  • Total data =10000 bits= 10000\text{ bits}
  • Packet size =5000 bits= 5000\text{ bits}
  • Number of packets =100005000=2= \frac{10000}{5000} = 2 packets: P1P_1 and P2P_2
  • Link transmission rate B=107 bpsB = 10^7\text{ bps}
  • Transmission time per packet on each link: Tt=5000107 s=5×10−4 s=500 μsT_t = \frac{5000}{10^7}\text{ s} = 5 \times 10^{-4}\text{ s} = 500\ \mu\text{s}
  • Propagation delay per link: Tp=20 μsT_p = 20\ \mu\text{s}
  • Switch processing/forwarding delay: Tproc=35 μsT_{\text{proc}} = 35\ \mu\text{s}

Detailed timeline of events:

  • t=0 μst = 0\ \mu\text{s}: Host 1 begins transmitting packet P1P_1.
  • t=500 μst = 500\ \mu\text{s}: Host 1 finishes transmitting P1P_1 and begins transmitting packet P2P_2.
  • t=500+20=520 μst = 500 + 20 = 520\ \mu\text{s}: The last bit of P1P_1 arrives at the packet switch.
  • t=520+35=555 μst = 520 + 35 = 555\ \mu\text{s}: The switch is ready to forward P1P_1 and begins transmitting P1P_1 on link 2.
  • t=555+500=1055 μst = 555 + 500 = 1055\ \mu\text{s}: The switch finishes transmitting P1P_1 on link 2. Link 2 becomes idle.
  • Meanwhile on link 1: Host 1 completes transmitting P2P_2 at t=500+500=1000 μst = 500 + 500 = 1000\ \mu\text{s}.
  • t=1000+20=1020 μst = 1000 + 20 = 1020\ \mu\text{s}: The last bit of P2P_2 arrives at the switch.
  • With processing delay of 35 μs35\ \mu\text{s}, P2P_2 is ready for transmission at 1020+35=1055 μs1020 + 35 = 1055\ \mu\text{s}.
  • At t=1055 μst = 1055\ \mu\text{s}, link 2 is freed by P1P_1, and P2P_2 is ready! Thus, transmission of P2P_2 on link 2 begins immediately at t=1055 μst = 1055\ \mu\text{s}.
  • t=1055+500=1555 μst = 1055 + 500 = 1555\ \mu\text{s}: The switch finishes transmitting P2P_2 onto link 2.
  • t=1555+20=1575 μst = 1555 + 20 = 1575\ \mu\text{s}: The last bit of P2P_2 arrives at Host 2.

The total elapsed time is 1575 μs1575\ \mu\text{s}.

Final answer

1575

Common trap

Adding the 35 microsecond switch delay twice without checking whether the second packet's readiness overlaps with the ongoing transmission of the first packet.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2015 Computer Science and Information Technology (CS) Session 3
Question
46 of 65, printed as CS Q.36
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.