Flow Control Numericals 2 11
Flow Control Numericals 2 11
BTECH VI CS ‘C’/BTECH VI IT
Solution-
Transmission delay (Tt) = L / B = 1000 bits / 106 bits per sec = 1 msec.
After packet is put on the link, the time out timer is started which is 10 msec long.
The next packet is transmitted after 1 sec = 1000 msec.
If no acknowledgement is received within 10 msec, the packet will be retransmitted.
We have been asked how many times the average message be transmitted i.e. how many
retransmissions are possible.
Retransmission occurs or not depends on the propagation delay (Tp).
If Tp is more, time out will occur and retransmission will take place but if T p is less, then there will
be no time out.
Since propagation delay (Tp) is not given in the question, therefore we can not say anything.
2. Consider the use of 10 K-bit size frames on a 10 Mbps satellite channel with 270 ms delay. What is
the link utilization for stop-and-wait ARQ technique assuming P = 10-3?
Solution:
3. What is the channel utilization for the go-back-N protocol with window size of 7 for the problem 2?
Solution:
4. Host A is sending data to host B over a full duplex link. A and B are using the sliding window
protocol for flow control. The sender and receiver window sizes are 5 packets each. Data packets (sent
only from A to B) are all 1000 bytes long and the transmission time for such a packet is 50ms.
Acknowledgement packets (sent only from B to A) are very small and require negligible transmission
BTECH VI CS ‘C’/BTECH VI IT
time. The propagation delay over the link is 200ms. What is the maximum achievable throughput in
this communication?
a)7.69x106bps b) 11.11 x106bps c)13.33 x106bps d)15.00 x106bps
Since the size of window = 5 packets and 1 packet contains 1000 bytes the total size of the packet in
bytes is 5 x 1000 = 50000bytes
5. Station A uses 32 byte packets to transmit messages to Station B using a sliding window protocol.
The round trip time delay between A and B is 80ms and the bottleneck bandwidth on the path A and B
is 128kbps. What is the optimal window size that A should use?
a) 20 b) 40 c)160 d)320
Since we have to find the optimal window size, we are indirectly said that maximum throughput should
be achieved. Hence the maximum throughput that we can achieve is 128kbps.
RTT = 80ms
Packet size = 32 x 8 bits
6. Station A needs to send a message consisting of 9 packets to station B using a sliding window
(window size 3) and go back-n error control strategy. All packets are ready and immediately available
for transmission. If every 5th packet that A transmits gets lost (but no acks from B ever get lost) then
what is the number of packets that A will transmit for sending the message to B?
a) 12 b) 14 c) 16 d) 18
As every 5th frame is lost. So receiver will never send any ack for that. But Sender will keep sending the
frame available frame in the window.
3 2 1 (1sent)
4 3 2 (2 sent)
BTECH VI CS ‘C’/BTECH VI IT
5 4 3 (3 sent)
6 5 4 (4 sent)
7 6 5 (5 sent) --- 5th lost -- no ack
7 6 5 (6 sent) - no ack until receiver gets 5th
7 6 5 (7 sent) - no ack until receiver gets 5th
sender can no longer send anything now...timeout for 5th
7 6 5 (5 sent)
8 7 6 (6 sent)
9 8 7 (7 sent) -lost
9 8 7 (8 sent) no ack
9 8 7 (9 sent) - no ack
timeout for 7
9 8 7 (7 sent)
9 8 (8 sent)
9 (9 sent) - lost
timeout
9 (9 sent)
Total = 16
7. The distance between two stations M and N is L kilometers. All frames are K bits long. The
propagation delay per kilometer is t seconds. Let R bits/second be the channel capacity. Assuming that
processing delay is negligible, the minimum number of bits for the sequence number field in a frame
for maximum utilization, when the sliding window protocol is used, is:
(a) log2 [(2LtR + 2K)/K]
(b) log2 [(2LtR)/K]
(c) log2 [(2LtR + K)/K]
(d) log2 [(2LtR + K)/2K]
8. If the bandwidth of the line is 1.5 Mbps, RTT is 45 msec and packet size is 1 KB, then find the link
utilization in stop and wait.
BTECH VI CS ‘C’/BTECH VI IT
9. A channel has a bit rate of 4 Kbps and one way propagation delay of 20 msec. The channel uses stop
and wait protocol. The transmission time of the acknowledgement frame is negligible. To get a
channel efficiency of at least 50%, the minimum frame size should be-
Solution- Given- Bandwidth = 4 Kbps Propagation delay (Tp) = 20 msec Efficiency >= 50%
For efficiency to be at least 50%, we must have- 1 / 1+2 a >= ½ and a <= 1/2
Substituting the value of ‘a’, we get- (20 msec x 4 Kbps) / L bits <= 1/2
L >= 160 From here, frame size must be at least 160 bits.
BTECH VI CS ‘C’/BTECH VI IT
10. What is the throughput achievable in stop and wait protocol by a maximum packet size of 1000
bytes and network span of 10 km. Assume the speed of light in cable is 70% of the speed of light in
vaccum.
Solution- We have-
In the given question, we are not provided with the network’s bandwidth.
So, in the above formula of throughput, we have ignored the term Tt from the denominator.
Now, Given-
Throughput = 1000 bytes / [ 2 x 104 m / (2.1 x 108 m/sec)] = 1.05 x 107 bytes per sec = 10.5 MBps
11. If the packet size is 1 KB and propagation time is 15 msec, the channel capacity is 109 b/sec, then
find the transmission time and utilization of sender in stop and wait protocol.
Solution- Given- Packet size = 1 KB Propagation time (Tp) = 15 msec Channel capacity = Bandwidth
(here) = 109 b/sec
NOTE- Generally, channel capacity is the total number of bits which a channel can hold. So, its unit is
bits. But here, channel capacity is actually given as bandwidth because its unit is b/sec.
Transmission delay (Tt) = Packet size / Bandwidth = 1 KB / 109 bits per sec = 210 bits / 109 bits per sec
= 1.024 μsec
Calculating Value Of ‘a’- a = Tp / Tt , a = 15 msec / 1.024 μsec, a = 15000 μsec / 1.024 μsec
a = 14648.46
12. Consider a MAN with average source and destination 20 Km apart and one way delay of 100 μsec.
At what data rate does the round trip delay equals the transmission delay for a 1 KB packet?
Solution- Given- Distance = 20 Km Propagation delay (Tp) = 100 μsec Packet size = 1 KB
We need to have- Round Trip Time = Transmission delay 2 x Propagation delay = Transmission delay
Substituting the values in the above relation, we get- 2 x 100 μsec = 1 KB / Bandwidth
BTECH VI CS ‘C’/BTECH VI IT
Bandwidth = (210 x 106 / 200 ) bytes per sec Bandwidth = 5.12 MBps or 40.96 Mbps
13. Consider two hosts X and Y connected by a single direct link of rate 106 bits/sec. The distance
between the two hosts is 10,000 km and the propagation speed along the link is 2 x 108 m/sec. Host X
sends a file of 50,000 bytes as one large message to host Y continuously. Let the transmission and
propagation delays be p milliseconds and q milliseconds respectively.
Solution- Given- Bandwidth = 106 bits/sec Distance = 10,000 km Propagation speed = 2 x 108
m/sec Packet size = 50,000 bytes
= 50000 bytes / 106 bits per sec = (5 x 104 x 8 bits) / 106 bits per sec = ( 4 x 105 bits ) / 106 bits per sec
14. A sender uses the stop and wait ARQ protocol for reliable transmission of frames. Frames are of
size 1000 bytes and the transmission rate at the sender is 80 Kbps. Size of an acknowledgement is 100
bytes and the transmission rate at the receiver is 8 Kbps. The one way propagation delay is 100 msec.
Solution - Given- Frame size = 1000 bytes Sender bandwidth = 80 Kbps Acknowledgement size =
100 bytes Receiver bandwidth = 8 Kbps Propagation delay (Tp) = 100 msec
Transmission delay (Tt)= Frame size / Sender bandwidth = 1000 bytes / 80 Kbps
= (1000 x 8 bits) / (80 x 103 bits per sec)= 0.1 sec= 100 msec
Calculating Useful Time- Useful Time= Transmission delay of data frame= 100 msec
Calculating Total Time- Total Time = Transmission delay of data frame + Propagation delay of data frame
+ Transmission delay of acknowledgement + Propagation delay of acknowledgement
= 100 msec + 100 msec + 100 msec + 100 msec = 400 msec
BTECH VI CS ‘C’/BTECH VI IT
Calculating Efficiency- Efficiency (η) = Useful time / Total time = 100 msec / 400 msec = 1 / 4 = 25%
= 0.25 x 80 Kbps = 20 Kbps= (20 x 1000 / 8) bytes per sec= 2500 bytes/sec
15. Using stop and wait protocol, sender wants to transmit 10 data packets to the receiver. Out of
these 10 data packets, every 4th data packet is lost. How many packets sender will have to send in
total?
Solution- Draw a time line diagram and analyze. The packets will be sent as-
1, 2, 3, 4, 4, 5, 6, 7, 7, 8, 9, 10, 10
16. If transmission delay and propagation delay in a sliding window protocol are 1 msec and 49.5 msec
respectively, then-
What should be the sender window size to get the maximum efficiency?
What is the minimum number of bits required in the sequence number field?
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
Part-01: 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
Part-02: 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
Part-03: If only 6 bits are reserved in the sequence number field, then- Maximum sequence numbers
possible = 26 = 64 Now, Efficiency = Sender window size in the protocol / Optimal sender window size
17. If transmission delay and propagation delay in a sliding window protocol are 1 msec and 99.5
msec respectively, then-
What should be the sender window size to get the maximum efficiency?
What is the minimum number of bits required in the sequence number field?
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
Part-01: 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
Part-02: Minimum number of bits required in the sequence number field = ⌈log2(1+2a) ⌉
BTECH VI CS ‘C’/BTECH VI IT
= ⌈log2(200)⌉= ⌈7.64⌉= 8 Thus, Minimum number of bits required in the sequence number field = 8
Part-03: If only 6 bits are reserved in the sequence number field, then- Maximum sequence numbers
possible = 27 = 128 Now, Efficiency = Sender window size in the protocol / Optimal sender window size
18. A 3000 km long trunk operates at 1.536 Mbps and is used to transmit 64 byte frames and uses
sliding window protocol. If the propagation speed is 6 μsec / km, how many bits should the sequence
number field be?
Solution- Given- Distance = 3000 km Bandwidth = 1.536 Mbps Packet size = 64 bytes Propagation
speed = 6 μsec / km
= 64 bytes / 1.536 Mbps = (64 x 8 bits) / (1.536 x 106 bits per sec) = 333.33 μsec
Calculating Bits Required in Sequence Number Field- Bits required in sequence number field
=⌈log2(1+2a)⌉ = ⌈log2(1 + 2 x 54)⌉ = ⌈log2(109)⌉ = ⌈6.76⌉ = 7 bits Thus,
Minimum number of bits required in sequence number field = 7, With 7 bits, number of sequence
numbers possible = 128, We use only (1+2a) = 109 sequence numbers and rest remains unused.
19. Compute approximate optimal window size when packet size is 53 bytes, RTT is 60 msec and
bottleneck bandwidth is 155 Mbps.
Solution- Given- Packet size = 53 bytes RTT = 60 msec Bandwidth = 155 Mbps
= 53 bytes / 155 Mbps = (53 x 8 bits) / (155 x 106 bits per sec) = 2.735 μsec
= 60 msec / 2= 30 msec
20. A sliding window protocol is designed for a 1 Mbps point to point link to the moon which has a one
way latency (delay) of 1.25 sec. Assuming that each frame carries 1 KB of data, what is the minimum
number of bits needed for the sequence number?
BTECH VI CS ‘C’/BTECH VI IT
Solution- Given- Bandwidth = 1 Mbps Propagation delay (Tp) = 1.25 sec Packet size = 1 KB
Calculating Transmission Delay- Transmission delay (Tt)= Packet size / Bandwidth = 1 KB / 1 Mbps
Calculating Bits Required in Sequence Number Field- Bits required in sequence number field
Thus, Minimum number of bits required in sequence number field = 9 With 9 bits, number of sequence
numbers possible = 512. We use only (1+2a) sequence numbers and rest remains unused.
21. Host A is sending data to host B over a full duplex link. A and B are using the sliding window
protocol for flow control. The send and receive window sizes are 5 packets each. Data packets (sent
only from A to B) are all 1000 bytes long and the transmission time for such a packet is 50 μs.
Acknowledgement packets (sent only from B to A) are very small and require negligible transmission
time. The propagation delay over the link is 200 μs. What is the maximum achievable throughput in
this communication?
7.69 x 106 Bps 11.11 x 106 Bps 12.33 x 106 Bps 15.00 x 106 Bps
Solution- Given- Sender window size = Receiver window size = 5 Packet size = 1000 bytes
So, Bandwidth = Packet Size / Transmission delay (Tt)= 1000 bytes / 50 μs = (1000 x 8 bits) / (50 x 10-6
sec)= 160 Mbps
Calculating Efficiency- Efficiency (η) = Sender window size / Optimal window size = 5 / 9
= 0.5555 = 55.55%
= Efficiency (η) x Bandwidth = 0.5555 x 160 Mbps = 88.88 Mbps = 88.88 x 106 bps or 11.11 x 106 Bps
22. Station A uses 32 byte packets to transmit messages to station B using a sliding window protocol.
The round trip delay between A and B is 80 msec and the bottleneck bandwidth on the path between
A and B is 128 Kbps. What is the optimal window size that A should use?
20 40 160 320
BTECH VI CS ‘C’/BTECH VI IT
Solution-Given- Packet size = 32 bytes Round Trip Time = 80 msec Bandwidth = 128 Kbps
= 32 bytes / 128 Kbps= (32 x 8 bits) / (128 x 103 bits per sec)= 2 msec
Calculating Propagation Delay-propagation delay (Tp)= Round Trip Time / 2= 80 msec / 2= 40 msec
Calculating Optimal Window Size-Optimal window size= 1 + 2a= 1 + 2 x 20 = 41 which is close to option
(B) Thus, Option (B) is correct.