西安电子科技大学:《操作系统 Operating Systems》课程教学资源(PPT课件讲稿)Chapter 05 输入输出 Input/Output

Operating Systems Chapter 5: Input/Output 5,1 Principles of l/o hardwareⅣO硬件原理 5,2 Principles of lo software 10软件原理 4 5.3 10 software layers IO软件层次 H 5.4 Disks 盘 H 5.5 Clocks 时钟 56 Character- oriented terminals面向字符的终端 57 Graphical user interfaces图形用户界面 a 5.8 Network terminals 网络终端 耳59 Power management 电源管理 Gao Haichang, Software School, Xidian University 3
Operating Systems Gao Haichang , Software School, Xidian University 3 Chapter 5: Input/Output 5.1 Principles of I/O hardware I/O硬件原理 5.2 Principles of I/O software I/O软件原理 5.3 I/O software layers I/O软件层次 5.4 Disks 盘 5.5 Clocks 时钟 5.6 Character-oriented terminals 面向字符的终端 5.7 Graphical user interfaces 图形用户界面 5.8 Network terminals 网络终端 5.9 Power management 电源管理

Operating Systems oS control /o device g Main functions: u Send commands to the devices E Catch interrupts H Handle errors Provide an interface between the devices and the rest of the system that IS simple and easy to use e Device independence Gao Haichang, Software School, Xidian University
Operating Systems Gao Haichang , Software School, Xidian University 4 OS control I/O device Main functions: Send commands to the devices Catch interrupts Handle errors Provide an interface between the devices and the rest of the system that is simple and easy to use Device independence

Operating Systems Principles of 1/0 Hardware e Block device u Stores information in fixed -size blocks. each one with its own address I The essential property of a block device is that it is possible to read or write each block independently of all the other ones H Disks g Character device Delivers or accepts a stream of characters, without regard to any block structure w It is not addressable and does not have any seek operation t Printers. network interfaces. mouse Other device A cloc k Gao Haichang, Software School, Xidian University
Operating Systems Gao Haichang , Software School, Xidian University 5 Principles of I/O Hardware Block device Stores information in fixed-size blocks, each one with its own address. The essential property of a block device is that it is possible to read or write each block independently of all the other ones. Disks Character device Delivers or accepts a stream of characters, without regard to any block structure. It is not addressable and does not have any seek operation. Printers, network interfaces, mouse Other device clock

Operating Systems Principles of 1/0 Hardware Device Data rate Some typical Keyboard I 10 bytes/sec M 100 bytes/sec device network 56K modem 7 KB/sec and data base Telephone channel 8 KB/sec Dual ISDN lines 16 KB/sec rates Laser printer 100 KB/sec Scanner 400 KB/sec Classic Ethernet 1.25 MB/sec USB(Universal Serial Bus) 1.5 MB/sec Digital camcorder 4 MB/sec IDE disk 5 MB/sec 40X CD-ROM 6 MB/sec Fast Ethernet 12.5 MB/sec ISA bus 16.7 MB/sec EIDE(ATA-2)disk 16.7 MB/sec FireWire(IEEE 1394)50 MB/sec XGA Monitor 60 MB/sec SONET OC-12 network 78 MB/sec SCSI Ultra 2 disk 80 MB/sec Gigabit Ethernet 125 MB/sec Ultrium tape 320 MB/sec PCI bus 528 MB/s sec Sun Gigaplane XB backplane 20 GB/sec ao Haichang, software school, xidian Universl
Operating Systems Gao Haichang , Software School, Xidian University 6 Principles of I/O Hardware Some typical device, network, and data base rates

Operating Systems Device controllers elo devices have components A mechanical component device E electronic component g The electronic component is the device controller E may be able to handle multiple devices g Controller's tasks w Convert the serial bit stream into a block of bytes H Perform any error correction necessary H Copy it to main memory Gao Haichang, Software School, Xidian University
Operating Systems Gao Haichang , Software School, Xidian University 7 Device Controllers I/O devices have components: mechanical component (device) electronic component The electronic component is the device controller may be able to handle multiple devices Controller's tasks Convert the serial bit stream into a block of bytes Perform any error correction necessary Copy it to main memory

Operating Systems Memory-Mapped 1/0 c Each controller has a few registers that are used for communication with cpu g Write into these registers os can command the device to deliver data accept data, switch itselfon or off, or otherwise perform some action G Read from these registers: OS can learn what the devices state is whether it is prepared to accept a new command, and so on c In addition to the control registers, many devices have a data buffer that the os can read and write(e.g video ram) c Q: How the CPU communicates with the control registers and the device data buffer? Gao Haichang, Software School, Xidian University
Operating Systems Gao Haichang , Software School, Xidian University 8 Memory-Mapped I/O Each controller has a few registers that are used for communication with CPU. Write into these registers: OS can command the device to deliver data, accept data, switch itself on or off, or otherwise perform some action. Read from these registers: OS can learn what the device’s state is, whether it is prepared to accept a new command, and so on. In addition to the control registers, many devices have a data buffer that the OS can read and write (e.g. video RAM). Q: How the CPU communicates with the control registers and the device data buffer?

Operating Systems Memory-Mapped 1/0(2) Two address One address space Two address spaces OxFFFF Memory 1O ports 0 (a) (a)Separate 1o and memory space(IBM360) w Each control register is assigned an lo port number H Address spaces for memory and 1/O are different (b)Memory-mapped l/o(PDP-11) w Map all the control registers into the memory space H Each control register is assigned a unique memory address to which no memory is assigned (c) Hybrid(Pentium) H Memory-mapped 1/O data buffers, separate IO ports for the control registers
Operating Systems Gao Haichang , Software School, Xidian University 9 Memory-Mapped I/O (2) (a) Separate I/O and memory space (IBM 360) Each control register is assigned an I/O port number. Address spaces for memory and I/O are different (b) Memory-mapped I/O (PDP-11) Map all the control registers into the memory space. Each control register is assigned a unique memory address to which no memory is assigned. (c) Hybrid (Pentium) Memory-mapped I/O data buffers , separate I/O ports for the control registers

Operating Systems Memory-Mapped 1/0 Advantages G With memory-mapped 1O, a lo device driver can be written entirely in C. Otherwise, some assembly code is needed No special protection mechanism is needed to keep user processes from performing 10. G Every instructions that can reference memory can also reference control registers. Gao Haichang, Software School, Xidian University 10
Operating Systems Gao Haichang , Software School, Xidian University 10 Memory-Mapped I/O Advantages With memory-mapped I/O, a I/O device driver can be written entirely in C. Otherwise, some assembly code is needed. No special protection mechanism is needed to keep user processes from performing I/O. Every instructions that can reference memory can also reference control registers

Operating Systems Memory-Mapped 1/0 Disadvantages e Most computers nowadays have some form of caching of memory words. Caching a device control register would be disastrous(blind to device ready) Selective disable caching adds extra complexity. G If there is only one address space then all memory modules and all lo devices must examine all memory references to see which ones to response to. Most modern computers have a dedicated high-speed memory bus, so O device have no way of seeing memory addresses as they go by on the memory bus. Gao Haichang, Software School, Xidian University
Operating Systems Gao Haichang , Software School, Xidian University 11 Memory-Mapped I/O Disadvantages Most computers nowadays have some form of caching of memory words. Caching a device control register would be disastrous (blind to device ready). Selective disable caching adds extra complexity. If there is only one address space, then all memory modules and all I/O devices must examine all memory references to see which ones to response to. Most modern computers have a dedicated high-speed memory bus, so I/O device have no way of seeing memory addresses as they go by on the memory bus

Operating Systems Memory-Mapped 1/0 Disadvantages CPU reads and writes of memory go over this high-bandwidth bus CPU Memory CPU Memory O All addresses( memory This memory port is to allow l/o devices and / o)go here Bu access to memory (a)a single-bus architecture (b )a dual-bus memory architecture Gao Haichang, Software School, Xidian University 12
Operating Systems Gao Haichang , Software School, Xidian University 12 Memory-Mapped I/O Disadvantages (a) A single-bus architecture (b) A dual-bus memory architecture
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《人工智能》课程教学资源(PPT课件讲稿)Ch10 Auto-encoders(Auto and variational encoders v.9r6).pptx
- 《ARM Cortex-M3权威指南》课程教学资源(PPT课件讲稿)Cortex M3 存储系统访问.pptx
- 北京师范大学现代远程教育:《计算机应用基础》课程教学资源(PPT课件讲稿)第四篇 数据处理与数据分析.ppsx
- 《数字图像处理》课程教学资源(PPT课件讲稿)第八章 形态学处理.ppt
- 《计算机网络技术及应用》课程教学资源(PPT课件讲稿)第十一章 网络安全.ppt
- 《人工智能》课程教学资源(PPT课件讲稿)第13章 智能优化计算简介.ppt
- 清华大学出版社:《计算机网络安全与应用技术》课程教学资源(PPT课件讲稿)第5章 Windows NT/2000的安全与保护措施.ppt
- 上海交通大学:《计算机组成原理 Computer Organization》课程教学资源(PPT课件讲稿)Chapter 4A The Processor, Part A.pptx
- 香港城市大学:PERFORMANCE ANALYSIS OF CIRCUIT SWITCHED NETWORKS(PPT讲稿).pptx
- 《结构化程序设计》课程教学资源(PPT课件讲稿)第4章 VB控制结构.ppt
- 安徽理工大学:《算法设计与分析 Algorithm Design and Analysis》课程教学资源(PPT课件讲稿)第一章 导引与基本数据结构.ppt
- 四川大学:《操作系统 Operating System》课程教学资源(PPT课件讲稿)Chapter 1 Computer System Overview.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)分布对象 Distributed Objects(1).ppt
- 《C语言程序设计》课程教学资源(PPT课件讲稿)第10章 指针.ppt
- 北京大学:《高级软件工程》课程教学资源(PPT课件讲稿)第九讲 静态代码的可信性分析概述.ppt
- 澳门大学:统计机器翻译领域适应性研究 Domain Adaptation for Statistical Machine Translation Master Defense.pptx
- 山东大学:《数据结构》课程教学资源(PPT课件讲稿)第5章 堆栈(STACKS)Restricted version of a linear list.ppt
- 《C语言程序设计》课程教学资源(PPT课件讲稿)第2章 数据类型与常用库函数.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)设计模式 Design Pattern(3).ppt
- 安徽理工大学:《汇编语言》课程教学资源(PPT课件讲稿)第二章 80x86计算机组织.ppt
- 《计算机应用基础》课程教学资源(PPT课件讲稿)第5章 文件文档工具.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)敏捷软件开发 Agile Software Development.ppt
- 《信息安全工程》课程教学资源(PPT课件讲稿)第3章 密码学基础.ppt
- 中国科学技术大学:《计算机体系结构》课程教学资源(PPT课件讲稿)RISC-V指令集及简单实现.pptx
- 电子科技大学:《计算机操作系统》课程教学资源(PPT课件讲稿)第三章 存储管理 Memory Management.ppt
- 《C语言教程》课程教学资源(PPT课件讲稿)第三章 C语言程序设计初步.ppt
- 《数据结构》课程教学资源(PPT课件讲稿)第十章 内部排序.ppt
- 清华大学:A Pivotal Prefix Based Filtering Algorithm for String Similarity Search(PPT讲稿).pptx
- 河南中医药大学(河南中医学院):《计算机文化》课程教学资源(PPT课件讲稿)第四章 计算机软件系统(主讲:许成刚、阮晓龙).ppt
- 《人工智能技术导论》课程教学资源(PPT课件讲稿)第1章 人工智能概述.ppt
- 山东大学:《微机原理及单片机接口技术》课程教学资源(PPT课件讲稿)第八章 数据通信.ppt
- 信息和通信技术ICT(PPT讲稿)浅谈信息技术和低碳经济(中国科学技术大学:王煦法).ppt
- 北京大学:网络信息体系结构(PPT讲稿)Web-based Information Architecture.ppt
- P2P Tutorial(PPT讲稿).ppt
- 微软分布式计算技术(PPT讲稿)Dryad and DryadLINQ.ppt
- 《数字图像处理》课程教学资源(PPT课件)第6章 图像复原.ppt
- 电子工业出版社:《计算机网络》课程教学资源(第五版,PPT课件讲稿)第三章 数据链路层.ppt
- 《单片机应用技术》课程PPT教学课件(C语言版)第8章 MCS-51单片机串行通信接口.ppt
- 操作系统原理(PPT讲稿)Windows OS Principles(Windows XP).pps
- 淮阴工学院:《数据库原理》课程教学资源(PPT课件讲稿)第1章 数据库概论(主讲:冯万利).pps