Professional Documents
Culture Documents
CPSC 441 Test 2 Review: Iterative Recursive
CPSC 441 Test 2 Review: Iterative Recursive
CPSC 441 Test 2 Review: Iterative Recursive
- First add all the bits, carry the leftmost bit to the right
and add it, then flip all the bits
- Not a very powerful error detection system
UDP Checksum
3.4 Principles of Reliable Data Transfer (RDT)
o Sender reads data into underlying channel - The problem with this is that the sender can send
duplicate messages if a successful message returns a
o Receiver reads data from underlying channel
corrupted ACK message.
- Reliable: No loss, no errors, no out-of-order, no
duplicates
- To fix duplicates, use a sequence number for each
message. The receiver ignores a message with the
same sequence number as the previous message. Only
need a single bit and flips between 0 and 1
Stop and Wait Protocol - Duplicate ACK at sender results in same action as
- Sender sends one packet, then waits for response. NAK (retransmission)
- Practical use and used in Wi-Fi.
Sender FSM for rdt2.1: Handles garbled ACK/NAKS rdt3.0: Channel with errors and losses
- New assumption: Underlying channel can also lose
entire packets (data or acknowledgements)
o Checksum, sequence #s, ACKs, may help but
aren’t enough on their own
- Approach: Sender waits a “reasonable” amount of time
for ACK
o Retransmits if no ACK is received.
o If the packet is delayed (not lost) the
retransmission will be a duplicate (handled by
sequence #)
Receiver FSM for rdt2.1:
o Requires a countdown timer.
o Only risk is a waste of bandwidth by sending
unnecessary duplicates.
Performance of rdt3.0
- Performance is awful but does everything correctly.
- Example: 1 Gbps link, 15 ms prop delay, 8000 bit
packet
rdt2.1 overview:
Sender:
- Sequence number added to packets. - Utilization: Percentage of time spent sending
- Two sequence numbers (0,1) will suffice. - Stop and Wait has horrible, horrible utilization.