• edited by
61,818 views
107 107 votes

In a packet switching network, packets are routed from source to destination along a single path having two intermediate nodes. If the message size is $24$ bytes and each packet contains a header of $3$ bytes, then the optimum packet size is:

  1. $4$
  2. $6$
  3. $7$
  4. $9$

15 Answers

Best answer
149 149 votes

Correct answer should be option D.

As we know in packet switching- dividing message into packets decrease the
transmission time due to pipelined transmission.

but if there are many packets beyond some threshold then transmission time may
increase. So, we can do by option checking 

1. packet size $=4 =\text{ packet data + header size}= 1+3$

    So no. of packets will be $=\dfrac{\text{message}}{\text{packet data}}$
    $=\dfrac{24\ B}{1\ B}  = 24\text{ packets}$.

So, time to reach at receiver for $1^{st}$ packet will be,

    $=3 \text{ (source + two intermediate node)}\times \text{transmission time}$ 

$TT=\dfrac{L}{BW}$... Here, $L$ will be changed according to option and $BW$ will remain same ..

So time to reach at receiver for $1^{st}$ packet will be $=\dfrac{3\times 4}{BW}=\dfrac{12}{BW}$

and for remaining $23$ packets will take time $=23\times TT=\dfrac{23\times 4}{BW}=\dfrac{92}{BW}$

TOTAL TIME $=\dfrac{104}{BW}$

2. packet size $= 6 = 3+3\text{ ( packet data + header size)}$ so no of packets will be $8$.

Time to reach at receiver for $1^{st}$ packet will be $=\dfrac{3\times 6}{BW}=\dfrac{18}{BW}$

and for remaining $7$ packet will take time $=\dfrac{7\times 6}{BW}=\dfrac{42}{BW}$

Total time $=\dfrac{60}{BW}$

3. packet size $= 7 = 4+3,$ so no of packets $=\dfrac{24}{4}=6\text{ packets}$

For $1^{st}$ packet time will be $=\dfrac{3\times 7}{BW}=\dfrac{21}{BW}$

For remaining $5$ packet will take time $=\dfrac{5\times 7}{BW}=\dfrac{35}{BW}$

Total time$=\dfrac{56}{BW}$.

4. packet size $=9=6+3,$ so no of packet will be $4.$

For $1^{st}$ packet time will be $=\dfrac{3\times 9}{BW}=\dfrac{27}{BW}$

For remaining $3$ packets will take time $=\dfrac{3\times 9}{BW}=\dfrac{27}{BW}$

TOTAL time $=\dfrac{54}{BW}$

So, optimal packet size will be $9\text{ byte}$ due to less total transmission time.


Alternate method (thanks to sachin )

In that case we can do it using minimisation of a variable.

Let, $24\text{ byte}$ data is divided into number of packets each have $x\text{ bytes}$ of data.  

Therefore, packet size $=x+3,$ and Number of packets $(k)=\dfrac{24}{x}$.
(it is ceil, if $24$ is not multiple of $x$ )

Total time =$3(x+3)+ (k-1)(x+3)$ (assumed $BW =1,$ just to avoid writing ‘$\text{BW}$’ again and again)

(ignoring propagation delay as it has nothing to do with packet size, if one wish he/she can add that too but later he will realize it will anyway become zero while differentiating. )

$\Rightarrow$ Total time $=2x+3k+kx+6$     ( $k$ is equal to $\text{24}/{x}$ ) 

$\Rightarrow$ Total time $= 2x+\left(\dfrac{3\times 24}{x}\right)+\left(\dfrac{24*x}{ x}\right)+6$

$\Rightarrow$ Total time $=2x+\frac{72}{x}+30$

to minimise this time, differentiation should give $0.$ 

that gives, $2−\dfrac{72}{x^{2}} = 0$ 

$\Rightarrow x=6$.

including $3\text{ bytes}$ of header, packet size $=9\text{ Bytes}$.

Option is D.

• edited by
68 68 votes

option   D

packet size  $P = p+h$.  where,  $h$ is  header  size  and

$p=\sqrt{\dfrac{hx}{k-1}}$   where, $x$  is  message  size  and  $k$ is  no. of  hopes.  

so  $p=\sqrt{\dfrac{3\times 24}{2}}=\sqrt{\dfrac{72}{2}}=\sqrt{36}= 6$  

so  Optimum packet size is $ 6 + 3  =  9.$

• edited by
16 16 votes

Dividing a message into packets may decrease the transmission time due to parallelism as shown in the following figure. But after a certain limit reducing the packet size may increase the transmission time also. Following figure shows the situation given in question. Let transmission time to transfer 1 byte for all nodes be t. The first packet will take time = (packet size)*3*t. After the first packet reaches the destination, remaining packets will take time equal to (packet size)*t due to parallelism.

If we use 4 bytes as packet size, there will be 24 packets
Total Transmission time = Time taken by first packet + 
                          Time taken by remaining packets 
                       = 3*4*t + 23*4*t = 104t

If we use 6 bytes as packet size, there will be 8 packets
Total Transmission time = 3*6*t + 7*6*t = 60t

If we use 7 bytes as packet size, there will be 6 packets
Total Transmission time = 3*7*t + 5*7*t = 56t

If we use 9 bytes as packet size, there will be 4 packets
Total Transmission time = 3*9*t + 3*9*t = 54t
10 10 votes

Very simple solution -  https://www.aspirebuzz.com/content/packet-switching-network-packets-are-rout

Packet switched network message = 24 bytes

Header size = 3

Case 1: If packet size = 4

Then data = 4-3 =1 bytes only So require 24 packets

Case 2: Packet size 6 Data = 6-3 =3 Require 8 packets.

Case 3: Packet size = 7 Data = 7-3 =4 Require packets.

Case 4: Packet size=9 Data = 9-3 =6 Require Packets.

So min requirement is in case 4. Hence (d) is correct option

 

8 8 votes

ans given by @sonamvyas + @skrahul is right it is just my approach for generalized way for this problem
suppose x=message size, h=header size, p=payload/packet date size ,assume bandwidth is b bps,no of hopes=k 
total no of packets= x/p 
--->> when message is packetized then these are send in a pipelined manner to reduce transmission time but thereis a threshold on packet size p hence it may not be more large or more small it must be optimum (??)
  now we first derive transmission time ("ist packet takes transmissioon delay by all the intermediate nodes and source or transmission delay on all hopes and rest all packets take onle one hope transmission delay due to pipeline ")
transmission time =tt= 
         (p+h)*k / b +(x/p - 1)*(p+h)/b
=1/b( (p+h)*k + 1/p (x-p) (h+p))
// so resultantely we want to find minimum transmission delay at optimum packet size so differentiate tt w.r.t. p we get  //
dtt/dp= 1/b(k*p2 -p2-xh)=0
so p2 =(xh/k-1) or p=√(xh/k-1)
here h=3 x=24 k=3
p=√(24*3)/2 =6
so packet size =p+h=6+3=9 bytes

Answer:
Position:
Show:

Related questions

197 197 votes
9 answers 9 answers
77.4k
77.4k views
Kathleen asked Sep 22, 2014
77,389 views
A $5$ stage pipelined CPU has the following sequence of stages:IF – instruction fetch from instruction memoryRD – Instruction decode and register readEX – Execute: ALU op...
32 32 votes
3 answers 3 answers
15.3k
15.3k views
gatecse asked Sep 21, 2014
15,301 views
Let $f(x)$ be the continuous probability density function of a random variable $x$, the probability that $a < x \leq b$, is :$f(b-a)$$f(b) - f(a)$$\int\limits_a^b f(x) dx...
57 57 votes
9 answers 9 answers
51.0k
51.0k views
Kathleen asked Sep 22, 2014
50,969 views
An organization has a class $B$ network and wishes to form subnets for $64$ departments. The subnet mask would be:$255.255.0.0$$255.255.64.0$$255.255.128.0$$255.255.252.0...
33 33 votes
5 answers 5 answers
17.1k
17.1k views
Kathleen asked Sep 22, 2014
17,067 views
In a network of LANs connected by bridges, packets are sent from one LAN to another through intermediate bridges. Since more than one path may exist between two LANs, pac...