Flow control (data): Difference between revisions

Content deleted Content added
m Undo accidental edit/vandalism: revision 1001008533 by 61.90.29.191 (talk)
m lc per MOS:CAPSACRS and other common nouns, wikiformatting
Line 35:
Stop and wait can also create inefficiencies when sending longer transmissions.<ref name=ak2 /> When longer transmissions are sent there is more likely chance for error in this protocol. If the messages are short the errors are more likely to be detected early. More inefficiency is created when single messages are broken into separate frames because it makes the transmission longer.<ref name=lwilliam />
 
== Sliding Windowwindow ==
{{Main | Sliding Windowwindow Protocolprotocol}}
 
A method of flow control in which a receiver gives a transmitter permission to transmit data until a window is full. When the window is full, the transmitter must stop transmitting until the receiver advertises a larger window.<ref name="Sliding Window" />
Line 46:
Sliding window flow control is a point to point protocol assuming that no other entity tries to communicate until the current data transfer is complete. The window maintained by the sender indicates which frames it can send. The sender sends all the frames in the window and waits for an acknowledgement (as opposed to acknowledging after every frame). The sender then shifts the window to the corresponding sequence number, thus indicating that frames within the window starting from the current sequence number can be sent.
 
=== Go Backback N ===
{{Main | Go-Back-N ARQ}}
 
An automatic repeat request (ARQ) algorithm, used for error correction, in which a negative acknowledgement (NAK) causes retransmission of the word in error as well as the next N–1 words. The value of N is usually chosen such that the time taken to transmit the N words is less than the round trip delay from transmitter to receiver and back again. Therefore, a buffer is not needed at the receiver.
 
The normalized propagation delay (a) = {{frac|propagation time (Tp)|transmission time (Tt)}}, where Tp = Lengthlength (L) over propagation velocity (V) and Tt = bitrate (r) over Framerateframerate (F). So that a ={{frac|LF|Vr}}.
 
To get the utilization you must define a window size (N). If N is greater than or equal to 2a + 1 then the utilization is 1 (full utilization) for the transmission channel. If it is less than 2a + 1 then the equation {{frac|N|1+2a}} must be used to compute utilization.<ref name="Go Back N" />
 
=== Selective Repeatrepeat ===
{{Main | Selective Repeat ARQ}}
 
''Selective Repeatrepeat'' is a connection oriented protocol in which both transmitter and receiver have a window of sequence numbers. The protocol has a maximum number of messages that can be sent without acknowledgement. If this window becomes full, the protocol is blocked until an acknowledgement is received for the earliest outstanding message. At this point the transmitter is clear to send more messages.<ref name="Selective Repeat" />
The protocol has a maximum number of messages that can be sent without acknowledgement. If this window becomes full, the protocol is blocked until an acknowledgement is received for the earliest outstanding message. At this point the transmitter is clear to send more messages.<ref name="Selective Repeat" />
 
== Comparison ==
This section is geared towards the idea of comparing [[Stop-and-wait ARQ|Stop''stop-and-wait'']], [[sliding window|Sliding''sliding Windowwindow'']] with the subsets of [[Go-Back-N ARQ|Go''go Backback N'']] and [[Selective Repeat ARQ|Selective''selective Repeatrepeat'']].
 
=== Stop-and-Waitwait ===
Error free: <math>\frac{1}{2a + 1}</math>.{{citation needed|date=August 2016}}
 
With errors: <math>\frac{1-P}{2a + 1}</math>.{{citation needed|date=August 2016}}
 
===Selective Repeatrepeat ===
 
We define throughput T as the average number of blocks communicated per transmitted block. It is more convenient to calculate the average number of transmissions necessary to communicate a block, a quantity we denote by 0, and then to determine T from the equation <math>T = \frac{1}{b}</math>.{{citation needed|date=August 2016}}
Line 88 ⟶ 87:
=== Hardware flow control ===
In common RS-232 there are pairs of control lines which are usually referred to as ''hardware flow control'':
* RTS (Requestrequest Toto Sendsend) and CTS (Clearclear Toto Sendsend), used in [[RS-232 RTS/CTS|RTS flow control]]
* DTR ([[Data Terminal Ready|data terminal ready]]) and DSR ([[Data Set Ready|data set ready]]), DTR flow control
 
Hardware flow control is typically handled by the DTE or "master end", as it is first raising or asserting its line to command the other side:
Line 95 ⟶ 94:
* For PC-to-modem and similar links, in the case of DTR flow control, DTR/DSR are raised for the entire modem session (say a dialup internet call where DTR is raised to signal the modem to dial, and DSR is raised by the modem when the connection is complete), and RTS/CTS are raised for each block of data.
 
An example of hardware flow control is a [[Halfhalf-duplex]] radio modem to computer interface. In this case, the controlling software in the modem and computer may be written to give priority to incoming radio signals such that outgoing data from the computer is paused by lowering CTS if the modem detects a reception.
 
* Polarity:
** RS-232 level signals are inverted by the driver ICs, so line polarity is TxD-, RxD-, CTS+, RTS+ (Clearclear to send when HI, Datadata 1 is a LO)
** for microprocessor pins the signals are TxD+, RxD+, CTS-, RTS- (Clearclear to send when LO, Datadata 1 is a HI)
 
=== Software flow control ===
Line 108 ⟶ 107:
The open-loop flow control mechanism is characterized by having no feedback between the receiver and the transmitter. This simple means of control is widely used. The allocation of resources must be a "prior reservation" or "hop-to-hop" type.
 
Open-loop flow control has inherent problems with maximizing the utilization of network resources. Resource allocation is made at connection setup using a CAC (Connection''connection Admissionadmission Controlcontrol'') and this allocation is made using information that is already "old news" during the lifetime of the connection. Often there is an over-allocation of resources and reserved but unused capacities are wasted. Open-loop flow control is used by [[Asynchronous Transfer Mode|ATM]] in its [[Constant Bit Rate|CBR]], [[Variable bitrate|VBR]] and [[Unspecified Bit Rate|UBR]] services (see [[traffic contract]] and [[congestion control]]).<ref name=ATM-Traffic-Management />
 
Open-loop flow control incorporates two controls; the controller and a regulator. The regulator is able to alter the input variable in response to the signal from the controller. An open-loop system has no feedback or feed forward mechanism, so the input and output signals are not directly related and there is increased traffic variability. There is also a lower arrival rate in such system and a higher loss rate. In an open control system, the controllers can operate the regulators at regular intervals, but there is no assurance that the output variable can be maintained at the desired level. While it may be cheaper to use this model, the open-loop model can be unstable.
 
== Closed-loop flow control ==
The closed-loop flow control mechanism is characterized by the ability of the network to report pending [[network congestion]] back to the transmitter. This information is then used by the transmitter in various ways to adapt its activity to existing network conditions. Closed-loop flow control is used by [[Available Bit Rate|ABR]] (see [[traffic contract]] and [[congestion control]]).<ref name=ATM-Traffic-Management /> Transmit flow control described above is a form of closed-loop flow control.
 
This system incorporates all the basic control elements, such as, the sensor, transmitter, controller and the regulator. The sensor is used to capture a process variable. The process variable is sent to a transmitter which translates the variable to the controller. The controller examines the information with respect to a desired value and initiates a correction action if required. The controller then communicates to the regulator what action is needed to ensure that the output variable value is matching the desired value. Therefore, there is a high degree of assurance that the output variable can be maintained at the desired level. The closed-loop control system can be a feedback or a feed forward system: