再谈终端设备

这里写图片描述

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.
终端设备的显示和输入处理逻辑都在自身内完成,无需主机的参与,自身是一个完整的系统,通过串口与主机通信。

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

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

2.1 早期终端和计算机分离

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

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

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

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

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

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

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

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

当然,这与传统终端的概念非常相似了。

3 云计算时代,终端复活

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

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

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

云时代的“终端”和主机的通信协议仍然是可读文本,只不过编码更多的采用了UTF-8,协议规范叫做HTML,通信媒介则主要是互联网了。

4 终端发展给我们的启发

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

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

  • 传统的硬件终端设备已经消亡,但是终端的概念、功能、习惯几乎没有改变,仍然以各种”伪终端“的形式成为Unix系统的重要组成部分。理解终端的概念是理解Unix系统的基础,也是理解Unix哲学的一个优秀案例。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值