The history of the operating system

Manual Operation - Punched Cards:

  The first computer was born in 1946, and computer work is still done manually. At this time there was no concept of an operating system.

  The programmer loads the punched paper tape (or card) corresponding to the program and data into the input machine, then starts the input machine to input the program and data into the computer memory, and then starts the program through the console switch to run against the data; after the calculation, the printer The calculation result is output; the user takes the result and removes the tape (or card) before letting the next user on the machine.

Two features of manual operation:

   (1) The user exclusively owns the whole machine. The phenomenon of waiting because the resource has been occupied by other users will not occur, but the utilization rate of the resource is low.

     (2) The CPU waits for manual operation. The CPU is underutilized.

  In the late 1950s, interpersonal contradictions appeared: a sharp contradiction was formed between the slow speed of manual operation and the high speed of computers, and the manual operation method had seriously damaged the utilization rate of system resources (reduced the utilization rate of resources to a few percent). , or even lower), intolerable, the only solution: only to get rid of human manual operation and realize automatic filtering of jobs, so that batch processing appears.

Batch - Tape Storage:

  Batch system: a system software loaded on a computer, under its control, the computer can automatically and batch process one or more users' jobs (this job includes programs, data and commands)

Online batch system:

  First came online batch processing systems, where the input/output of a job was handled by the CPU.

  A storage device, a tape, is added between the host and the input machine. Under the automatic control of the supervisory program running on the host, the computer can automatically complete: read the user jobs on the input machine into the tape in batches, and sequentially read the tapes on the tape. User jobs are read into host memory and executed and output the results to the output machine. After the previous batch of jobs is completed, the supervisor enters another batch of jobs from the input machine, saves it on tape, and repeats the above steps.

  The supervisory program continuously processes each job, thus realizing the automatic transfer from job to job, reducing the time for job establishment and manual operation, effectively overcoming the contradiction between man and machine, and improving the utilization rate of the computer.

  However, during job input and result output, the host's high-speed CPU is still idle, waiting for the slow I/O devices to complete the work, and the host is in a 'busy wait' state.

Offline batch system:

  In order to overcome and alleviate the contradiction between the high-speed host and the slow peripherals, the utilization rate of the CPU has been improved, and an off-line batch processing system has been introduced, that is, the input/output is controlled from the host.

  Satellite: One that is not directly connected to the host and is dedicated to dealing with input/output devices.

  Its function is:

    (1) Read the user job from the input machine and put it on the input tape.

    (2) Execute the result from the output tape and pass it to the output machine.

  In this way, the host does not directly deal with the slow input/output device, but has a relationship with the relatively fast tape drive, which effectively alleviates the contradiction between the host and the device. The host computer and the satellite computer can work in parallel, and the two have a clear division of labor, which can give full play to the computing power of the host computer.

  Offline batch processing system: It was widely used in the 1960s, which greatly alleviated the contradiction between man-machine and the peripherals of the host.

  Disadvantage: Only one job is stored in the host memory at a time. Whenever an input/output (I/O) request is issued during its operation, the high-speed CPU is waiting at a low level. In order to improve the utilization of the CPU, a multi-programming system is introduced. .

Multiprogramming system:

Many to programming techniques:

  The so-called multiprogramming technology refers to allowing multiple programs to enter the memory and run at the same time. That is to put multiple programs into memory at the same time, and allow them to run alternately in the CPU, and they share various hardware and software resources in the system. When a program is suspended due to an I/O request, the CPU immediately turns to run another program.

 

  When program A is calculating, I/O is idle, and when program A is performing I/O operations, the CPU is idle (the same is true for program B); after the work of A is completed, B can enter the memory to start work, the two are serial, all Total time required to complete = T1+T2.

  Store the two programs A and B in the memory at the same time, under the control of the system, they can be interspersed with each other and run on the CPU alternately: when the A program gives up the CPU due to requesting I/O operations, the B program can occupy the The CPU is running, so that the CPU is no longer idle, and the devices that are performing A and I/O operations are also not idle. Obviously, both the CPU and the I/O devices are in a "busy" state, which greatly improves the utilization of resources, thereby also improving In order to improve the efficiency of the system, the time required for all A and B to complete is <<T1+T2.

  Multiprogramming technology not only makes full use of the CPU, but also improves the utilization of I/O devices and memory, thereby improving the resource utilization and system throughput of the entire system (the number of processing jobs (programs) per unit time) , which ultimately improves the efficiency of the entire system.

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

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

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

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

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

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

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

多道批处理系统:

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

  它有两个特点:

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

    (2)成批:在系统运行过程中,不允许用户与其作业发生交互作用,即:作业一旦进入系统,用户就不能直接干预其作业的运行。
  批处理系统的追求目标:提高系统资源利用率和系统吞吐量,以及作业流程的自动化。
  批处理系统的一个重要缺点:不提供人机交互能力,给用户使用计算机带来不便。
  虽然用户独占全机资源,并且直接控制程序的运行,可以随时了解程序运行情况。但这种工作方式因独占全机造成资源效率极低。
  一种新的追求目标:既能保证计算机效率,又能方便用户使用计算机。 20世纪60年代中期,计算机技术和软件技术的发展使这种追求成为可能。

分时系统:

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

  若某个作业在分配给它的时间片内不能完成其计算,则该作业暂时中断,把处理机让给另一作业使用,等待下一轮时再继续其运行。由于计算机速度很快,作业运行轮转得很快,给每个用户的印象是,好象他独占了一台计算机。而每个用户可以通过自己的终端向系统发出各种操作控制命令,在充分的人机交互情况下,完成作业的运行。
具有上述特征的计算机系统称为分时系统,它允许多个用户同时联机使用计算机。
   特点:
  (1)多路性。若干个用户同时使用一台计算机。微观上看是各用户轮流使用计算机;宏观上看是各用户并行工作。
  (2)交互性。用户可根据系统对请求的响应结果,进一步向系统提出新的请求。这种能使用户与系统进行人机对话的工作方式,明显地有别于批处理系统,因而,分时系统又被称为交互式系统。
  (3)独立性。用户之间可以相互独立操作,互不干扰。系统保证各用户程序运行的完整性,不会发生相互混淆或破坏现象。
  (4)及时性。系统可对用户的输入及时作出响应。分时系统性能的主要指标之一是响应时间,它是指:从终端发出命令到系统予以应答所需的时间。
  分时系统的主要目标:对用户响应的及时性,即不至于用户等待每一个命令的处理时间过长。
分时系统可以同时接纳数十个甚至上百个用户,由于内存空间有限,往往采用对换(又称交换)方式的存储方法。即将未“轮到”的作业放入磁盘,一旦“轮到”,再将其调入内存;而时间片用完后,又将作业存回磁盘(俗称“滚进”、“滚出“法),使同一存储区域轮流为多个用户服务。
多用户分时系统是当今计算机操作系统中最普遍使用的一类操作系统。

实时系统:

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

  实时系统可分为两类:

    (1)实时控制系统。

    (2)实时信息处理系统。

实时系统的主要特点:

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

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

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

通用操作系统:

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

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

操作系统的进一步发展:

  个人计算机的操作系统:

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

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

  网络操作系统:

   计算机网络:通过通信设施,将地理上分散的、具有自治功能的多个计算机系统互连起来,实现信息交换、资源共享、互操作和协作处理的系统。
     网络操作系统:在原来各自计算机操作系统上,按照网络体系结构的各个协议标准增加网络管理模块,其中包括:通信、资源共享、系统安全和各种网络应用服务。

  分布式操作系统:

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

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

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

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

操作系统的作用:

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

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

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

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

精简的说的话,操作系统就是一个协调、管理和控制计算机硬件资源和软件资源的控制程序。操作系统所处的位置如图:细说的话,操作系统应该分成两部分功能:

 

细说的话,操作系统应该分成两部分功能:

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

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

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326307730&siteId=291194637