- Software flow control
Software flow control is a method of
flow controlused in computer data links, especially RS-232 serial. It uses special codes, transmitted in-band, over the primary communications channel. These codes are generally called XOFF and XON (from "transmit off" and "on", respectively). Thus, "software flow control" is sometimes called "XON/XOFF flow control". This is in contrast to flow control via dedicated out-of-bandsignals — "hardware flow control" — such as RTS/CTS.
For systems using the
ASCIIcharacter code, XOFF is generally represented using a character or bytewith value 19; XON with value 17.
The ASCII standard does not specify any
control characters for use as XON/XOFF specifically. However, it does provide four generic "device control" characters (DC1 through DC4). The seminal ASR-33 Teletypeadopted two of these, DC3 and DC1, for use as XOFF and XON, respectively. This usage was copied by others, and is now a de facto standard. The keyboard equivalents of CTRL+S for XOFF, and CTRL+Q for XON, also derive from this usage.
When one end of a data link is unable to accept any more data (or approaching that point), it sends XOFF to the other end. The other end receives the XOFF code, and suspends transmission. Once the first end is ready to accept data again, it sends XON, and the other end resumes transmission.
For example, imagine a
computerconnected to a slow printer. The computer starts sending data to the printer. Since the computer is faster than the printer, the printer falls behind, and starts to be overwhelmed by the data. The printer thus sends XOFF to the computer. The software on the computer "sees" the XOFF, and temporarily stops sending data. Once the printer has "caught up", it sends XON to the computer. The computer sees XON, and starts sending data again.
XOFF/XON can be employed in both directions -- for example, two
teleprinters connected to each other.
Comparison with hardware flow control
The principal advantage of software flow control is the reduction in the number of
electrical conductors between sender and receiver. Given a common ground, only two signals are needed, one to send and the other to receive. Hardware flow control requires additional wires between the two devices. It also requires specific hardware implementation, which had more significant costs in earlier days of computing (i.e., 1960s and 70s).
However, software flow control is not without its problems. Sending XOFF requires at least one character time to transmit, and may be queued behind already-transmitted data still in buffers. Hardware signals may be asserted almost instantaneously, and out-of-order.
As the name "software flow control" implies, flow control using this method is usually implemented in software (or at least a higher level of
firmware), which can cause further delays in XOFF response. Hardware flow control is typically under the direct control of the transmitting UART, which is able to cease transmission immediately, without the intervention of higher levels.
Finally, since the XOFF/XON codes are sent in-band, they cannot appear in the data being transmitted without being mistaken for flow control commands. Any data containing the XOFF/XON codes thus must be encoded in some manner for proper transmission, with corresponding overhead. This is frequently done with some kind of
Software flow control is used extensively by low-speed devices, especially older printers and
dumb terminals, to indicate they are temporarily unable to accept more data. Typically, this is due to a combination of limited outputrate and any buffers being full. Some terminal control packages, such as termcap, employ "padding" to allow such equipment sufficient time to perform the requested actions without the need to assert XOFF.
XOFF/XON are still sometimes used manually by computer operators, to pause and restart output which otherwise would scroll off the display too quickly.
Terminal emulatorsoftware generally implements XOFF/XON support as a basic function. This generally includes the system consoleon modern Unixand Linuxmachines, as well as GUI emulators such as xtermand the Win32 console.
* [http://docs.hp.com/en/32022-90051/ch09s08.html How to control the flow of data: The XON/XOFF protocol] . In: Configuring Systems for Terminals, Printers, and Other Serial Devices: HP 3000 MPE/iX Computer Systems. Hewlett-Packard Company.
Wikimedia Foundation. 2010.
Look at other dictionaries:
Flow control — distinguish|control flowIn computer networking, flow control is the process of managing the rate of data transmission between two nodes to prevent a fast sender from over running a slow receiver. This should be distinguished from congestion… … Wikipedia
Flow Control — Mit Datenflusskontrolle (engl. data flow control) oder Datenflusssteuerung werden unterschiedliche Verfahren bezeichnet, mit denen die Datenübertragung von Endgeräten an einem Datennetz, die nicht synchron arbeiten, so gesteuert wird, dass eine… … Deutsch Wikipedia
flow control — 1. In communications, control of the rate at which information is exchanged between two computers over a transmission channel. Flow control is needed when one of the devices cannot receive the information at the same rate as it can be sent,… … Dictionary of networking
Control valves — are valves used to control conditions such as flow, pressure, temperature, and liquid level by fully or partially opening or closing in response to signals received from controllers that compare a setpoint to a process variable whose value is… … Wikipedia
Control flow — Not to be confused with Flow control. In computer science, control flow (or alternatively, flow of control) refers to the order in which the individual statements, instructions, or function calls of an imperative or a declarative program are… … Wikipedia
Software-Protokoll — Mit Datenflusskontrolle (engl. data flow control) oder Datenflusssteuerung werden unterschiedliche Verfahren bezeichnet, mit denen die Datenübertragung von Endgeräten an einem Datennetz, die nicht synchron arbeiten, so gesteuert wird, dass eine… … Deutsch Wikipedia
Control character — In computing and telecommunication, a control character or non printing character is a code point (a number) in a character set, that does not in itself represent a written symbol. It is in band signaling in the context of character encoding. All … Wikipedia
Flow (psychology) — Flow is the mental state of operation in which the person is fully immersed in what he or she is doing by a feeling of energized focus, full involvement, and success in the process of the activity. Proposed by positive psychologist Mihály… … Wikipedia
Control logic — is a key part of a software program that controls the operations of the program. The control logic responds to commands from the user, and it also acts on its own to perform automated tasks that have been structured into the program.  Model of … Wikipedia
CONTROL-M — is batch scheduling software produced by BMC Software, originally written for mainframes but also available for distributed computing platforms including Unix, Windows, Linux and OpenVMS environments. BMC Software claims that CONTROL M is the… … Wikipedia