Delays in Computer Networks
Delays in Computer Networks
Consider-
•Two hosts A and B are connected over a transmission link /
transmission media.
•A data packet is sent by the Host A to Host B.
Following different types of delay occur during transmission-
1.Transmission delay
2.Propagation delay
3.Queuing delay
4.Processing delay
Transmission Delay
Assume-
• Queuing delay and processing delay to be zero at
both sender and receiver side.
• Transmission time for the acknowledgement to be
zero since it’s size is very small.
We know,
• Propagation delay depends on the distance and
speed.
• So, it would be same for both data packet and
acknowledgement.
So, we have-
• Total time taken in sending one data packet
= (Transmission delay)packet + 2 x Propagation delay
Efficiency
• Useless time = Time for which sender is forced to wait and do nothing = 2
x Propagation delay
For any sliding window protocol to work without any problem,the following condition must be satisfied-
• Available Sequence Numbers >= Sender Window Size + Receiver Window Size
Here,
• Sender uses Tt time for transmitting the packet over the link.
• Then, sender waits for 2 x Tp time.
• After 2 x Tp time, sender receives the acknowledgement for the sent
frame from the receiver.
• Then, sender sends the next frame.
• This 2 x Tp waiting time is the actual cause of less efficiency.
Problem 1. 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.
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
Problem 1. 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.
Solution-
• Given-
• Bandwidth = 4 Kbps
• Propagation delay (Tp) = 20 msec
• Efficiency >= 50%
• a = Tp / Tt
• a = 20 msec / ( L bits / 4 Kbps)
• a = (20 msec x 4 Kbps) / L bits
Problem-02: 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-
(a) 80 bytes (b) 80 bits (c) 160 bytes (d) 160 bits
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
• Bandwidth = (210 x 106 / 200 ) bytes per sec
• Bandwidth = 5.12 MBps or 40.96 Mbps
Problem-04:Consider two hosts X and Y connected by a single direct link of rate 10 6 bits/sec. The
distance between the two hosts is 10,000 km and the propagation speed along the link is 2 x 10 8 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- (a) p = 50 and q = 100 (b) p = 50 and q = 400 (c) p = 100 and q = 50 (d)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
Problem-04:Consider two hosts X and Y connected by a single direct link of rate 10 6 bits/sec. The
distance between the two hosts is 10,000 km and the propagation speed along the link is 2 x 10 8 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- (a) p = 50 and q = 100 (b) p = 50 and q = 400 (c) p = 100 and q = 50 (d)p =
400 and q = 50
Solution-
Given-
• Bandwidth = 1 Mbps
• Propagation delay (Tp) = 0.75 ms
• Processing time (Tprocess) = 0.25 ms
• Data frame size = 1980 bytes
• Acknowledgement frame size = 20 bytes
• Overhead in data frame = 20 bytes
Problem-05:The values of parameters for the stop and wait ARQ protocol are as given below-
Bit rate of the transmission channel = 1 Mbps
Propagation delay from sender to receiver = 0.75 ms
Time to process a frame = 0.25 ms
Number of bytes in the information frame = 1980
Number of bytes in the acknowledge frame = 20
Number of overhead bytes in the information frame = 20
Assume that there are no transmission errors. Then the transmission efficiency (in %) of the stop and
wait ARQ protocol for the above parameters is ___________ . (correct to 2 decimal places)
Calculating Useful Time-
Useful data sent
• = Transmission delay of useful data bytes sent
• = Useful data bytes sent / Bandwidth
• = (1980 bytes – 20 bytes) / 1 Mbps
• = 1960 bytes / 1 Mbps
• = (1960 x 8 bits) / (106 bits per sec)
• = 15680 μsec
• = 15.680 msec
Problem-05:The values of parameters for the stop and wait ARQ protocol are as given below-
Bit rate of the transmission channel = 1 Mbps
Propagation delay from sender to receiver = 0.75 ms
Time to process a frame = 0.25 ms
Number of bytes in the information frame = 1980
Number of bytes in the acknowledge frame = 20
Number of overhead bytes in the information frame = 20
Assume that there are no transmission errors. Then the transmission efficiency (in %) of the stop and
wait ARQ protocol for the above parameters is ___________ . (correct to 2 decimal places)
Calculating Total Time-
Total time
= Transmission delay of data frame + Propagation delay of data
frame + Processing delay of data frame + Transmission delay of
acknowledgement + Propagation delay of acknowledgement
= (1980 bytes / 1 Mbps) + 0.75 msec + 0.25 msec + (20 bytes / 1
Mbps) + 0.75 msec
= 15.840 msec + 0.75 msec + 0.25 msec + 0.160 msec + 0.75 msec
= 17.75 msec
Problem-05:The values of parameters for the stop and wait ARQ protocol are as given below-
Bit rate of the transmission channel = 1 Mbps
Propagation delay from sender to receiver = 0.75 ms
Time to process a frame = 0.25 ms
Number of bytes in the information frame = 1980
Number of bytes in the acknowledge frame = 20
Number of overhead bytes in the information frame = 20
Assume that there are no transmission errors. Then the transmission efficiency (in %) of the stop and
wait ARQ protocol for the above parameters is ___________ . (correct to 2 decimal places)
Calculating Efficiency-
Efficiency (η)
= Useful time / Total time
= 15.680 msec / 17.75 msec
= 0.8833
= 88.33%
Problem-06: 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
Problem-06: 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.
• 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
Problem-07: 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.