57 views
Consider sending a large file of $360,000$ bits from Host $A$ to Host $B$, connected through a router. Assume that there is no queuing and propagation delay, and the router has sufficient buffer space. Host $A$ splits the file into segments of $S$ bits each and adds $36$ bits of header to each segment, forming packets of $(36 + S)$ bits. Each link has a transmission rate of $R$ bps. Find the value of $S$ that minimizes the time needed to move the file from Host $A$ to Host $B$.
retagged | 57 views

+1 vote
Time taken by $1^{st}$ packet to reach the destination is $((36 + S)/R )*2$, After this one packet is received at the destination in

$(36+S)/R$ because packets are transferred back to back by host $A$.

Assumed $360,000$ be $F$ for easier calculation

Let $total \ delay$ be $T$

So, the delay in sending the whole file is

$T = time \ to \ send \ 1 \ packet \ + \ time \ to \ send \ remaining \ (F/S - 1) \ packets$

$T = ((36 + S)/R )*2 + (F/S - 1)*(36+S)/R$

To calculate the minimum value of $S$, we need to take derivative and equate it to $0$

$dT/dS = 0$

$T = ((36 + S)/R )*2 + (F/S - 1)*(36+S)/R$

$T = (36 + S)/R )*(F/S + 1)$

$dT/dS = -36.F/(R.S^2) + 1/R = 0$

$-36.F/S^2 + 1 = 0$

$36.F/S^2 = 1$

$36.F = S^2$

$S = \sqrt{36.F}$

$S = \sqrt{36.360000} = 3600$

$S = 3600 \ bits$