Professional Documents
Culture Documents
Maximum number of frames that sender can send without acknowledgement = Sender window size
We know,
Tt / (Tt + 2Tp) = 1
Tt = Tt + 2Tp
Thus,
We have-
Thus, to achieve 100% efficiency, window size of the sender must be 1+2a.
NOTE-
1. Receiver’s Ability-
Receiver’s ability to process the data bounds the sender window size.
If receiver cannot process the data fast, sender has to slow down and not transmit the frames too
fast.
2. Sequence Number Field-
Number of bits available in the sequence number field also bounds the sender window size.
If sequence number field contains n bits, then 2n sequence numbers are possible.
Thus, maximum number of frames that can be sent in one window = 2n.
For n bits in sequence number field, Sender Window Size = min (1+2a , 2n)
The features and working of this protocol are explained in the following points-
Point-01:
In Go back N,
Sender window size = N. Example in Go back 10, sender window size will be 10.
Receiver window size is always 1 for any value of N.
Point-02:
In Go back N,
A new acknowledgement timer does not start after the expiry of old acknowledgement timer.
It starts after a new frame is received.
Point-03:
The above point does not mean that Go back N can not use independent acknowledgements.
Go back N may use independent acknowledgements too if required.
The kind of acknowledgement used depends on the expiry of acknowledgement timer.
Example-
Consider after the expiry of acknowledgement timer, there is only one frame left to be
acknowledged.
Then, Go back N sends the independent acknowledgement for that frame.
Point-04:
Go back N does not accept the corrupted frames and silently discards them.
In Go back N,
If receiver receives a frame that is corrupted, then it silently discards that frame.
The correct frame is retransmitted by the sender after the time out timer expires.
Silently discarding a frame means-
(like not sending a NACK to the sender to send the correct frame)
Point-05:
Go back N does not accept out of order frames and silently discards them.
In Go back N,
If receiver receives a frame whose sequence number is not what the receiver expects, then it silently
discards that frame.
All the following frames are also discarded.
This is because receiver window size is 1 and therefore receiver can not accept out of order frames.
Point-06:
Go back N leads to retransmission of entire window if for any frame, no ACK is received by the
sender.
In Go back N,
Receiver silently discards the frame if it founds the frame to be either corrupted or out of order.
It does not send any acknowledgement for such frame.
It silently discards the following frames too.
Thus,
If for any particular frame, sender does not receive any acknowledgement, then it understands that
along with that frame, all the following frames must also have been discarded by the receiver.
So, sender has to retransmit all the following frames too along with that particular frame.
Thus, it leads to the retransmission of entire window.
That is why, the protocol has been named as “Go back N“.
Point-07:
Go back N leads to retransmission of lost frames after expiry of time out timer.
In Go back N,
Efficiency of Go back N-
Thus,
Efficiency of Go back N = N / (1 + 2a)
1. A 20 Kbps satellite link has a propagation delay of 400 ms. 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 ms
Frame size = 100 bytes
Go back N is used where N = 10
Calculating Transmission Delay-
a = Tp / T t
a = 10
Calculating Efficiency-
Efficiency (η)
= N / (1+2a)
= 10 / (1 + 2 x 10)
= 10 / 21
= 0.476
= 47.6 %
= Efficiency x Bandwidth
= 0.476 x 20 Kbps
Assume that processing delays at nodes are negligible. Find the minimum size in bits of the sequence
number field.
Solution-
Given-
Distance = 8000 km
Bandwidth = 500 x 106 bps
Propagation speed = 4 x 106 m/sec
Packet size = 107 bits
Now,
= 1 / 50 sec
= 0.02 sec
= Distance / Speed
= 2 sec
Calculating Value of ‘a’-
a = Tp / T t
a = 100
= 1 + 2a
= 1 + 2 x 100
= 201
= ⌈log2(201)⌉
= ⌈7.65⌉
=8
The features and working of this protocol are explained in the following points-
Point-01:
In SR protocol,
In SR protocol,
Point-03:
SR protocol does not accept the corrupted frames but does not silently discard them.
In SR protocol,
If receiver receives a frame that is corrupted, then it does not silently discard that frame.
Receiver handles the situation efficiently by sending a negative acknowledgement (NACK).
Negative acknowledgement allows early retransmission of the corrupted frame.
It also avoids waiting for the time out timer to expire at the sender side to retransmit the frame.
Point-04:
In SR protocol,
Consider receiver receives a frame whose sequence number is not what the receiver expects.
Then, it does not discard that frame rather accepts it and keeps it in its window.
Point-05:
In SR protocol,
In SR protocol,
Point-07:
SR protocol leads to retransmission of lost frames after expiry of time out timer.
In SR protocol,
Consider a frame being sent to the receiver is lost on the way.
Then, it is retransmitted only after time out timer expires for that frame at sender’s side.
Efficiency of SR Protocol-
1. What is the maximum window size for data transmission using the selective repeat protocol with n bit
frame sequence numbers is used?
Solution-
We know-
So, we have-
2n = W + W
2n = 2W
W = 2n-1
2. Consider a 128 x 103 bits/sec satellite 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. Find the minimum number of bits required for the sequence
number field to achieve 100% utilization.
Solution-
Given-
Now,
= 64 msec
a = Tp / T t
= 1 + 2a
= 1 + 2 x 2.34
= ⌈5.68⌉
=6
In SR Protocol, sender window size and receiver window size are same.
Now,
For any sliding window protocol, minimum number of sequence numbers required
= Sender window size + Receiver window size
=6+6
= 12
= ⌈log2 (12) ⌉
=4
Thus,
Go back N and
Selective Repeat
gives better
Efficiency 1 / (1+2a) N / (1+2a) N / (1+2a)
efficiency than
Stop and Wait
ARQ.
Buffer requirement
in Selective Repeat
Sender Window Size = Sender Window Sender Window is very large.
1 Size = N Size = N
Window Size If the system does
Receiver Window Size Receiver Window Receiver Window not have lots of
=1 Size = 1 Size = N memory, then it is
better to choose
Go back N.
Selective Repeat
Minimum number requires large
of sequence 2 N+1 2xN number of bits in
numbers required sequence number
field.
Selective Repeat is
Retransmissions Only the lost far better than Go
Only the lost packet is The entire window
required if a packet packet is back N in terms of
retransmitted is retransmitted
is lost retransmitted retransmissions
required.
Bandwidth
requirement is Selective Repeat is
high because even Bandwidth better than Go
Bandwidth Bandwidth
if a single packet is requirement is back N in terms of
Requirement requirement is Low
lost, entire window moderate bandwidth
has to be requirement.
retransmitted.
Thus, if error rate
is high, it wastes a
lot of bandwidth.
High due to
Go back N is better
searching and
than Selective
CPU usage Low Moderate sorting required
Repeat in terms of
at sender and
CPU usage.
receiver side
Go back N is better
Complex as it
than Selective
Level of difficulty in requires extra
Low Moderate Repeat in terms of
Implementation logic and sorting
implementation
and searching
difficulty.
Sending
cumulative
Uses cumulative
acknowledgements
acknowledgements
Uses independent Uses independent reduces the traffic
(but may use
Acknowledgements acknowledgement for acknowledgement in the network but
independent
each packet for each packet if it is lost, then the
acknowledgements
ACKs for all the
as well)
corresponding
packets are lost.
Go back N and
Type of Selective Repeat
Half duplex Full duplex Full duplex
Transmission are better in terms
of channel usage.
Conclusions-
Important Notes-
Note-01:
Protocols at data link layer like HDLC (Low level protocols) use Go back N.
This is because-
1. Bandwidth is high
2. CPU is very busy doing routing job
3. Error rate is low since out of order packets are not possible in wired medium
Note-02:
Protocols at transport layer like TCP (High level protocols) use selective repeat.