Flow control (data)

With Flow Control ( engl. data flow control) are different processes, denoted by which the data transmission terminal equipment to a data network that are not in sync, is controlled so that a continuous data transmission as possible can be done without loss.

If a fast channel cooperates with a slow receiver, the data transmission must be interrupted from time to time. The recipient would otherwise be overloaded with data that it could not handle. The control of these interruptions is the task of data flow control.

To control the flow of data, there are various methods.

  • Hardware method for transmitting control information via lines, which are also fed to the data lines in the connector.
  • Software process add control information into the data stream, so that no additional cables are needed.

Usually not just a method for data flow control, but several works simultaneously in a data transmission. For example, if a PC with an internet connection via a modem, works at the interface from the modem to the PC, a hardware method ( handshaking control lines ), with which the communication speed between them is controlled. However, the protocols of the Internet protocol suite at a higher level have more mechanisms to speed adaptation.

That usually work several methods at the same time, is that not only the data transfer rate between the transmitter and receiver to a data network needs to be regulated, but in each section for the whole transmission in the network. And the data network and its components operate at a certain speed, which may differ from the speed of the transmitter and receiver.

The hardware method for data flow control are attributable to the physical layer in the OSI model. Software process, it is also well to the next higher layers.

  • 2.2.1 application
  • 2.2.2 problems

Flow control at the protocol level

This flow control is a function in a network protocol. It is usually located in a protocol stack between two layers ( OSI model ), or between two equal layers ( peer entities ) on receiver and transmitter side.

These algorithms use a type of feedback: the receiver signals the transmitter with a receipt, if this is to continue to send. For TCP doing a sliding-window protocol is employed. "Window " means that getting a whole " window " with the received data is acknowledged, "sliding " means that the window size by means of the dialogue control up or down can be controlled. The receiver is always on with how many bytes it is willing to receive. Thus, regulate the flow of data a TCP connection automatically and dynamically.

Other methods always ship only one package and send confirmation together with an authorization token (Stop - and-Wait protocols). HDLC uses the types of blocks RR (Receive Ready) and RNR (Receive Not Ready ) for flow control.

Flow control of peripheral devices

As peripheral here printers, modems, terminals, or similar devices are referred to.

Hardware flow control, hardware handshaking or hardware protocol

A hardware flow control is realized by appropriate signal level on the associated interface lines.

Parallel data transfer ( printing technology )

The Centronics interface often used in printers used three lines for flow control:

  • Strobe - indicates to the receiver that valid data is present (positive logic, such as ACK)
  • ACK - Acknowledge, confirming the data transfer through the printer
  • Busy - indicates the printer's readiness for data transfer to (negative logic)

A printer is much slower than the controlling terminal. By disabling the interface line busy, no further data can be sent, the data transfer stops short.

Serial data transfer

Generally

The information necessary for data transfer interface lines are described in the ITU- T Recommendation V.24, DIN 66020 or RS232. The lines are classified differently according to the standard. Here is the colloquial terms are used.

The normal sequence of data transfer without flow control runs in the following way:

  • The local terminal enables the interface DTR (data terminal ready ) towards its modems and waits for its response by DSR (data set ready ). This makes it ready for operation without the activation of the local transmitter, the receiver waits.
  • If the terminal wants to send, it sets the interface RTS (request to send) and waits for the Clear to Send CTS (Clear to send) the local modem. By switching on the transmitter detects the remote modem received signal level and reports it to his terminal by CD (Data channel received line signal detector, colloquially Carrier detected).

These logical processes are hardwired in a null-modem cable. A null modem connects two terminals with the same transmission speed.

There is a more defined interface: RFR ( Ready for receiving ). A double occupancy with RTS on pin 4 (9-pin: Pin 7) through space problems on the 25-pin plug required: either one can control the transmitter or the transmitter operates with a constant carrier signal and the receiver is controlled. Modems in the half-duplex mode can therefore not be controlled with RFR, since there the transmitter must be controlled absolutely.

Since both interfaces operate from the direction of the terminal, they are often equated. The ITU- T Recommendation V.43 but warns in the explicitly before: In many publications, circuit 133 ( Ready for receiving ) is, Incorrectly, referred by to as circuit 105 (request to send). These two interchange circuits are Significantly different respectivement In Their definitions and functions.

Standards with description of a serial data flow control

The following documents correctly distinguish between RTS and RFR:

  • The ITU -T Recommendation V.43 Data flow control (02 /98) describes various possibilities of data flow control. This Recommendation conforms to the ISO / IEC report 15294th
  • DIN 12900-1 laboratory data communication point-to -point connection with RS232 ( August 1998).
  • For more information about the official name see Related links
Data flow control by RFR / CTS ( often wrongly referred to as RTS / CTS)
  • This transmitter must have a transmit memory of at least 2000 bytes. If this memory is half full, it will switch the line CTS. The terminal should respond as soon as possible to interrupt the transmission of data until CTS is turned on again.
  • The terminal equipment switches from RFR, if it is not currently available to receive data. The transmitter is the receive data of the remote device on RXD not continue until RFR is active again.

Note: Although at least ten years, the RTS line in connection with newer duplex modems share important standards in a data flow control against RFR, is still described in manuals of simple modem RTS / CTS. For the users of these modems nothing changes, because the correct function is available.

Data flow control by DTR / DSR

This sequence is identical to the previous, only other interface circuits, it can be used. Particularly modems, this mechanism can be used. Although he is not standardized, but common.

Flow control by other interface lines

Rarely used options are temporarily halving the transmission rate through the interface 111 or 112 or switching off the clock.

Software flow control, software handshaking, software protocol or X-ON/X-OFF

A software flow control is controlled by inserted in the data transmission characters.

In the ASCII character set (ITU -T Recommendation T.50 ) the first 32 characters are reserved for control tasks. Four of them, DC1 to DC4 (Device Control), are control character.

The software flow control should it use the following characters:

  • DC1 ( often referred to as X-ON, English for transmission ON, character coding 11hex or 17dez, PC keyboard. Ctrl -Q) and
  • DC3 ( often referred to as X -OFF, Eng for transmission OFF, character coding 13hex or 19dez, PC keyboard. Ctrl -S).

These characters are used both in the direction of terminal equipment to the transmission device and reversed.

In the data transmission with modems, there is often the possibility to make them available through configuration.

Application

The transmitter memory of the local modem almost filled, the XOFF control character is inserted in the reception data for its own terminal. Once this memory is sent to the remote site and therefore is empty again, the X-ON control character is inserted and thus unblock the terminal. The transmission line is thus protected against data loss.

Problems

When sending binary data, the two control characters may not appear in the data, otherwise the data transmission is interrupted. The signs need to be masked, for example, the fact that the entire data transfer is re-encoded, the data is sent as an ASCII value of hex digits. An often -used format years ago was the hex record from Intel. Thereby, the data volume to be transmitted but was doubled. Although the X-ON/X-OFF-Steuerzeichen not happen by recoding within the data being transferred, a transfer was often not possible. The X-Modem protocol includes, for example, a continuous block counter of 00hex to FFhex, so that regardless of the data to be transmitted each byte of data occurs.

The software flow control should be used only if there is no alternative.

220196
de