Operating System 简明教程

Types of Operating System

操作系统从第一台计算机开始就存在,并且随着时间的推移不断发展。在本章中,我们将讨论一些最常用的重要操作系统类型。

Operating systems are there from the very first computer generation and they keep evolving with time. In this chapter, we will discuss some of the important types of operating systems which are most commonly used.

Batch operating system

批处理操作系统的用户不会直接与计算机交互。每个用户都会在脱机设备(如穿孔卡)上准备自己的作业,并将其提交给计算机操作员。为了加快处理速度,需求类似的作业会被批处理在一起并作为一组运行。程序员会将自己的程序留给操作员,然后操作员会将具有相似需求的程序分类到批处理中。

The users of a batch operating system do not interact with the computer directly. Each user prepares his job on an off-line device like punch cards and submits it to the computer operator. To speed up processing, jobs with similar needs are batched together and run as a group. The programmers leave their programs with the operator and the operator then sorts the programs with similar requirements into batches.

批处理系统的缺点如下 −

The problems with Batch Systems are as follows −

  1. Lack of interaction between the user and the job.

  2. CPU is often idle, because the speed of the mechanical I/O devices is slower than the CPU.

  3. Difficult to provide the desired priority.

Time-sharing operating systems

分时是一种技术,它使许多位于不同终端的人员能够同时使用一个特定的计算机系统。分时或多任务处理是多道程序设计的逻辑扩展。同时在多个用户之间共享的处理器的時間称为分时。

Time-sharing is a technique which enables many people, located at various terminals, to use a particular computer system at the same time. Time-sharing or multitasking is a logical extension of multiprogramming. Processor’s time which is shared among multiple users simultaneously is termed as time-sharing.

多道程序批处理系统和分时系统之间的主要区别在于,在多道程序批处理系统的情况下,目标是最大化处理器使用率,而在分时系统中,目标是最小化响应时间。

The main difference between Multiprogrammed Batch Systems and Time-Sharing Systems is that in case of Multiprogrammed batch systems, the objective is to maximize processor use, whereas in Time-Sharing Systems, the objective is to minimize response time.

CPU 通过在多个作业之间切换来执行多个作业,但切换发生得很频繁。因此,用户可以收到即时响应。例如,在事务处理中,处理器以短时间段或计算量子执行每个用户程序。也就是说,如果存在 n 个用户,那么每个用户都可以获得一个时间量子。当用户提交命令时,响应时间最多只有几秒钟。

Multiple jobs are executed by the CPU by switching between them, but the switches occur so frequently. Thus, the user can receive an immediate response. For example, in a transaction processing, the processor executes each user program in a short burst or quantum of computation. That is, if n users are present, then each user can get a time quantum. When the user submits the command, the response time is in few seconds at most.

操作系统使用 CPU 调度和多道程序设计为每个用户提供一小部分时间。最初主要设计为批处理系统的计算机系统已经修改为分时系统。

The operating system uses CPU scheduling and multiprogramming to provide each user with a small portion of a time. Computer systems that were designed primarily as batch systems have been modified to time-sharing systems.

分时操作系统具有以下优点:

Advantages of Timesharing operating systems are as follows −

  1. Provides the advantage of quick response.

  2. Avoids duplication of software.

  3. Reduces CPU idle time.

分时操作系统的缺点如下:

Disadvantages of Time-sharing operating systems are as follows −

  1. Problem of reliability.

  2. Question of security and integrity of user programs and data.

  3. Problem of data communication.

Distributed operating System

分布式系统使用多个中央处理器为多个实时应用程序和多个用户提供服务。数据处理作业相应地分布在处理器之间。

Distributed systems use multiple central processors to serve multiple real-time applications and multiple users. Data processing jobs are distributed among the processors accordingly.

处理器通过各种通信线路(例如高速总线或电话线)相互通信。这些被称为 loosely coupled systems 或分布式系统。分布式系统中的处理器在大小和功能上可能有所不同。这些处理器被称为站点、节点、计算机等。

The processors communicate with one another through various communication lines (such as high-speed buses or telephone lines). These are referred as loosely coupled systems or distributed systems. Processors in a distributed system may vary in size and function. These processors are referred as sites, nodes, computers, and so on.

分布式系统的优点如下:

The advantages of distributed systems are as follows −

  1. With resource sharing facility, a user at one site may be able to use the resources available at another.

  2. Speedup the exchange of data with one another via electronic mail.

  3. If one site fails in a distributed system, the remaining sites can potentially continue operating.

  4. Better service to the customers.

  5. Reduction of the load on the host computer.

  6. Reduction of delays in data processing.

Network operating System

网络操作系统在服务器上运行,并为服务器提供管理数据、用户、组、安全、应用程序和其他网络功能的能力。网络操作系统的主要目的是允许网络中多台计算机(通常是局域网 (LAN)、专用网络或其他网络)之间共享文件和打印机访问权限。

A Network Operating System runs on a server and provides the server the capability to manage data, users, groups, security, applications, and other networking functions. The primary purpose of the network operating system is to allow shared file and printer access among multiple computers in a network, typically a local area network (LAN), a private network or to other networks.

网络操作系统示例包括 Microsoft Windows 服务器 2003、Microsoft Windows 服务器 2008、UNIX、Linux、Mac OS X、Novell NetWare 和 BSD。

Examples of network operating systems include Microsoft Windows Server 2003, Microsoft Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD.

网络操作系统的优点如下 −

The advantages of network operating systems are as follows −

  1. Centralized servers are highly stable.

  2. Security is server managed.

  3. Upgrades to new technologies and hardware can be easily integrated into the system.

  4. Remote access to servers is possible from different locations and types of systems.

网络操作系统的缺点如下 −

The disadvantages of network operating systems are as follows −

  1. High cost of buying and running a server.

  2. Dependency on a central location for most operations.

  3. Regular maintenance and updates are required.

Real Time operating System

实时系统定义为一个数据处理系统,其中处理和响应输入所需的时间间隔非常小,以至于它控制着环境。系统响应输入并显示所需更新信息所花费的时间称为 response time 。因此,在这种方法中,与联机处理相比,响应时间非常少。

A real-time system is defined as a data processing system in which the time interval required to process and respond to inputs is so small that it controls the environment. The time taken by the system to respond to an input and display of required updated information is termed as the response time. So in this method, the response time is very less as compared to online processing.

当对处理器的操作或数据流有严格的时间要求时,可以使用实时系统,并且可以在专用应用程序中将实时系统用作控制设备。实时操作系统必须具有明确定义的、固定的时间约束,否则系统将失败。例如,科学实验、医学影像系统、工业控制系统、武器系统、机器人、空中交通管制系统等。

Real-time systems are used when there are rigid time requirements on the operation of a processor or the flow of data and real-time systems can be used as a control device in a dedicated application. A real-time operating system must have well-defined, fixed time constraints, otherwise the system will fail. For example, Scientific experiments, medical imaging systems, industrial control systems, weapon systems, robots, air traffic control systems, etc.

实时操作系统有两种类型。

There are two types of real-time operating systems.

Hard real-time systems

硬实时系统保证关键任务按时完成。在硬实时系统中,辅助存储器受到限制或缺失,数据存储在 ROM 中。在这些系统中,几乎找不到虚拟内存。

Hard real-time systems guarantee that critical tasks complete on time. In hard real-time systems, secondary storage is limited or missing and the data is stored in ROM. In these systems, virtual memory is almost never found.

Soft real-time systems

软实时系统的限制较少。关键实时任务优先于其他任务,并保留优先级,直到任务完成。软实时系统的实用性不如硬实时系统。例如,多媒体、虚拟现实、海底勘探和行星探测车等先进科学项目。

Soft real-time systems are less restrictive. A critical real-time task gets priority over other tasks and retains the priority until it completes. Soft real-time systems have limited utility than hard real-time systems. For example, multimedia, virtual reality, Advanced Scientific Projects like undersea exploration and planetary rovers, etc.