0% found this document useful (0 votes)
73 views10 pages

Flow Control Numericals 2 11

The document contains a series of practice problems related to flow and error control in data communication, focusing on concepts such as link utilization, throughput, and transmission delays. Each problem is followed by a detailed solution that includes calculations for various parameters like propagation delay, transmission time, and optimal window sizes. The problems cover different protocols including stop-and-wait, sliding window, and go-back-N, providing a comprehensive review of the topic.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views10 pages

Flow Control Numericals 2 11

The document contains a series of practice problems related to flow and error control in data communication, focusing on concepts such as link utilization, throughput, and transmission delays. Each problem is followed by a detailed solution that includes calculations for various parameters like propagation delay, transmission time, and optimal window sizes. The problems cover different protocols including stop-and-wait, sliding window, and go-back-N, providing a comprehensive review of the topic.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

lOMoARcPSD|7223682

BTECH VI CS ‘C’/BTECH VI IT

Flow & Error Control Practice Set


1. Consider 1 Mbps error free line. The maximum frame size is 1000 bits. New packets are generated
about 1 sec apart. The time out interval is 10 msec. If the ack time is eliminated. How many times the
average message be transmitted?

A. Only once B.Twice C.Thrice D.Can’t say

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.

Thus, Option (D) is correct.

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:

Link utilization = (1-P) / (1+2a)


Where a = (Propagation Time) / (Transmission Time) Propagation time = 270 msec
Transmission time = (frame length) / (data rate) = (10 K-bit) / (10 Mbps) = 1 msec
Hence, a = 270/1 = 270 Link utilization = 0.999/(1+2*270) ≈0.0018 =0.18%

3. What is the channel utilization for the go-back-N protocol with window size of 7 for the problem 2?

Solution:

Channel utilization for go-back-N = N(1 – P) / (1 + 2a)(1-P+NP)


P = probability of single frame error ≈ 10-3Channel utilization ≈ 0.01285 = 1.285%

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

Downloaded by Jitendra Kumar Chauhan ([email protected])


lOMoARcPSD|7223682

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

Solution: (b) is correct option

Throughput =1 window/ RTT


RTT = Round Trip Time = Transmission Time + 2 x propagation time
= 50ms + 2 x 200ms = 450ms

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

Therefore, Throughput = 5000 bytes/ 450 x10-6 s = 11.11 x106bps

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

Solution: (b) is correct option

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

We know, Throughput =1 window/ RTT


Therefore optimal window size = Throughput x RTT
= 128x103 x 80x10-3
= 128 x 80 bits
Therefore, optimal window size in terms of packets = (128 x 80) / (32 x 8) = 40

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

Solution: (c) is correct option

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)

Downloaded by Jitendra Kumar Chauhan ([email protected])


lOMoARcPSD|7223682

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]

Solution: (c) is correct option


Given,
Bandwidth = R bps, Frame Size = K bits, distance between stations = L kms
Propagation delay = t seconds per km
= Lt seconds
We know, Throughput =1 window/ RTT
Since link utilization is maximum => Throughput = R
RTT = (2 x propagation delay) + Transmission Time
= 2Lt + (K/R)
1 window in terms of bits = Throughput x RTT
= R {2Lt + (K/R)} = 2LtR + K
1 window in terms of frames = [2LtR + K ]/K
Sequence numbers required: 2n = [2LtR + K ]/K
{where n is the number of bits for the sequence number field}
Therefore n = log2 [(2LtR + K)/K]

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.

Downloaded by Jitendra Kumar Chauhan ([email protected])


lOMoARcPSD|7223682

BTECH VI CS ‘C’/BTECH VI IT

Solution- Given- Bandwidth = 1.5 Mbps, RTT = 45 msec, Packet size = 1 KB

Calculating Transmission Delay-

Transmission delay (Tt)= Packet size / Bandwidth= 1 KB / 1.5 Mbps

= (210 x 8 bits) / (1.5 x 106 bits per sec)= 5.461 msec

Calculating Propagation Delay-

Propagation delay (Tp)= Round Trip Time / 2= 45 msec / 2= 22.5 msec

Calculating Value Of ‘a’-

a = Tp / Tt , a = 22.5 msec / 5.461 msec , a = 4.12

Calculating Link Utilization-

Link Utilization or Efficiency (η)= 1 / 1+2a = 1 / (1 + 2 x 4.12) = 1 / 9.24 = 0.108 = 10.8 %

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-

80 bytes 80 bits 160 bytes 160 bits

Solution- Given- Bandwidth = 4 Kbps Propagation delay (Tp) = 20 msec Efficiency >= 50%

Let the required frame size = L bits.

Calculating Transmission Delay-

Transmission delay (Tt) = Packet size / Bandwidth = L bits / 4 Kbps

Calculating Value Of ‘a’-

a = Tp / Tt , a = 20 msec / ( L bits / 4 Kbps), a = (20 msec x 4 Kbps) / L bits

Condition For Efficiency To Be At least 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 bits >= (20 msec x 4 Kbps) x 2

L bits >= (20 x 10-3 sec x 4 x 103 bits per sec) x 2

L bits >= 20 x 4 bits x 2

L >= 160 From here, frame size must be at least 160 bits.

Thus, Correct Option is (D).

Downloaded by Jitendra Kumar Chauhan ([email protected])


lOMoARcPSD|7223682

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.

Although it is incorrect, but we still ignore it for solving the question.

Now, Given-

L = 1000 bytes d = 10 km = 104 m v = 70% of 3 x 108 m/sec = 2.1 x 108 m/sec

Substituting the values in the above relation, we get-

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.

Calculating Transmission Delay-

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

Calculating Sender Utilization- Sender Utilization or Efficiency (η) = 1 / 1+2a = 1 / (1 + 2 x 1468.46)

= 1 / 29297.92 = 0.0000341 = 0.00341 %

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

Bandwidth = 1 KB / 200 μsec

Downloaded by Jitendra Kumar Chauhan ([email protected])


lOMoARcPSD|7223682

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.

Then the value of p and q are-

p = 50 and q = 100 p = 50 and q = 400 p = 100 and q = 50 p = 400 and q = 50

Solution- Given- Bandwidth = 106 bits/sec Distance = 10,000 km Propagation speed = 2 x 108
m/sec Packet size = 50,000 bytes

Calculating Transmission Delay- Transmission delay (Tt) = Packet size / Bandwidth

= 50000 bytes / 106 bits per sec = (5 x 104 x 8 bits) / 106 bits per sec = ( 4 x 105 bits ) / 106 bits per sec

= 0.4 sec = 400 msec

Calculating Propagation Delay- Propagation delay (Tp) = Distance / Propagation speed

= 10000 km / (2 x 108 m/sec) = 107 m / (2 x 108 m/sec)

= 50 msec Thus, Option (D) is correct.

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.

Assuming no frame is lost, the sender throughput is __________ bytes/sec.

Solution - Given- Frame size = 1000 bytes Sender bandwidth = 80 Kbps Acknowledgement size =
100 bytes Receiver bandwidth = 8 Kbps Propagation delay (Tp) = 100 msec

Calculating Transmission Delay of Data Frame-

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 Transmission Delay Of Acknowledgement- Transmission delay (Tt) = Acknowledgement size /


Receiver bandwidth = 100 bytes / 8 Kbps = (100 x 8 bits) / (8 x 103 bits per 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

Downloaded by Jitendra Kumar Chauhan ([email protected])


lOMoARcPSD|7223682

BTECH VI CS ‘C’/BTECH VI IT

Calculating Efficiency- Efficiency (η) = Useful time / Total time = 100 msec / 400 msec = 1 / 4 = 25%

Calculating Sender Throughput- Sender throughput = Efficiency (η) x Sender bandwidth

= 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

The lost packets are- 4, 7 and 10.

Thus, sender will have to send 13 data packets in total.

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

= 64 / 100 = 0.64 = 64%

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) ⌉

Downloaded by Jitendra Kumar Chauhan ([email protected])


lOMoARcPSD|7223682

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

= 128 / 200 = 0.64 = 64%

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

Calculating Transmission Delay- Transmission delay (Tt) = Packet size / Bandwidth

= 64 bytes / 1.536 Mbps = (64 x 8 bits) / (1.536 x 106 bits per sec) = 333.33 μsec

Calculating Propagation Delay- For 1 km, propagation delay = 6 μsec

For 3000 km, propagation delay = 3000 x 6 μsec = 18000 μsec

Calculating Value Of ‘a’- a = Tp / Tt = 18000 μsec / 333.33 μsec = 54

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

Calculating Transmission Delay- Transmission delay (Tt) = Packet size / Bandwidth

= 53 bytes / 155 Mbps = (53 x 8 bits) / (155 x 106 bits per sec) = 2.735 μsec

Calculating Propagation Delay-Propagation delay (Tp) = Round Trip Time / 2

= 60 msec / 2= 30 msec

Calculating Value of ‘a’- a = Tp / Tt = 30 msec / 2.735 μsec = 10968.921

Calculating Optimal Window Size- Optimal window size = 1 + 2a = 1 + 2 x 10968.921= 21938.84

Thus, approximate optimal window size = 21938 frames.

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?

Downloaded by Jitendra Kumar Chauhan ([email protected])


lOMoARcPSD|7223682

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

= (210 x 8 bits) / (106 bits per sec) = 8.192 msec

Calculating Value of ‘a’- a = Tp / Tt, a = 1.25 sec / 8.192 msec ,a = 152.59

Calculating Bits Required in Sequence Number Field- Bits required in sequence number field

= ⌈log2(1+2a)⌉ = ⌈log2(1 + 2 x 152.59)⌉ = ⌈log2(306.176) ⌉= ⌈8.25 ⌉ = 9 bits

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

Transmission delay (Tt) = 50 μs Propagation delay (Tp) = 200 μs

Calculating Bandwidth- Transmission delay = Packet size / Bandwidth

So, Bandwidth = Packet Size / Transmission delay (Tt)= 1000 bytes / 50 μs = (1000 x 8 bits) / (50 x 10-6
sec)= 160 Mbps

Calculating Value of ‘a’- a = Tp / Tt = 200 μsec / 50 μsec = 4

Calculating Optimal Window Size- Optimal window size = 1 + 2a = 1 + 2 x 4 = 9

Calculating Efficiency- Efficiency (η) = Sender window size / Optimal window size = 5 / 9

= 0.5555 = 55.55%

Calculating Maximum Achievable Throughput- Maximum achievable throughput

= Efficiency (η) x Bandwidth = 0.5555 x 160 Mbps = 88.88 Mbps = 88.88 x 106 bps or 11.11 x 106 Bps

Thus, Option (B) is correct.

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

Downloaded by Jitendra Kumar Chauhan ([email protected])


lOMoARcPSD|7223682

BTECH VI CS ‘C’/BTECH VI IT

Solution-Given- Packet size = 32 bytes Round Trip Time = 80 msec Bandwidth = 128 Kbps

Calculating Transmission Delay-Transmission delay (Tt)= Packet size / Bandwidth

= 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 Value of ‘a’-a = Tp / Tt = 40 msec / 2 msec = 20

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.

Downloaded by Jitendra Kumar Chauhan ([email protected])

You might also like