Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Go Back N Numericals

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Tutorials (Practice Problems) – Part 2

Problem-01:
If transmission delay and propagation delay in a sliding window protocol are 1 msec.
and 49.5 msec. respectively, then:
1- What should be the sender window size to get the maximum efficiency?
2- What is the minimum number of bits required in the sequence number field?
3- If only 6 bits are reserved for sequence numbers, then what will be the
efficiency?
Solution:
Given-
Transmission delay = 1 msec.
Propagation delay = 49.5 msec.

Calculating sender window size to get the maximum efficiency:


To get the maximum efficiency, sender window size
= 1 + 2a
= 1 + 2 x (Tp / Tt)
= 1 + 2 x (49.5 msec / 1 msec)
= 1 + 2 x 49.5
= 100
Thus,
For maximum efficiency, sender window size = 100.

Calculating the minimum number of bits required in the sequence number field:
Minimum number of bits required in the sequence number field
= ⌈log2(1+2a) ⌉
= ⌈log2(100) ⌉
= ⌈6.8⌉
=7
Thus,
Minimum number of bits required in the sequence number field = 7.

Calculating the efficiency according to sequence numbers:


If only 6 bits are reserved in the sequence number field, then-
Maximum sequence numbers possible = 26 = 64
Efficiency = Sender window size in the protocol / Optimal sender window size
= 64 / 100
= 0.64
= 64%

Problem-02:
If transmission delay and propagation delay in a sliding window protocol are 1 msec.
and 99.5 msec. respectively, then:

1- What should be the sender window size to get the maximum efficiency?
2- What is the minimum number of bits required in the sequence number field?
3- If only 7 bits are reserved for sequence numbers, then what will be the efficiency?

Solution-
Given-
Transmission delay = 1 msec.
Propagation delay = 99.5 msec.

Calculating the sender window size to get the maximum efficiency:


To get the maximum efficiency, sender window size
= 1 + 2a
= 1 + 2 x (Tp / Tt)
= 1 + 2 x (99.5 msec / 1 msec)
= 1 + 2 x 99.5
= 200
Thus,
For maximum efficiency, sender window size = 200.

Calculating the minimum number of bits required in the sequence number field
= ⌈log2(1+2a) ⌉
= ⌈log2(200) ⌉
= ⌈7.64⌉
=8
Thus,
Minimum number of bits required in the sequence number field = 8.

Calculating the efficiency according to sequence numbers:


If only 7 bits are reserved in the sequence number field, then-
Maximum sequence numbers possible = 27 = 128
Efficiency = Sender window size in the protocol / Optimal sender window size
= 128 / 200
= 0.64
= 64 %.

Problem-03:
A 20 Kbps satellite link has a propagation delay of 400 msec., the transmitter employs
the “Go back N” ARQ” scheme with N set to 10.
Assuming that each frame is 100 bytes long, what is the maximum data rate possible?

Solution-
Given:
Bandwidth = 20 Kbps
Propagation delay (Tp) = 400 msec.
Frame size = 100 bytes
Go back N is used where N = 10.

Calculating Transmission Delay:


Transmission delay (Tt)
= Frame size / Bandwidth
= 100 bytes / 20 Kbps
= (100 x 8 bits) / (20 x 10^3 bits per sec)
= 0.04 sec
= 40 msec.

Calculating Value of ‘a’:


a = Tp / Tt
a = 400 msec. / 40 msec.
a = 10

Calculating Efficiency:
Efficiency (η) = N / (1+2a)
= 10 / (1 + 2 x 10)
= 10 / 21
= 0.476
= 47.6 %.

Calculating Maximum Data Rate Possible:


Maximum data rate possible or Throughput = Efficiency x Bandwidth
= 0.476 x 20 Kbps
= 9.52 Kbps ≅ 10 Kbps
Problem-04:
A 1 Mbps satellite link connects two ground stations. The altitude of the satellite is
36504 km and speed of the signal is 3 x 10^8 m/sec. What should be the packet size
for a channel utilization of 25% for a satellite link using go back 127 sliding window
protocol?

Solution-
Given-
Bandwidth = 1 Mbps
Distance = 2 x 36504 km = 73008 km
Propagation speed = 3 x 10^8 m/sec
Efficiency = 25% = 1/4
Go back N is used where N = 127
Let the packet size be L bits.

Calculating Transmission Delay-


Transmission delay (Tt)
= Packet size / Bandwidth
= L bits / 1 Mbps
= L μsec.

Calculating Propagation Delay:


Propagation delay (Tp)
= Distance / Speed
= (73008 x 10^3 m) / (3 x 10^8 m/sec)
= 24336 x 10^-5 sec
= 243360 μsec.

Calculating Value of ‘a’:


a = Tp / Tt
a = 243360 μsec / L μsec
a = 243360 / L

Calculating Packet Size:


Efficiency (η) = N / (1+2a)
Substituting the values, we get-
1/4 = 127 / (1 + 2 x 243360 / L)
1/4 = 127 x L / (L + 486720)
L + 486720 = 508 x L
507 x L = 486720
L = 960 bits.
From here, packet size = 960 bits or 120 bytes.

Problem-05:
Consider a network connecting two systems located 8000 km apart. The bandwidth
of the network is 500 x 10^6 bits per second. The propagation speed of the media is
4 x 10^6 meters per second. It is needed to design a Go back N sliding window
protocol for this network. The average packet size is 10^7 bits. The network is to be
used to its full capacity.
Assume that processing delays at nodes are negligible. What is the minimum size in
bits of the sequence number field?

Solution-
Given-
Distance = 8000 km
Bandwidth = 500 x 10^6 bps
Propagation speed = 4 x 10^6 m/sec
Packet size = 10^7 bits
Now, for using the network to its full capacity, Efficiency (η) = 1
Efficiency (η) = 1 when sender window size = 1+2a.

Calculating Transmission Delay:


Transmission delay (Tt)
= Packet size / Bandwidth
= 10^7 bits / (500 x 10^6 bits per sec)
= 1 / 50 sec
= 0.02 sec.

Calculating Propagation Delay:


Propagation delay (Tp)
= Distance / Speed
= 8000 km / (4 x 10^6 m/sec)
= 2 sec.

Calculating Value of ‘a’:


a = Tp / Tt
a = 2 sec / 0.02 sec
a = 100.
Calculating Sender Window Size:
Sender window size
= 1 + 2a
= 1 + 2 x 100
= 201.

Calculating Minimum Size of Sequence Number Field:


Minimum number of bits required in the sequence number field
= ⌈log2(1+2a) ⌉
= ⌈log2(201) ⌉
= ⌈7.65⌉
=8
Thus, Minimum size of sequence number field = 8 bits.

Problem-06:
Consider a 128 x 10^3 bits/sec satellited communication link with one-way
propagation delay of 150 msec. Selective Retransmission (repeat) protocol is used
on this link to send data with a frame size of 1 KB. Neglect the transmission time of
acknowledgement. What is the minimum number of bits required for the sequence
number field to achieve 100% utilization?

Solution-
Given-
Bandwidth = 128 x 10^3 bits/sec
Propagation delay (Tp) = 150 msec.
Frame size = 1 KB
Now, to achieve 100% utilization, efficiency must be 100%.
Efficiency is 100% when sender window size is optimal (i.e. 1+2a).

Calculating Transmission Delay:


Transmission delay (Tt)
= Frame size / Bandwidth
= 1 KB / (128 x 10^3 bits per sec)
= (1 x 2^10 x 8 bits) / (128 x 10^3 bits per sec)
= 64 msec.

Calculating Value of ‘a’:


a = Tp / Tt
a = 150 msec. / 64 msec.
a = 2.34.
Calculating Optimal Sender Window Size:
Optimal sender window size
= 1 + 2a
= 1 + 2 x 2.34
= ⌈5.68⌉
=6

Calculating Number Of Sequence Numbers Required:


In SR Protocol, sender window size and receiver window size are same.
So, sender window size = receiver window size = 6
Now, for any sliding window protocol, minimum number of sequence numbers
required
= Sender window size + Receiver window size
=6+6
= 12.

Calculating Bits Required in Sequence Number Field:


To have 12 sequence numbers,
Minimum number of bits required in sequence number field
= ⌈log2(12) ⌉
=4
Thus,
- Minimum number of bits required in sequence number field = 4
- With 4 bits, number of sequence numbers possible = 16
- We use only 12 sequence numbers and rest 4 remains unused.

You might also like