Operating system (OS) Summary----Courseware of the University (reference book: 8086 compilation of the Wang Shuang)

Source: Internet
Author: User

1. Let us first talk about the history of the operating system, which is more conducive to our technical context of the

├--hand-Punched insert card
├--single-channel batch processing ├--online processing (batch jobs can be processed but only one job at a time)
├├──– offline processing (easing human-machine contradictions, allowing CPU and input input devices to be processed in parallel)
├--multi-Channel batch processing
├--CTSS
├--Real-time system

The following four stages of structural development are experienced:
├--Unstructured OS Architecture (only functions are implemented)
├--Modular OS Architecture (not conducive to data sharing, communication)
├--Layered OS Architecture (poor scalability)
├--micro-kernel OS architecture (using object-oriented design method, the system is basically micro-kernel)
By the way, we often mention the kernel layer development, and the user layer development, the so-called kernel layer development, is
Use the operating system kernel open interface, programming. User-level development is the use of common interface programming, such as Windows
Win32 API is the application layer development, specialized in the development of the software we use.

In our study of the article, the classic bridging passages often play a connecting role, the OS is such
Control the following hardware, and for the upper layer of the application software to provide interface, graphics and other services. 、



2. Let's start by saying that the part that we present is often used, and the operating system lets us see

The file system, which provides the upper-level operation is the directory file which we often use
Device management, USB device for normal use, keyboard and mouse monitor printer, etc.

Of course, these two parts, we see the content, should be considered a logical level of things, is the operating system in order to better serve the customer
and designed, after all, the initial DOS system, is that we start to see the black screen interface just will show some characters just that.
The operating system turns logical operations into specific hardware processing, of course, and these details are hidden.

3. The next part, is the processing of the hardware
├—— cpu  就是处理器了,由寄存器 控制器 运算器和元器件通过总线连接起来的中央处理器├—— 内存 这个大家应该很熟悉的,手机也有就是的RAM├—— 设备 键盘 鼠标 显示器 打印机 等├—— 文件:磁盘 软盘 u盘等

The above is basically the main management work done by the OS, through the management of these hardware, I feel is actually the I/O operation of these hardware
, let's see how the operating system reads and writes them, and then lets the entire system serve us.

3.1 CPU We all know, is used to process instructions, instructions from the program we write, then we write the program is how to enter the memory,

And then into the CPU, and then processed, the program is generally processed as follows:

编写       编译           链接                  装入内存            创建pcb初始化,保存程序在内存中的地址

-–> Source--------and binary executable file ——— > Create process ————————————-
Allocate the resources, modify the corresponding values of the PCB, and add the PCB to the ready queue through the process scheduling algorithm to get the CPU
————————————————— > Wait for CPU Execution ———————— > program starts execution

The above is I understand the procedure process, if there is a problem, please point out in time thank you. From here, the CPU is a series of operations that can be used to process processes.
The creation of processes, the destruction of the state of communication between transitions between synchronous asynchronous concurrency and the scheduling of processes. The details are as follows:












3.2 Memory
      内存的主要作用就是给cpu提供数据,既然是内存那就避免不免的流程: 分配 回收  我们所有的操作也都时围绕这俩点进行的,说道内存的分配那就肯定分为俩中情况: 连续  非连续 类似于数据结构  的线性和非线性。  连续分配内存就是很简单了,就是分配连续的内存,但是分配多少呢,这就是一个问题了,所以就分为固定内存的分配  和动态内存的分配(根据程序,数据 大小),并且采用相关的分配算法。缺点:内存碎片化严重,所以我们聪明的程序  员,又想出了非连续内存分配的方法,来弥补缺点,毕竟内存条很贵,并且容量有限。  离散分配(非连续): 就像书一样先把内存按照一定的大小分页,系统存在一张总的分页表,就跟我们平常见到的书目录是一样  的,我们可以在程序装入内存的时候,把空合适的页面集合找出来然后,把程序存储进去。但是因为页比较小承载的数据有限  但是我们的程序大小是不确定的,这样我们编写汇编代码对地址的处理就会比较麻烦,这个时候就需要分段了,就跟我们学习  文章一样,文章分为不同的段落,有不同的作用,我们就把内存分段,按照需求分成不同的段。但是因为我们有的程序特别的大  内存不够,这个时候产生了虚拟内存的概念,其实就是用了替换的思想,把当前需要处理的指令先存入内存,当把内存中的指令  处理完毕之后,可以把剩下的指令再次调入内存,这样我们就可以用小于程序的内存来运行大于内存的程序,因为我们是内存是以  段或者页位基础的,所以相应的置换算法就叫做,页面置换算法 ,段置换算法。当然了也可以把段和页结合起来,使用段页式  内存管理,这样就可以结合俩者的优点。这里写的都是很粗略的东西,具体还是要看书。  知识结构图如下:







3.3 Devices
设备的管理,发展到现在主要处理分为四步: --- 应用程序的调用                                                 --- 设备独立性软件                                                   --- 设备驱动程序                                                     --- i/o 中断   因为我们在编程的时候,读写文件就是通过一些库函数提供的方法,read write 等方法直接使用的,不管我换个操作系统,还是换个  硬件对于我们编程事没有影响的,这个牛逼的功能就是设备独立性软件提供的,让我们对设备的操作独立于设备硬件,在这一层会把逻辑  设备转为物理设备,并且调用设备驱动程序来处理相应的i/o 操作。  知识结构图如下:








3.4 Files
      文件的逻辑结构,物理机构  知识结构图如下:







Operating system (OS) Summary----Courseware of the University (reference book: 8086 compilation of the Wang Shuang)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.