python road - the history of operating systems

python road - the history of operating systems

Read catalog

  Manual operation - punchcards

  Batch - Batch and tape storage systems

  Multiprogramming system

  Time-Sharing System

  Real-Time Systems

  General operating system

  Further development of the operating system

  The role of the operating system

Manual operation - punchcards

1946 The first computer was born the mid-20th Century 1950s, computer work are still using manual mode. At this time there is no concept of the operating system.

img img

  Corresponding to the programmer strip (or cards) has been loaded into the input unit perforated programs and data, and then start the machine to enter into the computer program and data memory, the data is then run through the console switch for starting the program; calculated, the printer outputs the calculation result; result after the user removed the tape and remove (or card), before allowing the next user on the machine.

Manual mode two characteristics:

  (1) user exclusive whole machine. The phenomenon does not occur because resources have been occupied by other users and wait, but the low utilization rate of resources.

  (2) CPU waits for manual operation. CPU utilization is not sufficient.

The late 1950s, the emergence of human contradiction: the formation of a sharp contradiction between the slow speed of manual operation and high speed computers, the manual mode of operation has seriously damaged the utilization of system resources (reduced percentage of resource utilization of a few, or even lower), can not be tolerated. The only solution: get rid of people only manual operation, automatic transition job. This appeared to batch.

Batch - Tape

  Batch System: a load on the computer system software, under its control, the computer can automatically and processing one or more batches of user jobs (job which includes programs, data and commands).

An online batch processing system

  First there is an online batch systems, input / output operations by the CPU that is processed.

img

  Between the host machine and the input increases a storage device - tape, automatic control under the monitoring running on a host program, the computer can automatically: bulk to the user on the operation input unit reads the tape, on the tape sequentially user host memory read operation and performs the calculations and outputs the result to the output unit. After completion of the batch job, the Supervisor Routine input device input and from another batch job, stored on tape, according to the above-described process steps are repeated.

Supervision program constantly deal with each job, enabling the job to the automatic switching jobs, reducing job setup time and hands-on time, effectively overcome human conflicts and improve the utilization of the computer.

However, when the job input and output results, the host of the high-speed CPU that is idle, waiting for slow input / output devices to complete the work: the host is "busy wait" state.

Offline batch processing system

  To overcome with ease: the contradiction slow-speed host and peripherals, improve the utilization of the CPU, and the introduction of off-line batch processing system, the input / output from the host control.

img

  The satellite: a is not directly connected to the host which are specialized for dealing with input / output devices.

  Its function is:

  (1) read the user input from the input unit and put the job on a magnetic tape.

  (2) read the execution result output from the tape and transmitted to the output unit.

  Thus, instead of dealing directly with the host input / output devices slow, but relations with relatively fast speed tape drives, effectively alleviate the contradiction between the host and the device. Host machine can work in parallel with the satellite, both clear division of labor, it can give full play to the high-speed computing capabilities of the host.

Offline batch processing system: the 1960s is widely used, it greatly ease the conflicts and contradictions human host and peripherals.

  Deficiency: each host memory store only one operation, during which operation issued whenever an input / output (I / O) the request, the high-speed CPU will wait at a low speed I / O completion status, so that CPU Idle.

To improve CPU utilization, and the introduction of multi-channel programming system.

Multiprogramming system

Multi-channel programming techniques

The so-called multi-channel programming technology, refers to allow multiple programs at the same time and run into the memory. I.e., while the plurality of programs into memory, and allowing them alternately run in the CPU, they share a variety of hardware and software resources in the system. When a program due to the I / O request to suspend operation, CPU will immediately turn to run another road program.

img

When calculating A program, I / O is idle, the program A I / O operation, the CPU is idle (B procedure is the same); after completion must A, B start to enter the working memory, both of which are serial, completed totaling time = T1 + T2.

img

The A, B two programs simultaneously stored in memory, they are under the control of the system, may be interspersed with each other, alternately run on CPU: A program when requested by I / O operations and give CPU, B program can CPU-run, this CPU is no longer idle, while being AI / O operations of I / O devices are not idle, apparently, CPU and I / O devices are in the "busy" state, greatly improving the utilization of resources to also improves the efficiency of the system, a, B all the time required to complete << T1 + T2.

​ 多道程序设计技术不仅使CPU得到充分利用,同时改善I/O设备和内存的利用率,从而提高了整个系统的资源利用率和系统吞吐量(单位时间内处理作业(程序)的个数),最终提高了整个系统的效率。

  单处理机系统中多道程序运行时的特点:

  (1)多道:计算机内存中同时存放几道相互独立的程序;

  (2)宏观上并行:同时进入系统的几道程序都处于运行过程中,即它们先后开始了各自的运行,但都未运行完毕;

  (3)微观上串行:实际上,各道程序轮流地用CPU,并交替运行。

多道程序系统的出现,标志着操作系统渐趋成熟的阶段,先后出现了作业调度管理、处理机管理、存储器管理、外部设备管理、文件系统管理等功能。

由于多个程序同时在计算机中运行,开始有了空间隔离的概念,只有内存空间的隔离,才能让数据更加安全、稳定。

出了空间隔离之外,多道技术还第一次体现了时空复用的特点,遇到IO操作就切换程序,使得cpu的利用率提高了,计算机的工作效率也随之提高。

多道批处理系统

  20世纪60年代中期,在前述的批处理系统中,引入多道程序设计技术后形成多道批处理系统(简称:批处理系统)。

  它有两个特点:

  (1)多道:系统内可同时容纳多个作业。这些作业放在外存中,组成一个后备队列,系统按一定的调度原则每次从后备作业队列中选取一个或多个作业进入内存运行,运行作业结束、退出运行和后备作业进入运行均由系统自动实现,从而在系统中形成一个自动转接的、连续的作业流。

  (2)成批:在系统运行过程中,不允许用户与其作业发生交互作用,即:作业一旦进入系统,用户就不能直接干预其作业的运行。

  批处理系统的追求目标:提高系统资源利用率和系统吞吐量,以及作业流程的自动化。

  批处理系统的一个重要缺点:不提供人机交互能力,给用户使用计算机带来不便。

  虽然用户独占全机资源,并且直接控制程序的运行,可以随时了解程序运行情况。但这种工作方式因独占全机造成资源效率极低。

  一种新的追求目标:既能保证计算机效率,又能方便用户使用计算机。 20世纪60年代中期,计算机技术和软件技术的发展使这种追求成为可能。

分时系统

​ 由于CPU速度不断提高和采用分时技术,一台计算机可同时连接多个用户终端,而每个用户可在自己的终端上联机使用计算机,好象自己独占机器一样。

img

  分时技术:把处理机的运行时间分成很短的时间片,按时间片轮流把处理机分配给各联机作业使用。

  若某个作业在分配给它的时间片内不能完成其计算,则该作业暂时中断,把处理机让给另一作业使用,等待下一轮时再继续其运行。由于计算机速度很快,作业运行轮转得很快,给每个用户的印象是,好象他独占了一台计算机。而每个用户可以通过自己的终端向系统发出各种操作控制命令,在充分的人机交互情况下,完成作业的运行。

具有上述特征的计算机系统称为分时系统,它允许多个用户同时联机使用计算机。

  特点:

  (1)多路性。若干个用户同时使用一台计算机。微观上看是各用户轮流使用计算机;宏观上看是各用户并行工作。

  (2)交互性。用户可根据系统对请求的响应结果,进一步向系统提出新的请求。这种能使用户与系统进行人机对话的工作方式,明显地有别于批处理系统,因而,分时系统又被称为交互式系统。

  (3)独立性。用户之间可以相互独立操作,互不干扰。系统保证各用户程序运行的完整性,不会发生相互混淆或破坏现象。

  (4)及时性。系统可对用户的输入及时作出响应。分时系统性能的主要指标之一是响应时间,它是指:从终端发出命令到系统予以应答所需的时间。

  分时系统的主要目标:对用户响应的及时性,即不至于用户等待每一个命令的处理时间过长。

分时系统可以同时接纳数十个甚至上百个用户,由于内存空间有限,往往采用对换(又称交换)方式的存储方法。即将未“轮到”的作业放入磁盘,一旦“轮到”,再将其调入内存;而时间片用完后,又将作业存回磁盘(俗称“滚进”、“滚出“法),使同一存储区域轮流为多个用户服务。

多用户分时系统是当今计算机操作系统中最普遍使用的一类操作系统。

注意:分时系统的分时间片工作,在没有遇到IO操作的时候就用完了自己的时间片被切走了,这样的切换工作其实并没有提高cpu的效率,反而使得计算机的效率降低了。但是我们牺牲了一点效率,却实现了多个程序共同执行的效果,这样你就可以在计算机上一边听音乐一边聊qq了。

实时系统

   虽然多道批处理系统和分时系统能获得较令人满意的资源利用率和系统响应时间,但却不能满足实时控制与实时信息处理两个应用领域的需求。于是就产生了实时系统,即系统能够及时响应随机发生的外部事件,并在严格的时间范围内完成对该事件的处理。

实时系统在一个特定的应用中常作为一种控制设备来使用。

   实时系统可分成两类:

   (1)实时控制系统。当用于飞机飞行、导弹发射等的自动控制时,要求计算机能尽快处理测量系统测得的数据,及时地对飞机或导弹进行控制,或将有关信息通过显示终端提供给决策人员。当用于轧钢、石化等工业生产过程控制时,也要求计算机能及时处理由各类传感器送来的数据,然后控制相应的执行机构。

   (2)实时信息处理系统。当用于预定飞机票、查询有关航班、航线、票价等事宜时,或当用于银行系统、情报检索系统时,都要求计算机能对终端设备发来的服务请求及时予以正确的回答。此类对响应及时性的要求稍弱于第一类。

  实时操作系统的主要特点

  (1)及时响应。每一个信息接收、分析处理和发送的过程必须在严格的时间限制内完成。

  (2)高可靠性。需采取冗余措施,双机系统前后台工作,也包括必要的保密措施等。

分时——现在流行的PC,服务器都是采用这种运行模式,即把CPU的运行分成若干时间片分别处理不同的运算请求 linux系统
实时——一般用于单片机上、PLC等,比如电梯的上下控制中,对于按键等动作要求进行实时处理 

通用操作系统

  操作系统的三种基本类型:多道批处理系统、分时系统、实时系统。

  通用操作系统:具有多种类型操作特征的操作系统。可以同时兼有多道批处理、分时、实时处理的功能,或其中两种以上的功能。

  例如:实时处理+批处理=实时批处理系统。首先保证优先处理实时任务,插空进行批处理作业。常把实时任务称为前台作业,批作业称为后台作业。

  再如:分时处理+批处理=分时批处理系统。即:时间要求不强的作业放入“后台”(批处理)处理,需频繁交互的作业在“前台”(分时)处理,处理机优先运行“前台”作业。

  从上世纪60年代中期,国际上开始研制一些大型的通用操作系统。这些系统试图达到功能齐全、可适应各种应用范围和操作方式变化多端的环境的目标。但是,这些系统过于复杂和庞大,不仅付出了巨大的代价,且在解决其可靠性、可维护性和可理解性方面都遇到很大的困难。

  相比之下,UNIX操作系统却是一个例外。这是一个通用的多用户分时交互型的操作系统。它首先建立的是一个精干的核心,而其功能却足以与许多大型的操作系统相媲美,在核心层以外,可以支持庞大的软件系统。它很快得到应用和推广,并不断完善,对现代操作系统有着重大的影响。

  至此,操作系统的基本概念、功能、基本结构和组成都已形成并渐趋完善。

操作系统的进一步发展

  进入20世纪80年代,大规模集成电路工艺技术的飞跃发展,微处理机的出现和发展,掀起了计算机大发展大普及的浪潮。一方面迎来了个人计算机的时代,同时又向计算机网络、分布式处理、巨型计算机和智能化方向发展。于是,操作系统有了进一步的发展,如:个人计算机操作系统、网络操作系统、分布式操作系统等。

个人计算机操作系统

  个人计算机上的操作系统是联机交互的单用户操作系统,它提供的联机交互功能与通用分时系统提供的功能很相似。

  由于是个人专用,因此一些功能会简单得多。然而,由于个人计算机的应用普及,对于提供更方便友好的用户接口和丰富功能的文件系统的要求会愈来愈迫切。

网络操作系统

  计算机网络:通过通信设施,将地理上分散的、具有自治功能的多个计算机系统互连起来,实现信息交换、资源共享、互操作和协作处理的系统。

  网络操作系统:在原来各自计算机操作系统上,按照网络体系结构的各个协议标准增加网络管理模块,其中包括:通信、资源共享、系统安全和各种网络应用服务。

分布式操作系统

  表面上看,分布式系统与计算机网络系统没有多大区别。分布式操作系统也是通过通信网络,将地理上分散的具有自治功能的数据处理系统或计算机系统互连起来,实现信息交换和资源共享,协作完成任务。——硬件连接相同。

  但有如下一些明显的区别:

  (1)分布式系统要求一个统一的操作系统,实现系统操作的统一性。

  (2)分布式操作系统管理分布式系统中的所有资源,它负责全系统的资源分配和调度、任务划分、信息传输和控制协调工作,并为用户提供一个统一的界面。

  (3)用户通过这一界面,实现所需要的操作和使用系统资源,至于操作定在哪一台计算机上执行,或使用哪台计算机的资源,则是操作系统完成的,用户不必知道,此谓:系统的透明性。

  (4)分布式系统更强调分布式计算和处理,因此对于多机合作和系统重构、坚强性和容错能力有更高的要求,希望系统有:更短的响应时间、高吞吐量和高可靠性。

操作系统的作用

  现代的计算机系统主要是由一个或者多个处理器,主存,硬盘,键盘,鼠标,显示器,打印机,网络接口及其他输入输出设备组成。

  一般而言,现代计算机系统是一个复杂的系统。

  其一:如果每位应用程序员都必须掌握该系统所有的细节,那就不可能再编写代码了(严重影响了程序员的开发效率:全部掌握这些细节可能需要一万年....)

  其二:并且管理这些部件并加以优化使用,是一件极富挑战性的工作,于是,计算安装了一层软件(系统软件),称为操作系统。它的任务就是为用户程序提供一个更好、更简单、更清晰的计算机模型,并管理刚才提到的所有设备。

  总结:

  Programmers can not put all the hardware details of the operation have learned, manage them and optimize the use of hardware is very tedious work, the tedious work is the operating system to dry, with him, the programmer from these tedious work the relief out, only need to consider writing your own applications on it, application software directly using the function provided by the operating system indirectly using hardware.

  Streamlined to say, the operating system is a coordinated control program management and control of computer hardware resources and software resources. FIG position at which the operating system

img

  Elaborate words, the operating system should be divided into two functions:

  

#一:隐藏了丑陋的硬件调用接口,为应用程序员提供调用硬件资源的更好,更简单,更清晰的模型(系统调用接口)。应用程序员有了这些接口后,就不用再考虑操作硬件的细节,专心开发自己的应用程序即可。
例如:操作系统提供了文件这个抽象概念,对文件的操作就是对磁盘的操作,有了文件我们无需再去考虑关于磁盘的读写控制(比如控制磁盘转动,移动磁头读写数据等细节),

#二:将应用程序对硬件资源的竞态请求变得有序化
例如:很多应用软件其实是共享一套计算机硬件,比方说有可能有三个应用程序同时需要申请打印机来输出内容,那么a程序竞争到了打印机资源就打印,然后可能是b竞争到打印机资源,也可能是c,这就导致了无序,打印机可能打印一段a的内容然后又去打印c...,操作系统的一个功能就是将这种无序变得有序。[​ 

Guess you like

Origin www.cnblogs.com/bky20061005/p/11571819.html