,.
Multiprogramming, which was developed to improve performance, also allows time sharing. 多道程序设计被开发来提高性能,也允许分时。
Time-shared operating systems allow many users (from one to several hundred) to use a computer system interactive at the same time. 分时操作系统允许多个用户(从一个到几百个)同时交互式地使用计算机系统。As the system switches rapidly from one user to the next, each user is given the impression that he has his own computer. 由于系统迅速地从一个用户切换到下一个用户,每一个用户被给予一种他拥有自己的计算机的印象。Other operating systems types include real-time systems and multiprocessor systems. 其他操作系统类型包括实时系统和多处理机系统。
A real-time system is often used as control de-vice in a dedicated application. 实时系统通常被用作专用的应用的控制设备。
Sensors bring data to the computer. 传感器把数据带给计算机。
The computer must analyze the data and possibly adjust controls to modify the sensor inputs. 计算机必须分析数据,也可能调整控制去修改传感器的输入。 Systems, which control scientific experiments, medical computer systems, industrial control systems, and some display systems are real-time systems. 控制科学的实验,医学的计算机系统,工业的控制系统和一些显示系统等系统都是实时系统。
A real-time operating system has well-defined fixed time constraints.实时操作系统有定义明确的固定的时间约束。
Processing must be done within the defined constraints, or the system will fail. 处理必须在定义的约束中完成,否则系统将失败。
A multiprocessor system has more than one CPU. 多处理机系统有不只一个CPU。
The obvious advantages would appear to be greater computing power and reliability. 显著的优势好像是强大的计算能力和可靠性。 There are various types of operating systems for multiprocessors and multicomputers. 有各种各样的操作系统用于多处理机和多计算机。
It is more or less possible to distinguish two kinds of operating systems for multiple CPU systems: Loosely coupled, such as network operating system and distributed o/s, and tightly coupled, such as parallel o/s. 这或多或少可能区分两种多CPU系统的操作系统:松耦合,例如网络操作系统和分布式操作系统,和紧耦合,如并行操作系统。
As we shall see, loosely and tightly-coupled s/w is rought analogous to loosely and tight-coupled h/w. 我们应该看到,松紧耦合软件大概类似于松紧耦合硬件。
The operating system must ensure correct operation of the computer system. 操作系统必须确保改正计算机系统的操作。
To prevent user programs from interfering with the proper operation of the system, the h/w was modified to create two modes: user mode and monitor mode[4]. 为了阻止用户程序干扰系统适当的操作,硬件被修改成两种模式:用户模式和监控模式。
Various instructions(such as I/O instructions and halt instructions) are priviledged and can only be executed in monitor mode. 许多指令(例如I/O指令和中断指令)是有特权的,只能在监控模式下被执行。
,.
The memory in which the monitor resides must also be protected from modification by the user. 监控程序所在的内存也必须保护起来以防用户修改。 A time prevents infinite loops. 定时器可以防止死循环。Once these changes (dual mode, privileged instructions, memory protection, timer interrupt) have been made to the basic computer architecture, it is possible to write a correct operating system. 一旦这些对基本计算机体系结构的改变(双模,权限指令,内存保护,定时器中断)被做到,这可能写成一个改进的操作系统。
4.2 窗口管理程序
窗口管理程序管理那些用来交换应用程序和用户之间信息的设备。输出设备包括视频显示器和声音合成器。输入设备包括键盘和指点器,诸如鼠标、操纵杆、控制球、或光笔。窗口管理程序与输出设备的设备驱动程序交互把信息呈现给用户,与输入设备的设备驱动程序交互获取表示用户正在输入信息的消息。应用程序和脚本执行引擎把表示成位图或PostSript表示法的图像传给窗口管理程序,窗口管理程序把这些图像呈现给用户。窗口管理程序把用户通过输入设备输入的消息返回给应用程序和脚本执行引擎。
窗口管理程序已十分普及,因为它们支持许多对终端用户和应用程序开发者两者都十分有用的特性。
用户与多个进程交互。窗口管理程序把窗口分配给每个进程。如果每个进程与一个显示在显示屏上的窗口相关,那么多个进程可以共享一个视频显示屏。用户通过观看分配给进程的窗口之内容和向其窗口处于激活状态的进程发命令来观察进展 (即执行情况)和控制各进程。
用户容易在应用程序之间移动信息。 窗口给用户提供了一种在应用程序之间传送信息的方法。图4-1举例说明了一个有3个窗口的显示屏。一个窗口分配给正文编辑程序,另一个分配给电子表格程序,而第三个窗口分配给数据库程序。在这个例子中,用户首先用数据库应用程序从数据库检索某些数据。然后用户从检索得到的数据中选择某些,并把这些数据移到第二个窗口中的电子表格程序。电子表格应用程序计算合计和总计信息,然后用户把计算结果移到分配给正文编辑程序的窗口。用户使用正文编辑程序把总计信息集成到正在用正文编辑程序准备的报告中。
用户访问远程应用程序。一些窗口管理程序能够通过通信系统把一个窗口分配给运行在远程计算机上的一个进程。例如,工作站的用户希望访问某台大型机上的数据库。该用户请求窗口管理程序创建一窗口,在该窗口中用户可以输入对那台大型机上的数据库管理系统的请求。在该请求被处理后,窗口管理程序在该窗口中显示从数据库管理系统来的结果。
用户对一个进程有多个视图。一些窗口管理程序可以把几个窗口分配给一个应用程序:每个窗口把该应用的某个方面显示给用户。多个窗口对用户可能是有用的,可提供该应用程序的多方面视图。例如,在图4-2中,两个窗口已分配给一个计划系统。一个窗口显示一图形,展示在一个项目的各任务之间的优先关系。另一窗口显示了每个任务完成的百分比。
用户接收事件。当一个进程发现用户应该知道的某些非正常事件,该进程通知窗口管理程序显示一个描述该事件的消息。用户将注意到该消息的出现,并采取适当的动作。
用窗口管理程序可以构造复杂的用户接口。大多数窗口管理程序都有程序库,包含各种各样的、可重用的交互对象,这些对象可用来构造复杂的用户接口。 终端独立性。一些窗口管理程序工作在一大类终端和工作站上,并且对应用程序隐藏了这些终端和工作站之间的差别。终端独立性增加了应用程序对各种各样的终端和工作站的可移植性。
,.
6.2 Carrier Frequencies and Multiplexing
载波频率和多路复用
@ Computer networks that use a modulated carrier wave to transmit data are similar to television stations that use a modulated carrier wave to broadcast video. modulated 已调制的
使用调制载波发送数据的计算机网络和利用调制载波广播视频信息的电视台相类似。 The similarities provide the intuition needed to understand a fundamental principle:
similarity 相似性 intuition 直观
这一相似性给理解下述基本原理提供了启示:
Two or more signals that use different carrier frequencies can be transmitted over a single medium simultaneously without interference. signal 信号 simultaneously 同时地 interference 干扰
两个或多个使用不同载波频率的信号可以在单一介质上同时传输而互不干扰。
@ To understand the principle, consider how television transmission works.
为理解这一原理,考虑(有线)电视传输是如何工作的。
Each television station is assigned a channel number on which it broadcasts a signal. channel 频道
每个电视台都分配一个频道号,它在该频道上广播信号。
In fact, a channel number is merely shorthand for the frequency at which the station's carrier oscillates. shorthand 速记 oscillate 振荡
事实上,频道号就是电视台载波用的振荡频率的速记。 To receive a transmission, a television receiver must be tuned to the same frequency as the transmitter. tune to 调谐到
为接收一个频道传输,电视接收器必须调谐到与发送器相同的频率。
More important, a given city can contain many television stations that all broadcast on separate frequencies simultaneously.
更重要的是,一个城市可以有许多电视台,它们彼此在不同的频率上同时广播。 A receiver selects one to receive at any time. 一个接收器在任一时间选择接收其中一个。
@ Cable television illustrates that the principle applies to many signals traveling across a wire.
有线电视这一例子说明了以上原理应用于许多信号在一根导线上同时传输的情况。
,.
Although a cable subscriber may have only one physical wire that connects to the cable company, the subscriber receives many channels of information simultaneously.
虽然一个有线电视用户可能只有一根线连向有线电视公司,但用户可同时收到许多频道的信息。 The signal for one channel does not interfere with the signal for another. 一个频道中的信号不会与另一频道中的信号相互干扰。
@ Computer networks use the principle of separate channels to permit multiple communications to share a single, physical connection. permit 允许
计算机网络使用分离频道的原理使多个通信共享单根物理连线。
Each sender transmits a signal using a particular carrier frequency. 每个发送器使用一个特定载波频率传输信号。
A receiver configured to accept a carrier at a given frequency will not be affected by signals sent at other frequencies.
一个接收器被设置成接收给定频率的载波,它将不会受其它频率信号的影响(或干扰)。
All carriers can pass over the same wire at the same time without interference.
所有载波可在同一时间通过同一导线而互不干扰。
Frequency Division Multiplexing 频分多路复用
@ Frequency division multiplexing(FDM) is the technical term applied to a network system that uses multiple carrier frequencies to allow independent signals to travel through a medium.
频分多路复用(FDM)是使用多个载波频率在一个介质中同时传输多个独立信号的计算机网络系统术语。
FDM technology can be used when sending signals over wire, RF, or optical fiber.
当通过导线、RF或光纤发送信号时便可使用FDM技术。
Figure 6-1 illustrates the concept, and shows the hardware components needed for FDM.
图6-1说明了这一概念并显示了FDM所需的硬件部件。
@ In theory, as long as each carrier operates at a different frequency than the others, it remains independent.
理论上,工作在不同频率上的载波将保持相互独立。
In practice, however, two carriers operating at almost the same frequency or at exact multiples of a frequency can interfere with one another. 但实际上,两个频率相近或频率成整倍的载波会彼此干扰。
To avoid problems, engineers who design FDM network systems choose a minimum separation between the carriers. 为了避免这些问题,设计FDM网络系统的工程师们在各载波之间选择一个最起码
,.
的频率分隔。
The mandate for large gaps between the frequencies assigned to carriers means that underlying hardware used with FDM can tolerate a wide range of frequencies.
mandate 授权 underlying 相关的 tolerate 容纳
在各载波频率之间要求有较大的间隔意味着FDM所用的相关硬件能容纳很宽的频率范围。
Consequently, FDM is only used on high-bandwidth transmission channels. 因此,FDM仅用于高带宽传输通道中。 In summary, 概括地说,
Frequency division multiplexing(FDM) allows multiple pairs of senders and receivers to communicate over a shared medium simultaneously. 频分多路复用允许多对发送和接收装置在一个共享介质上同时通信。 The carrier used by each pair operates at a unique frequency that does not interfere with the others.
每对装置使用的载波频率唯一的,并彼此互不干扰的频率运行。
Time Division Multiplexing 时分多路复用
@ The general alternative to FDM is time division multiplexing (TDM), in which sources sharing a medium take turn.
与FDM不同的另一种复用形式是时分多路复用(TDM),按这种方式,各发送源轮流使用共享的通信介质。
For example, some time-division multiplexing hardware use a round-robin scheme in which the multiplesor sends a packet from sourcel, then sends a packet from souces2, and so on. round-robin 循环
例如,某些TDM硬件使用循环法方案共享介质,用这种方法,多路复用器先发送源1的一个包,然后发送源2的一个包,如此循环。 Figure 6-2 illustrates the idea. 图6-2说明了这种思想。
@ Dividing data into small packets ensures that all sources receive prompt service because it prohibits one source from gaining exclusive access for an arbitrarily long time.arbitrary
prompt 立刻地 prohibit禁止 arbitrarily 任意地 exclusive 独占 把数据分成许多小包保证了所有源都接受到即时服务,因为它禁止一个源任意长时间独占介质”。
In particular, if one source has a few packets to send and another has many, allowing both sources to take turns sending packets guarantees that the source with a small amount of data will finish promptly.
特别是,如果一个源只有少量的包发送,而另一个源有许多包发送,于是允许两个源轮流发送包就保证只有少量数据的源会很快结束。
@ In fact, most computer networks use some form of time division