1.6 Operating System Overview summary

Disclaimer: This article is a blogger original article, follow the CC 4.0 by-sa copyright agreement, reproduced, please attach the original source link and this statement.
This link: https: //blog.csdn.net/g8433373/article/details/88088507

1- complete a program execution
is shown below for some c language code, we think about when we performed in the end experienced what?

#include<stdio.h>
int main(int argc, char const *argv[])
{
  /* code */
  puts("hello world");
  return 0;
}

Under the following complete understanding of the implementation process:
  • inform the user of the operating system (many ways, such as: In the command line, type the appropriate command; by double-clicking the icon hello world program)
  • Is the operating system whether a file is an executable file (Windows: PE ; Linux: ELF)
  • operating system to create a process to map the executable file format to process structure, the process of implementation of the program
  • the operating system passes control to the scheduler, set the context for the hello world program to jump start the program place (dispatcher how to select? i / o multiplex?)
  • first instruction, a page fault occurs abnormality (abnormal missing pages Why?)
  • because the code execution of code needs to load into memory, but you start not assigned, so the operating system (memory management module) will be assigned a free memory to perform hello world, sometimes one is not enough, there may be exceptions, and missing pages of memory allocation operations ps several times. code read from disk into memory
  and then puts the operating system to perform the function (system call) •, the role is a character string on a standard output device
  • operation String for the system needs to write to the screen of a process
  • process control equipment notification window display strings, window system determines a legitimate operation, the string -> pixels -> Device memory-mapped area
  • Video Hardware -> Display It can accept data control signals
and finally on the screen to see the hello world.


2- the role of the operating system
  the role of a: operating system resource managers
    manage what resources?
      Hardware resources: CPU, memory, device (I / O devices, disk, clocks, network cards, etc.)
      software resources: file on disk, all kinds of management information such as
    how to manage resources?
      through the use of data structures and algorithms track record of resources (data structure determines what are my capabilities, based on these features can plan on how what algorithm supports resource allocation, which idle resources can be allocated and so on)
    related strategy
      static allocation strategy: before running the program will complete all assigned resources, a waste of resources
      dynamic allocation strategy: During execution, the need to raise resources applications, will decide whether to allocate the data structures
      allocation and recovery: depending on the data structure ( The bitmap may be used to achieve, a label allocated, unallocated 0)
    resource management point of view - the five basic functions of the operating system
      process threads management (CPU management): process thread status, control, synchronization / mutex, communication, schedule ...
      storage tube : Distribution / recovery, address translation, memory protection, memory expansion ...
      File Management: file directory, file operations, disk space, file storage control ...
      device management: a device driver, assigned recovery, buffering ...
      User Interface: system commands, programming interface
  role two: the operating system is a provider of systems and services
    , for example
      to create a process in implementing
      operations files and directories
      Using I / O device
  following three functions: the expansion of the operating system of the machine hardware
    Examples
      operating system is the first layer of software on the hardware basis
      to reduce the complexity of hardware (for example: a floppy disk I / O operations)


3-操作系统的特征
  并发
    指的是操作系统具有同时处理多个任务的能力
    并发引起的问题
      任务切换,保护,互相依赖任务之间同步的问题
    同时执行多个程序的错觉: 单CPU场景下,任务之间轮流执行
    并行: 不同任务同时在多个硬件部件上执行。(注意并发和并行的区别:马拉松和110米跨栏)
  共享
    指的就是多个用户程序共同使用操作系统的资源
    举例
      互斥共享(打印机)
      同时共享(重入代码,磁盘文件)
    问题: 操作系统资源分配,保证不同进程间不被影响
  虚拟
    将物理实体(CPU,内存)映射为若干个逻辑实体;分时,分空间
    目的: 提升资源利用率
    举例:
      CPU: 每个进程在虚拟CPU上在跑,但是微观上只有一个进程在一个CPU上在跑
      进程独立地址空间,物理上是共用一块物理内存
      显示设备可以多开, 也是虚拟化的结果
  随机
    操作系统必须随时对次序不可预测的任务进行响应
    举例
      进程运行速度不可预知,多个进程同时运行(上下CPU)
      难以重现系统在某一个时刻的状态


4-操作系统架构
  Windows
    简化了一版基本架构,如图:

    

 

    其中和硬件打交道的就是:内核和硬件抽象层
    用户和操作系统打交道的是:动态链接库
  UNIX
    看下简单版的UNIX架构

    

    看下相对全面一些的

    

  Linux

    感觉用的最多的,按照自己的理解整了一套架构图,不知道对不对,哈哈

    

 

5-操作系统的分类

    操作系统的发展是随着计算机硬件技术的发展
  批处理系统
    单道批处理系统
    多道批处理系统
    真脱机
    假脱机(Spooling技术) : 这个觉得很经典
  分时操作系统
    轮流为每个用户服务
    时间片: 按照时间片轮转为每个用户服务
    追求目标: 响应时间
  通用操作系统
    将分时和批处理结合
    场景前台: (分时优先,批处理后)
    场景后台: (批处理先,分时后)
  实时操作系统
    能够及时响应外部请求,能够在严格的时间内完成
    实时过程控制: 航空
    实时通信系统: 交换机,银行
    追求目标
      1 严格时间内能有响应
      2 高可靠性
  个人计算机操作系统
    计算机在某一时刻只为一个人服务
    追求目标: 界面友好,使用简单,丰富应用软件
  网络操作系统
    基于网络体系结构和网络协议标准开发的网络模块
    功能: 网络通信,安全,资源共享,以及各种网络应用
  分布式操作系统
    以网络为基础或者以多机为基础,特征是将计算任务分布在不同计算机上
    技术点: 任务分配,调度,负载均衡
    优点: 处理能力强,速度快,可靠性强,具有透明性
  嵌入式操作系统
    对应不同设备的软硬件系统, 他是某一个设备中的系统, 不一定是计算机
    功能: 控制设备中的各个部件协调工作, 合理调度
  智能卡操作系统
    智能卡: 一种带有CPU芯片的卡片
    特点: 由于非常小,对能耗和存储都有严格的限制
    举例: 电子支付


6-核心点
  操作系统的定义
  操作系统的三个作用, 四个特征
  Spooling技术
  Windows,UNIX,Linux架构特点

Guess you like

Origin www.cnblogs.com/morwing/p/11361233.html