Professional Documents
Culture Documents
UNIT I Error Correction Method - Extra
UNIT I Error Correction Method - Extra
UNIT I Error Correction Method - Extra
Also, it is important to know the locations of the r bits in the m bits data. The r bits are placed in position
1,2,4,8, (power of 2). Suppose if m =7, then r must be 4 bits and total number of bits becomes
11(m+r), in which the r bits are placed in the locations 1, 2, 4, and 8 as shown below
0001 0011 0101 0111 1001 1011 least significant bit must be 1 from the given data set:
r1:
1,3,5,7,9,11 locations
0010 0011 0110 0111 1010 1011 second least significant bit must be 1 from the given data set:
r2:
2, 3,6,7,10,11 locations
0100 0101 0110
r4:
1000 1001 1010
r8:
0111 Third least significant bit must be 1 from the given data set:
4,5,6,7 locations
1011 Fourth least significant bit must be 1 from the given data set:
8, 9, 10, 11 locations
Calculating r values
1. We place r bits in its appropriate location in the m+r length data unit.
2. We calculate the even parities for the various bit combinations
For example,
An acknowledgment (ACK for short) is a small control frame that a protocol sends back to its
peer saying that it has received an earlier frame. By control frame we mean a header without any
data.
If the sender does not receive an acknowledgment after a reasonable amount of time, then it
retransmits the original frame. This action of waiting a reasonable amount of time is called a
timeout.
Piggybacking: To improve the use of network bandwidth, an acknowledgment method known as
piggybacking is often used. In piggybacking, instead of sending a separate acknowledgment frame, the
receiver waits until it has data frame to send to the sender and embeds the acknowledgment in that data
frame.
Thus the link bandwidth can be utilized better also it increases the speed of data transmission.
Propagation delay is defined as the delay between transmission and receipt of packets between hosts.
Propagation delay can be used to estimate timeout period
The general strategy of using acknowledgments and timeouts to implement reliable delivery is sometimes
called automatic repeat request (ARQ).
There are four different ARQ algorithms:
Stop-and-Wait ARQ
Sliding Window ARQ
Go back N ARQ
Selective Repeat ARQ
Sender doesnt send next frame until hes sure receiver has last packet
The data frame/Ack. Frame sequence enables reliability. They are sequenced alternatively 0 and
1
Sequence numbers help avoid problem of duplicate frames
If the sender does not receive an acknowledgment after a reasonable amount of time, then it
retransmits the original frame
The sender also starts retransmission when the timeout occurs.
a) Normal operation b) The Original frame is lost c) The ACK is lost d) Timeout occurs
Disadvantage
The link capacity can not be utilized effectively since only one data frame or ACK frame can e
sent at a time
2.
LAR denotes the sequence number of the last acknowledgment received; and
LFS denotes the sequence number of the last frame sent.
When an acknowledgment arrives, the sender moves LAR to the right, thereby allowing
the sender to transmit another frame.
The sender associates a timer with each frame it transmits, and it retransmits the frame
should the timer expire before an ACK is received.
4.
5.
6.
7.
if SeqNum<=LFR or SeqNum > LFA, then the correspong SeqNum frame is discarded
This situation is illustrated in below figure
Operation:
The sender window denotes the frames that have been transmitted but remain unacknowledged.
This window can vary in size, from empty to the entire range.
The receiver window size is fixed. A receiver window size of 1 means that frames must be received in
transmission order. Larger window sizes allow the receiver to receive as many frames out of order.
When a frame with sequence number SeqNum arrives, the receiver takes the following action.
a.
b.
c.
RWS = 1, implies that the receiver will not buffer any frames that arrive out of order
RWS = SWS implies that the receiver can buffer any of the frames the sender transmits.
It is no sense to set RWS > SWS since its impossible for more than SWS frames to arrive out of order.
Advantages
Reliable transmission: The algorithm can be used to reliably deliver messages across an
unreliable network
Frame Order: The sliding window algorithm can serve is to preserve the order in which frames
are transmitted. Since each frame has a sequence number.
Flow control: The receiver not only acknowledges frames it has received, but also informs the
sender of how many frames it has room to receive
The link capacity can be utilized effectively since multiple frames can be transmitted at a time
The advantage of Selective Reject over Go-Back-N is that it leads to better throughput, because
only the erroneous frames are retransmitted.
Go-Back-N has the advantage of being simpler to implement and requiring less memory.