Error Correction and Flow Control Martin Weiss Objectives
Error Correction and Flow Control Martin Weiss
Objectives of this Meeting u Describe different flow control techniques u Describe the major error detection techniques 2
Review of the Last Meeting u Error detection u Forward error correction 3
Error Correction u. Automatic Response Request (ARQ) u. Forward error correction 4
Types of ARQ u Stop-and-Wait (Idle RQ) u Sliding Window (Continuous RQ) 5
Stop and Wait 1 2 Data 0 0 ACK 3 4 5 6 7 Data 1 1 NAC K Data 1 1 ACK Data 0 6
Stop and Wait (Long Channel) Data 0 1 2 0 ACK 3 4 Data 1 1 ACK Increasing bit rate D 0 1 2 0 A 3 4 D 1 1 A 7
Performance of Stop and Wait t=0 t=tp t=tt+tp t= x+tt+tp t= x+ta+tt+2 tp 8
Performance of Stop and Wait u Error free (assume ta << tt and x=0) 9
Error Calculations u How many frames are transmitted for a frame to be properly received? – This is a probability distribution – Assuming independence of errors, – The mean of this is a geometric dist. 10
Error Calculations u. P is the probability of frame error u This can be estimated using: – p is the bit error rate – k is the number of bits per frame u Using burst error rate is more accurate u You can assume that the burst error 11 rate = 1/3 bit error rate
Stop and Wait with Errors u The error-free throughput is u Since it takes an average of NT frames to get an error free one, we can compute: 12
Sliding Window u Transmitter may transmit several messages before awaiting response u The number of unacknowledged messages permitted is the Window Size 13
Sliding Window (n>3) 0 Data 0 1 Data 1 2 Data 2 3 0 ACK 2 14
Sliding Window (Go-Back-N) 4 Data 4 5 Data 5 6 Data 6 7 8 1 NACK 4 Data 4 9 Data 5 10 Data 6 15
Performance of Sliding Window Protocols u Error-free Repeat) (Go-Back-N and Selective 16
Selective Repeat with Errors u If N is large enough, only the errored frames are retransmitted (occurring at a rate of (1 -P) u Thus, the utilization becomes 17
Go-Back-N with Errors u The is number of retransmitted frames – When – Notice that when » N>(2 a+1) then » N<(2 a+1) then K=N 18
Go-Back-N with Errors u For N>2 a+1 u For N<2 a+1 u Substituting obtain: and simplifying, we 19
Performance Issues 1. 0 U 0. 8 Stop and Wait 0. 6 Sliding Window (N=7) P=10 -3 0. 4 0. 2 0 0. 1 1 10 1000 a 20
Comparing Sliding Window Approaches u Selective Reject u Go-Back-N 21
Types of Protocols u. Byte-oriented protocols u. Bit-oriented protocols 22
Protocol Environments u. End-to-End u. Local 23
Structure of Byte-Oriented Protocols Sample Structure SYN SYN SOH Header STX Message. EOT SYN = Synchronization SOH = Start of Header STX = Start of Text EOT = End of Text 24
Structure of Bit-Oriented Protocols Sample Frame Structure Preamble Flag Header Message Trailer Flag Preamble: Used for Bit Synchronization Flag: Identifies Start and End of Message Trailer: Error Checking 25
Bit Stuffing u Example Transmission Direction 0100101111010101101110000010111110010101111110 Original Bit Stream Locations for Stuff Bits 010010111101010110111000001011111000101011111010 Transmitted Bit Stream 26
Design of Transmitter and Receiver Application Network Software Bit Stuffing Application Control Flag Insertion Transmitter Control Network Software Flag Detection Bit Destuffing Receiver 27
- Slides: 27