目录

输入输出(I/O)管理

I/O设备的基本概念和分类

https://gitee.com/lienhui68/picStore/raw/master/null/20200714184648.png

什么是I/O设备

I/O就是输入/输出,I/O设备可以将数据输入到计算机,或者可以接受计算机输出的外部设备,属于计算机中的硬件部件。

https://gitee.com/lienhui68/picStore/raw/master/null/20200714184946.png

按使用特性分类

https://gitee.com/lienhui68/picStore/raw/master/null/20200714185023.png

按传输速率分类

https://gitee.com/lienhui68/picStore/raw/master/null/20200714185044.png

按信息交换的单位分类

https://gitee.com/lienhui68/picStore/raw/master/null/20200714185112.png

小结

https://gitee.com/lienhui68/picStore/raw/master/null/20200714185135.png

I/O控制器

I/O设备由机械部件和电子部件组成,电子部件就是I/O控制器,又称设备控制器。

I/O设备的机械部件

https://gitee.com/lienhui68/picStore/raw/master/null/20200714190746.png

I/O设备的电子部件(I/O控制器)

https://gitee.com/lienhui68/picStore/raw/master/null/20200714191039.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200714191559.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200714191621.png

内存映像I/O vs 寄存器独立编址

https://gitee.com/lienhui68/picStore/raw/master/null/20200714192012.png

小结

https://gitee.com/lienhui68/picStore/raw/master/null/20200714192032.png

I/O控制方式

I/O控制方式即:用什么样的方式来控制I/O设备的数据读/写。

需要注意的问题:

  1. 完成一次读/写操作的流程;

  2. cpu干预的频率

  3. 数据传送单位

  4. 数据的流向

  5. 主要优点和主要缺点

程序直接控制方式

https://gitee.com/lienhui68/picStore/raw/master/null/20200714194839.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200714194949.png

中断驱动方式

https://gitee.com/lienhui68/picStore/raw/master/null/20200714195050.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200714195130.png

DMA方式

https://gitee.com/lienhui68/picStore/raw/master/null/20200714195250.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200714195416.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200714195511.png

通道控制方式

https://gitee.com/lienhui68/picStore/raw/master/null/20200714195559.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200714195616.png

小结

https://gitee.com/lienhui68/picStore/raw/master/null/20200714195712.png

I/O软件层次结构

https://gitee.com/lienhui68/picStore/raw/master/null/20200714201309.png

用户层软件

https://gitee.com/lienhui68/picStore/raw/master/null/20200714201431.png

设备独立性软件

https://gitee.com/lienhui68/picStore/raw/master/null/20200714201542.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200714201636.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200714201650.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200714201715.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200714201746.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200714201834.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200714201913.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200714201946.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200714202050.png

设备驱动程序

https://gitee.com/lienhui68/picStore/raw/master/null/20200714202141.png

中断处理程序

https://gitee.com/lienhui68/picStore/raw/master/null/20200714202204.png

小结

https://gitee.com/lienhui68/picStore/raw/master/null/20200714202247.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200714202406.png

假脱机工作

概念

https://gitee.com/lienhui68/picStore/raw/master/null/20200715045930.png

利用了缓冲概念,目的是为了将独占设备改造成虚拟设备

实现原理

输入井和输出井

https://gitee.com/lienhui68/picStore/raw/master/null/20200715050108.png

输入进程和输出进程

https://gitee.com/lienhui68/picStore/raw/master/null/20200715050200.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200715050219.png

输入/输出缓冲区

https://gitee.com/lienhui68/picStore/raw/master/null/20200715050300.png

应用——共享打印机

https://gitee.com/lienhui68/picStore/raw/master/null/20200715050400.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200715050701.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200715050734.png

小结

https://gitee.com/lienhui68/picStore/raw/master/null/20200715050802.png

设备的分配与回收

设备分配时应该考虑的因素

  1. 设备的固有属性

    https://gitee.com/lienhui68/picStore/raw/master/null/20200715052405.png

  2. 设备分配算法

    先来先服务、优先级高者优先、短任务优先…

  3. 设备分配中的安全性

    https://gitee.com/lienhui68/picStore/raw/master/null/20200715052548.png

静态分配与动态分配

https://gitee.com/lienhui68/picStore/raw/master/null/20200715052622.png

设备分配管理中的数据结构

https://gitee.com/lienhui68/picStore/raw/master/null/20200715052805.png

设备控制表

https://gitee.com/lienhui68/picStore/raw/master/null/20200715052949.png

控制器控制表

https://gitee.com/lienhui68/picStore/raw/master/null/20200715053646.png

通道控制表

https://gitee.com/lienhui68/picStore/raw/master/null/20200715053727.png

系统设备表

https://gitee.com/lienhui68/picStore/raw/master/null/20200715053800.png

设备分配的步骤

https://gitee.com/lienhui68/picStore/raw/master/null/20200715053831.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200715053932.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200715054016.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200715054031.png

设备分配步骤的改进方法

https://gitee.com/lienhui68/picStore/raw/master/null/20200715054111.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200715054205.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200715054310.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200715054327.png

缓冲区

什么是缓冲区?有什么作用?

https://gitee.com/lienhui68/picStore/raw/master/null/20200715060420.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200715060644.png

单缓冲

https://gitee.com/lienhui68/picStore/raw/master/null/20200715060831.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200715060848.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200715060959.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200715061012.png

双缓冲

https://gitee.com/lienhui68/picStore/raw/master/null/20200715061030.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200715061041.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200715061059.png

使用单/双缓冲在通信时的区别

https://gitee.com/lienhui68/picStore/raw/master/null/20200715061159.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200715061208.png

循环缓冲区

https://gitee.com/lienhui68/picStore/raw/master/null/20200715061230.png

缓冲池

https://gitee.com/lienhui68/picStore/raw/master/null/20200715061403.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200715061423.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200715061434.png

https://gitee.com/lienhui68/picStore/raw/master/null/20200715061445.png

小结

https://gitee.com/lienhui68/picStore/raw/master/null/20200715061504.png