




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、13.2ni/o hardwarenapplication i/o interfacenkernel i/o subsystemntransforming i/o requests to hardware operationsnstreamsnperformance13.3nexplore the structure of an operating systems i/o subsystemndiscuss the principles of i/o hardware and its complexitynprovide details of the performance aspects o
2、f i/o hardware and software13.4nincredible variety of i/o devicesncommon conceptslport lbus (daisy chain or shared direct access)lcontroller (host adapter)ni/o instructions control devicesndevices have addresses, used by ldirect i/o instructionslmemory-mapped i/o13.513.613.7ndetermines state of devi
3、ce lcommand-readylbusylerrornbusy-wait cycle to wait for i/o from device13.8ncpu interrupt-request line triggered by i/o deviceninterrupt handler receives interruptsnmaskable to ignore or delay some interruptsninterrupt vector to dispatch interrupt to correct handlerlbased on prioritylsome nonmaskab
4、leninterrupt mechanism also used for exceptions13.913.1013.11nused to avoid programmed i/o for large data movement nrequires dma controllernbypasses cpu to transfer data directly between i/o device and memory 13.1213.13ni/o system calls encapsulate device behaviors in generic classesndevice-driver l
5、ayer hides differences among i/o controllers from kernelndevices vary in many dimensionslcharacter-stream or blocklsequential or random-accesslsharable or dedicatedlspeed of operationlread-write, read only, or write only13.1413.1513.16nblock devices include disk driveslcommands include read, write,
6、seek lraw i/o or file-system accesslmemory-mapped file access possiblencharacter devices include keyboards, mice, serial portslcommands include get, putllibraries layered on top allow line editing13.17nvarying enough from block and character to have own interfacenunix and windows nt/9x/2000 include
7、socket interfacelseparates network protocol from network operationlincludes select functionalitynapproaches vary widely (pipes, fifos, streams, queues, mailboxes)13.18nprovide current time, elapsed time, timernprogrammable interval timer used for timings, periodic interruptsnioctl (on unix) covers o
8、dd aspects of i/o such as clocks and timers13.19nblocking - process suspended until i/o completedleasy to use and understandlinsufficient for some needsnnonblocking - i/o call returns as much as availableluser interface, data copy (buffered i/o)limplemented via multi-threadinglreturns quickly with c
9、ount of bytes read or writtennasynchronous - process runs while i/o executesldifficult to useli/o subsystem signals process when i/o completed13.20synchronousasynchronous13.21nschedulinglsome i/o request ordering via per-device queuelsome oss try fairnessnbuffering - store data in memory while trans
10、ferring between deviceslto cope with device speed mismatchlto cope with device transfer size mismatchlto maintain “copy semantics”13.2213.2313.24ncaching - fast memory holding copy of datalalways just a copylkey to performancenspooling - hold output for a devicelif device can serve only one request
11、at a time li.e., printingndevice reservation - provides exclusive access to a devicelsystem calls for allocation and deallocationlwatch out for deadlock13.25nos can recover from disk read, device unavailable, transient write failuresnmost return an error number or code when i/o request fails nsystem
12、 error logs hold problem reports13.26nuser process may accidentally or purposefully attempt to disrupt normal operation via illegal i/o instructionslall i/o instructions defined to be privilegedli/o must be performed via system calls4memory-mapped and i/o port memory locations must be protected too1
13、3.2713.28nkernel keeps state info for i/o components, including open file tables, network connections, character device statenmany, many complex data structures to track buffers, memory allocation, “dirty” blocksnsome use object-oriented methods and message passing to implement i/o13.2913.30nconside
14、r reading a file from disk for a process: ldetermine device holding file ltranslate name to device representationlphysically read data from disk into bufferlmake data available to requesting processlreturn control to process13.3113.32nstream a full-duplex communication channel between a user-level p
15、rocess and a device in unix system v and beyondna stream consists of:- stream head interfaces with the user process- driver end interfaces with the device- zero or more stream modules between them.neach module contains a read queue and a write queuenmessage passing is used to communicate between queues13.3313.34ni/o a major factor in system performance:ldemands cpu to execute device driver, kernel i/o codelcontext switches due to interruptsldata copyinglnetwork tr
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- GB/T 45505.1-2025平板显示器基板玻璃测试方法第1部分:外观与几何尺寸
- 物业服务企业绩效考核实施方案
- 2025年游戏开发行业招聘面试模拟题集及答案解析
- 2025年金融投资从业者必-备资质考试预测试题及答案
- 危废泄漏专项应急处理方案(范文示范)
- 2025年融媒体编辑笔试题目解析
- 2025年道路运输企业安全生产管理人员作业考试题库(附答案)
- 2025年注册验船师资格考试(A级船舶检验专业基础环境与人员保护)测试题及答案一
- 2026届海南省儋州市一中高一化学第一学期期中教学质量检测模拟试题含解析
- 2025年可持续发展与环境管理考试试题及答案
- 2025年科研项目经理专业知识考试题目答案解析
- 2025广东肇庆市怀集县卫生事业单位招聘102人笔试模拟试题及答案解析
- 青马考试题目及答案
- 算力中心计算任务优化方案
- 劳务派遣工作知识培训课件
- 无人机反制设备原理课件
- 北京市2025年普通高中学业水平等级性考试政治试题(解析版)
- 2025年村干部考试试题(含答案)
- 新华书店招聘面试题库全攻略:行业知识、技能与面试技巧
- 幼儿园2025年度保育员模拟考试试题试题(附答案)
- 软件系统供货、安装进度计划及保证措施
评论
0/150
提交评论