Alternating bit protocol: Difference between revisions

Content deleted Content added
m Typo/general fixing, replaced: vice-versa → vice versa using AWB
Channels must be FIFO
Tags: Mobile edit Mobile web edit
Line 1:
'''Alternating bit protocol''' (ABP) is a simple [[network protocol]] operating at the [[data link layer]] that retransmits lost or corrupted messages. It can be seen as a special case of the [[Sliding window protocol]] where a simple timer restricts the order of messages to ensure receivers send messages in turn while using a window of 1 bit.<ref>{{cite book|last=Tel|first=Gerard|title=Introduction to distributed algorithms|year=2000|publisher=Cambridge|isbn=0521794838|pages=85}}</ref>
 
[[Message]]s are sent from [[transmitter]] A to [[receiver (Information Theory)|receiver]] B. Assume that the [[channel (communications)|channel]] from A to B is a FIFO channel, is initialized, and that there are no messages in transit. Each message from A to B contains a data part and a one-bit sequence number, i.e., a value that is 0 or 1. B has two [[acknowledge character]]s that it can send to A through a second FIFO channel: ACK0 and ACK1.
 
When A sends a message, it resends it continuously, with the same sequence number, until it receives an acknowledgment from B that contains the same sequence number. When that happens, A [[Negation|complements]] (flips) the sequence number and starts transmitting the next message.