Operating System 简明教程
Operating System - Properties
以下是操作系统的不同属性。本教程将逐一详细说明这些属性:
Following are the different properties of an Operating System. This tutorial will explain these properties in detail one by one:
Batch processing
批处理是一种技术,在该技术中,操作系统在处理开始前先将程序和数据一起收集到一个批处理中。操作系统执行与批处理相关的以下活动:
Batch processing is a technique in which an Operating System collects the programs and data together in a batch before processing starts. An operating system does the following activities related to batch processing −
-
The OS defines a job which has predefined sequence of commands, programs and data as a single unit.
-
The OS keeps a number a jobs in memory and executes them without any manual information.
-
Jobs are processed in the order of submission, i.e., first come first served fashion.
-
When a job completes its execution, its memory is released and the output for the job gets copied into an output spool for later printing or processing.
Multitasking
多任务是指 CPU 通过在多个作业之间进行切换来同时执行多个作业。切换发生得非常频繁,以至于用户可以在程序运行时与其交互。操作系统执行与多任务处理相关的以下活动:
Multitasking is when multiple jobs are executed by the CPU simultaneously by switching between them. Switches occur so frequently that the users may interact with each program while it is running. An OS does the following activities related to multitasking −
-
The user gives instructions to the operating system or to a program directly, and receives an immediate response.
-
The OS handles multitasking in the way that it can handle multiple operations/executes multiple programs at a time.
-
Multitasking Operating Systems are also known as Time-sharing systems.
-
These Operating Systems were developed to provide interactive use of a computer system at a reasonable cost.
-
A time-shared operating system uses the concept of CPU scheduling and multiprogramming to provide each user with a small portion of a time-shared CPU.
-
Each user has at least one separate program in memory.
-
A program that is loaded into memory and is executing is commonly referred to as a process.
-
When a process executes, it typically executes for only a very short time before it either finishes or needs to perform I/O.
-
Since interactive I/O typically runs at slower speeds, it may take a long time to complete. During this time, a CPU can be utilized by another process.
-
The operating system allows the users to share the computer simultaneously. Since each action or command in a time-shared system tends to be short, only a little CPU time is needed for each user.
-
As the system switches CPU rapidly from one user/program to the next, each user is given the impression that he/she has his/her own CPU, whereas actually one CPU is being shared among many users.
Multiprogramming
*多道程序设计*是指在两个及以上的程序同时驻留在内存中时共享处理器。多道程序设计假定有一个共享处理器。多道程序设计通过组织作业来提高 CPU 利用率,以便 CPU 始终有作业可执行。
Sharing the processor, when two or more programs reside in memory at the same time, is referred as * multiprogramming*. Multiprogramming assumes a single shared processor. Multiprogramming increases CPU utilization by organizing jobs so that the CPU always has one to execute.
下图显示了多道程序设计系统的内存布局。
The following figure shows the memory layout for a multiprogramming system.
操作系统会执行与多道程序设计相关的一些活动。
An OS does the following activities related to multiprogramming.
-
The operating system keeps several jobs in memory at a time.
-
This set of jobs is a subset of the jobs kept in the job pool.
-
The operating system picks and begins to execute one of the jobs in the memory.
-
Multiprogramming operating systems monitor the state of all active programs and system resources using memory management programs to ensures that the CPU is never idle, unless there are no jobs to process.
Interactivity
交互性是指用户与计算机系统交互的能力。操作系统会执行与交互性相关的一些活动:
Interactivity refers to the ability of users to interact with a computer system. An Operating system does the following activities related to interactivity −
-
Provides the user an interface to interact with the system.
-
Manages input devices to take inputs from the user. For example, keyboard.
-
Manages output devices to show outputs to the user. For example, Monitor.
操作系统的响应时间需要很短,因为用户会提交并等待结果。
The response time of the OS needs to be short, since the user submits and waits for the result.
Real Time System
实时系统通常是专用嵌入式系统。操作系统会执行与实时系统活动相关的一些活动。
Real-time systems are usually dedicated, embedded systems. An operating system does the following activities related to real-time system activity.
-
In such systems, Operating Systems typically read from and react to sensor data.
-
The Operating system must guarantee response to events within fixed periods of time to ensure correct performance.
Distributed Environment
分布式环境是指计算机系统中多个独立的 CPU 或处理器。操作系统对分布式环境执行以下活动:
A distributed environment refers to multiple independent CPUs or processors in a computer system. An operating system does the following activities related to distributed environment −
-
The OS distributes computation logics among several physical processors.
-
The processors do not share memory or a clock. Instead, each processor has its own local memory.
-
The OS manages the communications between the processors. They communicate with each other through various communication lines.
Spooling
Spooling 是在线同时外围操作的首字母缩写词。Spooling 指的是将各种 I/O 作业的数据放入缓冲区。此缓冲区是 I/O 设备可访问的内存或硬盘上的一个特殊区域。
Spooling is an acronym for simultaneous peripheral operations on line. Spooling refers to putting data of various I/O jobs in a buffer. This buffer is a special area in memory or hard disk which is accessible to I/O devices.
操作系统对分布式环境执行以下活动:
An operating system does the following activities related to distributed environment −
-
Handles I/O device data spooling as devices have different data access rates.
-
Maintains the spooling buffer which provides a waiting station where data can rest while the slower device catches up.
-
Maintains parallel computation because of spooling process as a computer can perform I/O in parallel fashion. It becomes possible to have the computer read data from a tape, write data to disk and to write out to a tape printer while it is doing its computing task.