Technology Software

Text-Terminals on Linux

22.7Block Mode

Introduction to Block Mode


Block mode is seldom used with Linux and is mainly of historical interest. In block mode, when one types at a terminal the results are saved in the terminal memory and are not sent just yet to the host computer. Such terminals often have built-in editing capabilities. When the user presses certain keys (such as the send key) what has been saved in the terminal memory is sent to the host computer.


Now the Linux editors vi and emacs, must react instantly to typing certain keys so block mode isn't feasible. Such editors and other interactive programs can't permit the long delay in sending a keystroke to the computer which is inherent in block mode. So they can't use block mode.

The old IBM mainframe interface uses block mode (see IBM Terminals so many IBM terminals are block-mode only and also synchronous (see Section Synchronization & Synchronous).

Types of Block Modes, Forms


Block mode may itself have various sub-modes such as "page" (a page at a time) and "line" (a line at a time). Some terminals have both block transmission modes and conventional character modes and may be switched from one mode to another. Async terminals which have block modes include HP2622A, Wyse60, VT130, VT131, VT330, VT340, and Visual500. Many later model terminals can emulate block mode. But the Linux console can't. Block modes may include a forms capability where the host computer sends a form to the terminal.

Then the user fills it out and hits the send key which sends only the data in the form back to the host computer. The form itself (not the data) is displayed on the screen in protected fields which don't get transmitted to the host.

Efficiency


Block mode takes load off the host computer, especially if the host computer's hardware is designed for block modes (as IBM mainframes were). In character mode every character typed is sent immediately to the serial port and usually causes an interrupt at the host computer. The host that receives the byte must stop whatever it is doing and fetch that character from the port hardware. Even with UART's that have FIFO hardware buffers, the hardware timeout is normally only the transmission time of 3 bytes so that an interrupt is usually issued for every character typed.

In true block mode a long block of characters is received using only one interrupt. If block mode is used with conventional async FIFO serial ports, an interrupt is needed only every 14 bytes since they have 16-byte hardware buffers. Thus much of the load and overhead of interrupt handling is eliminated and the computer has more time to do other tasks when block mode is used.

A significant savings for block mode occurs if the terminal is connected to its host via a network. Without block mode, every character (byte) typed is sent in its own packet including all the overhead bytes (40 in a TCP/IP packet as used on the Internet). With block mode, a large number of characters are sent in a single packet.

Problems with block mode


While block mode is more efficient, it is nearly extinct, and for good reason. Faster and cheaper computers made the higher efficiency less important. For example, a 56k modem results in hundreds of interrupts per second (every 14 characters) while typing at a terminal only causes a few interrupts per second (one for each character typed). So the number of interrupts caused by typing at a terminal is not very significant (unless you have hundred of terminals connected to the same computer).

Another point is that the efficiency is not of much significance where the user doesn't type in very much. Editors are a primary example of where the user types in a lot. But if you use block mode for editing, you must then use the crude editor built into terminal. Modern editors like vim and emacs are much better but can't use block mode. Even in the days of mainframes with terminals, block mode wasn't used much except by IBM. A major reason was that software to utilize it was not widely available (except for IBM). The terminfo data base doesn't seem to include it and

* License

* Text Terminal How-To Index

Related posts "Technology : Software"

How to Capture Analog Audio on My Computer

Software

Effective Photoshop Training Course to Enhance Your Photos

Software

How To Use Softphone Software For Your Business

Software

How to Access a String Array in JSP

Software

How Do I Get a Reversible Reaction Arrow in Microsoft Word 2007?

Software

How to Get AVCHD (MTS) Files to My PC

Software

Beat Detective Region Conform Tips

Software

MS BKF Repair Tool to Fix Corruption Owing to FAT File System

Software

Making an ASM Comparison

Software

Leave a Comment