程序员人生 网站导航

再谈终端设备

栏目:框架设计时间:2016-06-03 19:18:57

这里写图片描述

1 PC的键盘和显示器不是终端装备

While early IBM PCs had single color green screens, these screens were not terminals. The screen of a PC did not contain any character generation hardware; all video signals and video formatting were generated by the video display card in the PC, or (in most graphics modes) by the CPU and software. An IBM PC monitor, whether it was the green monochrome display or the 16-color display, was technically much more similar to an analog TV set (without a tuner) than to a terminal. With suitable software a PC could, however, emulate a terminal, and in that capacity it could be connected to a mainframe or minicomputer. The Data General One could be booted into terminal emulator mode from its ROM. Eventually microprocessor-based personal computers greatly reduced the market demand for conventional terminals.

In the 1990s especially, “thin clients” and X terminals have combined economical local processing power with central, shared computer facilities to retain some of the advantages of terminals over personal computers:

Today, most PC telnet clients provide emulation of the most common terminal, the DEC VT100, using the ANSI escape code standard X3.64, or could run as X terminals using software such as Cygwin/X under Microsoft Windows or X.Org Server software under Linux.

Since the advent and subsequent popularization of the personal computer, few genuine hardware terminals are used to interface with computers today. Using the monitor and keyboard, modern operating systems like Linux and the BSD derivatives feature virtual consoles, which are mostly independent from the hardware used.

When using a graphical user interface (or GUI) like the X Window System, one’s display is typically occupied by a collection of windows associated with various applications, rather than a single stream of text associated with a single process. In this case, one may use a terminal emulator application within the windowing environment. This arrangement permits terminal-like interaction with the computer (for running a command line interpreter, for example) without the need for a physical terminal device; it can even allow the running of multiple terminal emulators on the same device.
终端装备的显示和输入处理逻辑都在本身内完成,无需主机的参与,本身是1个完全的系统,通过串口与主机通讯。

而PC上的键盘和显示器都需要主机本身来驱动,不能脱离主机而单独发挥作用。

2 显示控制和计算机的悲欢离合

2.1 初期终端和计算机分离

在计算机发展的初期,计算机主要用来计算,供大多数人来使用。因而,终端被发明出来,通过串口可以远程连接到主机,然后对主机进行操控。

2.2 PC把计算机和终端结合在1起

后来到了PC时期,计算机和终端进行了密切结合,计算机除本来的计算任务外,还完全驱动着直接连接的键盘和显示器,终真个概念不再存在。

其中PC的直接控制键盘和显示器的功能,非常切合原来终真个概念。事实上,使用PC完全可以摹拟原来的硬件终端装备,而且现在这类摹拟已完全取代了原来的硬件终端装备。

PC除控制显示器和键盘鼠标以外的其他计算能力,则相当于原来的“计算机”。

2.3 终端又出现在了工控计算机领域

其实不是所有计算机都像PC1样把显示控制作为主要功能,例如工业控制领域的计算机,主要功能就是完成各种工业装备的控制而不是显现多么美好的人机界面。所以界面交互部份完全可以独立出来,成为“终端”。
这里写图片描述

这类通过串口就能够控制的带触摸功能的控制屏非常流行。

固然,这与传统终真个概念非常类似了。

3 云计算时期,终端复活

随着云计算的普及,大量的运算又开始从PC转向数据中心里的服务器上。PC上仅仅运行像阅读器这样的终端软件,真实的计算是在远程的计算机上完成的。

这在概念上就相当于,每一个PC都是1台终端,连接到了“云”上的计算机。
终端和计算机又1次进行了分离。

传统终端和主机直接的通讯协议主要是ANSIC编码的文本,所以也叫“文本终端(Text Termainal)或ANSI终端”,通讯的媒介主要是串口。

云时期的“终端”和主机的通讯协议依然是可读文本,只不过编码更多的采取了UTF⑻,协议规范叫做HTML,通讯媒介则主要是互联网了。

4 终端发展给我们的启发

  • 计算机各部份功能,分久必合,合久必分,终究“分”会成功!“分离”代表着模块化,代表着规范,代表着合作。只有分离,才能带来更多企业的合作,才能带来专注。

  • 通讯协议文本化是绝对的王者,2进制没法望其项背。1个人机皆可读的、与软硬件平台无关(想一想大小真个字节序问题和各种数据类型的2进制不统1情况吧)的文本化协议绝对胜过单纯的2进制流。文本化是Unix编程哲学的重要组成部份。从Unix的配置文件、日志文件到终真个通讯协议,再到云时期html,xml,json,文本始闪烁着耀眼的光芒!

  • 传统的硬件终端装备已灭亡,但是终真个概念、功能、习惯几近没有改变,依然以各种”伪终端“的情势成为Unix系统的重要组成部份。理解终真个概念是理解Unix系统的基础,也是理解Unix哲学的1个优秀案例。

------分隔线----------------------------
------分隔线----------------------------

最新技术推荐