当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

《操作系统》课程教学资源(PPT课件)第十二章 I/O Systems(I/O系统)

资源类别:文库,文档格式:PPT,文档页数:21,文件大小:542KB,团购合买
Module12: Systems系统) 1、 I/Ohardwared(lo硬件) 2、Application Interface(应用程序l/O接口) 3、Kernel Subsystem(核心子系统) 4、Transforming I/O Requests to Hardware Operations(转换请求为硬件操作) 5、Performance(性能)
点击下载完整版文档(PPT)

Module12: lO Systems(O系统) lo hardwared(MO硬件) ° Application I/o Interface(应用程序Vo接口) ° Kernel l/o Subsystem(核心O子系统) Transforming l/O Requests to Hardware Operations (转换|O请求为硬件操作) Performance(性能) Applied Operating System Concepts 12.1 Silberschatz, Galvin, and Gagne @1999

12.1 Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts Module 12: I/O Systems(I/O系统) • I/O hardwared(I/O硬件) • Application I/O Interface(应用程序I/O接口) • Kernel I/O Subsystem(核心I/O子系统) • Transforming I/O Requests to Hardware Operations (转换I/O请求为硬件操作) • Performance(性能)

yo Hardware(O硬件) ° Incredible variety of l/o devices(难以置信的O设备种类) ° Common concepts(基本概念) Port(端口) Bus(daisy chain or shared direct access) (总线:菊花链或者共享总线) Controller( host adapter)(控制器,主机适配器) ● o instructions control devices(O指令控制设备) ° Devices have addresses, used by(设备的寻址方式) Direct l/o instructions(直接O指令) Memory-mapped l/O(存储器映射Wo指令) Applied Operating System Concepts 122 Silberschatz, Galvin, and Gagne @1999

12.2 Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts I/O Hardware(I/O硬件) • Incredible variety of I/O devices(难以置信的I/O设备种类) • Common concepts(基本概念) – Port (端口) – Bus (daisy chain or shared direct access) (总线:菊花链或者共享总线) – Controller (host adapter)(控制器,主机适配器) • I/O instructions control devices(I/O指令控制设备) • Devices have addresses, used by (设备的寻址方式) – Direct I/O instructions(直接I/O指令) – Memory-mapped I/O(存储器映射I/O指令)

Polling(轮询 Determines state of device(决定设备的状态) command- ready(等待命令) BusY(忙) Error(错误) Busy-wait cycle to wait for l/o from device (忙等待循环等待设备的O操作) Applied Operating System Concepts 123 Silberschatz, Galvin, and Gagne @1999

12.3 Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts Polling(轮询) • Determines state of device (决定设备的状态) – command-ready(等待命令) – Busy(忙) – Error(错误) • Busy-wait cycle to wait for I/O from device (忙等待循环等待设备的I/O操作)

interrupts(中断) CPU Interrupt request line triggered by l/o device (cPU的中断需要有WO设备的触发) Interrupt handler receives interrupts (中断处理例程接收中断) Maskable to ignore or delay some interrupts (通过屏蔽来忽略或者延迟某些中断) o Interrupt vector to dispatch interrupt to correct handler (中断向量给中断分配正确的中断处理例程) Based on priority(以优先级为基础) Some unmaskable(某些中断不可屏蔽) Interrupt mechanism also used for exceptions (中断机制也用在异常) Applied Operating System Concepts 12.4 Silberschatz, Galvin, and Gagne @1999

12.4 Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts Interrupts(中断) • CPU Interrupt request line triggered by I/O device (CPU的中断需要有I/O设备的触发) • Interrupt handler receives interrupts (中断处理例程接收中断) • Maskable to ignore or delay some interrupts (通过屏蔽来忽略或者延迟某些中断) • Interrupt vector to dispatch interrupt to correct handler (中断向量给中断分配正确的中断处理例程) – Based on priority(以优先级为基础) – Some unmaskable(某些中断不可屏蔽) • Interrupt mechanism also used for exceptions (中断机制也用在异常)

nterrupt- drive lO Cycle(中断驱动的Wo循环 1o controller device driver initiates CPU executing hecks for interrupts between instructions input ready, output omplete, or error CPU receiving interrupt. sina transfers control to nterrupt handler interrupt handler processes data. returns from interrupt CPU resumes processing of interrupted task Applied Operating System Concepts 12.5 Silberschatz, Galvin, and Gagne @1999

12.5 Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts Interrupt-drive I/O Cycle(中断驱动的I/O循环)

Direct Memory Access(直接内存存取) Used to avoid programmed w/o for large data movement (用来避免编程Ⅳo来传输大量的数据) ° Requires DMA controller(需要DMA控制器) Bypasses CPU to transfer data directly between I/O device and memory(绕过cPU来在O设备和内存之间直接传输数据 Applied Operating System Concepts 12 Silberschatz, Galvin, and Gagne @1999

12.6 Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts Direct Memory Access(直接内存存取) • Used to avoid programmed I/O for large data movement (用来避免编程I/O来传输大量的数据) • Requires DMA controller(需要DMA控制器) • Bypasses CPU to transfer data directly between I/O device and memory (绕过CPU来在I/O设备和内存之间直接传输数据)

Six step process to perform DMa transfer 道讨六 传输 1. device driver is told to transfer disk data to buffer at address x CPU DMA controller transfers 2 device driver tells disk bytes to buffer X controller to transfer c increasing memory bytes from disk to buffer cache address and decreasing at address x C until C= 0 6. when C=0. DMA interrupts CPU to signal DMA/bus/interrupt -CPU memory bus controller memorybuffer transfer completion PCI bus 3. disk controller initiates DMA transfer iDE disk controller 4. disk controller send each byte to DMA controller Applied Operating System Concepts 12.7 Silberschatz, Galvin, and Gagne @1999

12.7 Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts Six step process to perform DMA transfer (通过六步来完成DMA传输)

Application O Interface(应用程序JO接口) 1O system calls encapsulate device behaviors in generic classes (O子系统设备行为精简成几个常用的类别) e Device-driver layer hides differences among lo controllers from kernel(设备驱动层对核心隐藏了ⅣO控制器的不同细节) Devices vary in many dimensions(设备变化范围非常大) Character-stream or block(字符流或者块设备) Sequential or randon- access(顺序或随机设备) Sharable or dedicated(共享或独占设备) Speed of operation(操作速度的不同) read-write, read only, or write only(读写,只读,只写) Applied Operating System Concepts 128 Silberschatz, Galvin, and Gagne @1999

12.8 Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts Application I/O Interface(应用程序I/O接口) • I/O system calls encapsulate device behaviors in generic classes (I/O子系统设备行为精简成几个常用的类别) • Device-driver layer hides differences among I/O controllers from kernel(设备驱动层对核心隐藏了I/O控制器的不同细节) • Devices vary in many dimensions(设备变化范围非常大) – Character-stream or block(字符流或者块设备) – Sequential or random-access(顺序或随机设备) – Sharable or dedicated(共享或独占设备) – Speed of operation(操作速度的不同) – read-write, read only, or write only(读写,只读,只写)

Block and character devices(块或字符设备) Block devices include disk drives(块设备包括磁盘) Commands include read. write, seek (命令包括读,写,搜寻) Raw lo or file-system access (原始的O或文件系统存取) Memory-mapped file access possible (存储器映射文件访问的可能性) Character devices include keyboards, mice, serial ports (字符设备包括键盘,鼠标和串口设备) Commands include get,put(命令有 get, put) Libraries layered on top allow line editing (顶层的函数库允许行编辑) Applied Operating System Concepts 12 Silberschatz, Galvin, and Gagne @1999

12.9 Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts Block and Character Devices(块或字符设备) • Block devices include disk drives(块设备包括磁盘) – Commands include read, write, seek (命令包括读,写,搜寻) – Raw I/O or file-system access (原始的I/O或文件系统存取) – Memory-mapped file access possible (存储器映射文件访问的可能性) • Character devices include keyboards, mice, serial ports (字符设备包括键盘,鼠标和串口设备) – Commands include get, put(命令有get,put) – Libraries layered on top allow line editing (顶层的函数库允许行编辑)

Network devices(网络设备) Varying enough from block and character to have own interface (从块设备和字符设备变化而来,有独自的接口) Unix and windows/NT include socket interface (Unx和 Windows/nt包括 socket接口) l_ Separates network protocol from network operation (分离网络协议于网络操作) ncludes select functionality(包括 select功能) Approaches vary widely(pipes, FIFOs, streams, queues mailboxes)(方式广泛:管道,FFOs,流,队列,邮箱) Applied Operating System Concepts Silberschatz, Galvin, and Gagne @1999

12.10 Silberschatz, Galvin, and Gagne ©1999 Applied Operating System Concepts Network Devices(网络设备) • Varying enough from block and character to have own interface (从块设备和字符设备变化而来,有独自的接口) • Unix and Windows/NT include socket interface (Unix和Windows/NT包括socket接口) – Separates network protocol from network operation (分离网络协议于网络操作) – Includes select functionality(包括select功能) • Approaches vary widely (pipes, FIFOs, streams, queues, mailboxes)(方式广泛:管道,FIFOs,流,队列,邮箱)

点击下载完整版文档(PPT)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
共21页,试读已结束,阅读完整版请下载
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有