




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
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 aspec
2、ts of 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
3、device 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 nonma
4、skablenInterrupt 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-driv
5、er layer 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, wri
6、te, 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 incl
7、ude 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) cove
8、rs odd 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 wi
9、th count 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 t
10、ransferring 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 requ
11、est 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 nSy
12、stem 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
13、too13.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.30nCon
14、sider 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-lev
15、el process 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 traff
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 收廢鐵基礎(chǔ)知識(shí)培訓(xùn)內(nèi)容課件
- 2025年養(yǎng)生知識(shí)競(jìng)賽試題及答案
- 播音主持培訓(xùn)課件社團(tuán)
- 播音與主持社團(tuán)課件
- 2025年水上交通安全責(zé)任協(xié)議
- 2025社會(huì)工作者面試試題及答案
- 摸魚(yú)兒-雁丘詞課件
- 2025年國(guó)家工作人員學(xué)法用法考試題庫(kù)附參考答案
- 2025年社會(huì)工作者《初級(jí)實(shí)務(wù)》考試真題及答案
- 2024年保險(xiǎn)行業(yè)人員(保險(xiǎn)學(xué)教程)基礎(chǔ)知識(shí)試題與答案
- 中小學(xué)家訪管理制度
- 渣土消納場(chǎng)管理制度
- 2025年現(xiàn)代通信技術(shù)基礎(chǔ)與應(yīng)用考試卷及答案
- 2025年度廣州經(jīng)營(yíng)性用地供地藍(lán)皮書(shū)
- 預(yù)防老年人保健品詐騙
- 工業(yè)互聯(lián)網(wǎng)與石化化工行業(yè)融合應(yīng)用參考指南(2025年)
- 2025山西航空產(chǎn)業(yè)集團(tuán)有限公司校園招聘(第一批)43人筆試參考題庫(kù)附帶答案詳解
- 基于AI的網(wǎng)絡(luò)輿情數(shù)據(jù)采集與特征提取方法-洞察闡釋
- 新修完整版:抖音網(wǎng)紅駐簽約合作合同3篇
- 礦石運(yùn)輸居間合同范本
- 2025年湖北省公務(wù)員錄用考試《行測(cè)》真題及答案解析(記憶版)
評(píng)論
0/150
提交評(píng)論