中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)13 IO管理 IO systems

Hardware and I/control methods ●Polling(轮询方式) ●Interrupts(中断方式) ●Direct Memory Access(DMA方式) oI/O hardware summary Application I/O Interface Block and Character Devices ●Network Devices ●Clocks and Timers ●Blocking(阻塞)and Nonblocking(非阻塞)l/O ③Kernel I/O Subsystem 1/O Scheduling ● Buffering(缓冲机制) Caching,Spooling device reservation o Error Handling ●l/O Protection Kernel Data Structures Transforming I/O Requests to Hardware Operations Performance 6小结 陈香兰xlanchen@ustc.edu.cn http:/作taf.u01174O1i:Operating System操作系统原理 May22,20193/54
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 提纲1 I/O Hardware and I/O control methods Polling (轮询方式) Interrupts (中断方式) Direct Memory Access (DMA方式) I/O hardware summary 2 Application I/O Interface Block and Character Devices Network Devices Clocks and Timers Blocking (阻塞) and Nonblocking (非阻塞) I/O 3 Kernel I/O Subsystem I/O Scheduling Buffering (缓冲机制) Caching, Spooling & device reservation Error Handling I/O Protection Kernel Data Structures 4 Transforming I/O Requests to Hardware Operations 5 Performance 6 小结 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 May 22, 2019 3 / 54

Overview o The role of OS in I/O is to manage and control I/O operations and I/O devices connected to the computer. Challenge:I/O devices vary widely. oHOW:a combination of HW and SW techniques. Chapter Objectives To explore the structure of an OS's I/O subsystem. To discuss the principles of I/O HW and its complexity. o To provide details of the performance aspects of I/O HW and SW. 口1回年走1,2月Q0 陈香兰xlanchen@ustc.edu.cn http:/staf仟.u011740i:Operating System操作系统原理 May22,20194/54
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview The role of OS in I/O is to manage and control I/O operations and I/O devices connected to the computer. Challenge: I/O devices vary widely. HOW: a combination of HW and SW techniques. Chapter Objectives To explore the structure of an OS’s I/O subsystem. To discuss the principles of I/O HW and its complexity. To provide details of the performance aspects of I/O HW and SW. 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 May 22, 2019 4 / 54

Outline 1/O Hardware and I/O control methods ●Polling(轮询方式) o Interrupts(中断方式) ●Direct Memory Access(DMA方式) o I/O hardware summary 口1⊙生年12月0C 陈话兰xlanchen@ustc.edu:cn http/staff.u0117401 Operating System操作系统原理斐 May22,20195/54
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Outline 1 I/O Hardware and I/O control methods Polling (轮询方式) Interrupts (中断方式) Direct Memory Access (DMA方式) I/O hardware summary 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 May 22, 2019 5 / 54

I/O Hardware overview o Incredible variety of I/O devices Processor-memory disk sybsystem disk monitor processor snq ISS disk cache disk graphics bridge/memory memon SCSI controller controller controller Fastevice bus: PCI bus Wires protocals IDE disk controller expansion bus interface keyboard disk Slow devige -expansion bus disk parallel serial port port Figure:A typical PC bus structure. 陈话兰xlanchen@ustc.edu:cn http:/staff.u0117401.Operating System操作系统原理 May22,20196/54
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I/O Hardware overview Incredible variety of I/O devices PCI bus graphics controller monitor bridge/memory controller processor memory cache SCSI controller SCSI bus disk disk disk disk IDE disk controller disk disk disk disk expansion bus interface expansion bus parallel port serial port keyboard bus: Wires & protocals Fast device Slow device Processor-memory sybsystem Figure: A typical PC bus structure. 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 May 22, 2019 6 / 54

1/O Hardware overview o Common concepts:CPU→PoRT→BUS→Controller -Port(端▣):the connection point via which a device communicates with the machine. ,Bus(总线):daisy chain(菊花链)or shared direct access *PCI(Peripheral Component Interconnect(外部器件互连)) SCSI(Small computer systems interface) ★Expansion bus ~Controller(控制器) Simple:serial port Complex:bus controller (host adapter),device controller 口⊙注,1,2月00 陈适兰xlanchen@ustc.edu.cn http:/staf.u01174O1:Operating System操作系统原理斐 May22,20196/54
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I/O Hardware overview Common concepts : CPU→PORT→BUS→Controller ▶ Port (端口): the connection point via which a device communicates with the machine. ▶ Bus (总线): daisy chain(菊花链) or shared direct access ⋆ PCI (Peripheral Component Interconnect(外部器件互连) ) ⋆ SCSI (Small computer systems interface) ⋆ Expansion bus ▶ Controller (控制器) ⋆ Simple: serial port ⋆ Complex: bus controller (host adapter), device controller 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 May 22, 2019 6 / 54

1/O Hardware overview o How can the processor command controller? Controller has one or more registers for data and control signals. The processor communicates with the controller by reading and writing bit patterns in the registers. o Two communication techniques: Direct l/O instructions Access the port address Each port typically contains of four registers,i.e.,status,control, data-in and data-out. Instructions:In,out ②Memory-mapped I/o Example:Oxa0000~Oxfffff are reserved to ISA graphics cards and BIOS routines Some systems use both techniques:PC as an example. 口18,走卡1,月00 陈话兰xlanchen@ustc.edu.cn http/staff.u0117401 Operating System操作系统原理斐 May22,20196/54
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I/O Hardware overview How can the processor command controller? ▶ Controller has one or more registers for data and control signals. ▶ The processor communicates with the controller by reading and writing bit patterns in the registers. Two communication techniques: 1 Direct I/O instructions ⋆ Access the port address ⋆ Each port typically contains of four registers, i.e., status, control, data-in and data-out. ⋆ Instructions: In, out 2 Memory-mapped I/O ⋆ Example: 0xa0000 ~ 0xfffff are reserved to ISA graphics cards and BIOS routines ▶ Some systems use both techniques: PC as an example. 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 May 22, 2019 6 / 54

I/O Hardware overview 1/O address range Device l/O Port Locations on PCs(partial) I/O address range device (hexadecimal) 000-00F DMA controller 020-021 interrupt controller 040-043 timer 200-20F game controller 2F8-2FF serial port(secondary) 320-32F hard-disk controller 378-37F parallel port 3D0-3DF graphics controller 3F0-3F7 diskette-drive controller 3F8-3FF serial port(primary) 东香兰xlanchen@ustc,edu.cn http:/staff..u011740i:Operating System操作系统原理 May22,20196/54
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I/O Hardware overview I/O address range Device I/O Port Locations on PCs (partial) I/O address range device (hexadecimal) 000-00F DMA controller 020-021 interrupt controller 040-043 timer 200-20F game controller 2F8-2FF serial port (secondary) 320-32F hard-disk controller 378-37F parallel port 3D0-3DF graphics controller 3F0-3F7 diskette-drive controller 3F8-3FF serial port (primary) 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 May 22, 2019 6 / 54

1/O Control Methods ●Polling(轮询方式) ②Interrupts(中断方式) ODMA(DMA方式) O(在汤书上:还有通道的概念) 口1⊙生年12月00 陈话兰xlanchen@ustc.edu.cn http/staff.u0117401 Operating System操作系统原理斐 May22,20197/54
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I/O Control Methods 1 Polling (轮询方式) 2 Interrupts (中断方式) 3 DMA (DMA方式) 4 (在汤书上:还有通道的概念) 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 May 22, 2019 7 / 54

Outline I/O Hardware and I/O control methods ●Polling(轮询方式) o Interrupts(中断方式) Direct Memory Access(DMA方式 o 1/O hardware summary 口1⊙生年12月00 东香兰xlanchen@ustc,edu.cn http:/staff..u0117401:Operating System操作系统原理 May22,20198/54
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Outline 1 I/O Hardware and I/O control methods Polling (轮询方式) Interrupts (中断方式) Direct Memory Access (DMA方式) I/O hardware summary 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 May 22, 2019 8 / 54

Polling(轮询方式) o Need handshaking(握手) o State of device command-ready In command register 1:a command is available for the controller busy In status register *0:ready for the next command;1:busy ③Error To indicate whether an l/O is ok. 口1⊙生年12月0C 陈话兰xlanchen@ustc.edu.cn http/staff.u0117401 Operating System操作系统原理斐 May22,20199/54
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Polling (轮询方式) Need handshaking (握手) State of device 1 command-ready ⋆ In command register ⋆ 1: a command is available for the controller 2 busy ⋆ In status register ⋆ 0: ready for the next command; 1: busy 3 Error ⋆ To indicate whether an I/O is ok. 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 May 22, 2019 9 / 54
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)12 外存 Mass Storage Systems.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)11 File 文件系统实现 File system implementation.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)10 文件系统接口 File System Interface.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)09 虚拟内存 Virtual Memory.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)08 Main Memory.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)07 Deadlock.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)06 Process Synchronization.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)05 Threads.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)04 CPU Scheduling.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)03 Processes.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)02 OS Structure.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)01 CS Structure.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)01 OS overview.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)课程简介(主讲:陈香兰).pdf
- 中国科学技术大学:《高级操作系统 Advanced Operating System》课程教学资源(PPT课件讲稿)第二章 分布式路由算法(2/2).ppt
- 中国科学技术大学:《高级操作系统 Advanced Operating System》课程教学资源(PPT课件讲稿)第二章 分布式路由算法主要内容(1/2,主讲:陈香兰).ppt
- 天津开放大学:《电子商务概论》课程教学资源(试卷习题)综合练习及答案.doc
- 国家开放大学:《计算机应用基础》课程教学资源(章节习题,含答案)计算机网络应用基础练习_第三章.doc
- 国家开放大学:《计算机应用基础》课程教学资源(章节习题,含答案)计算机安全练习_第七章.doc
- 国家开放大学:《计算机应用基础》课程教学资源(章节习题,含答案)计算机基础知识练习_第一章.doc
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(课件讲义)GNU开发工具链简介 GNU Tools(主讲:陈香兰).pdf
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(课件讲义)基于x86的Linux启动代码分析.pdf
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(课件讲义)制作简单的Linux系统.pdf
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(PPT课件讲稿)内存寻址.ppt
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(PPT课件讲稿)Linux进程管理(1/3).ppt
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(PPT课件讲稿)Linux进程管理(2/3).ppt
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(课件讲义)中断和异常.pdf
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(课件讲义)系统调用.pdf
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(PPT课件讲稿)Linux进程管理(3/3).ppt
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(课件讲义)内存管理.pdf
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(课件讲义)Linux中的时钟和定时测量.pdf
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(课件讲义)Linux中的进程地址空间.pdf
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(课件讲义)程序的执行.pdf
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(PPT课件讲稿)文件系统.ppt
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(PPT课件讲稿)管理I/O设备.ppt
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(PPT课件讲稿)Linux中的信号机制.ppt
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(PPT课件讲稿)进程的同步和通信.ppt
- 中国科学技术大学:《嵌入式操作系统 Embedded Operating Systems》课程教学资源(课件讲义)课程介绍(主讲:陈香兰).pdf
- 中国科学技术大学:《嵌入式操作系统 Embedded Operating Systems》课程教学资源(课件讲义)嵌入式系统及嵌入式软件开发概述.pdf
- 中国科学技术大学:《嵌入式操作系统 Embedded Operating Systems》课程教学资源(课件讲义)GNU(交又)开发工具链简介 GNU Tools.pdf