资源描述:
《中山大学软件学院操作系统概念上课课件第13章.ppt》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、Chapter13:I/OSystemsChapter13:I/OSystemsI/OHardwareApplicationI/OInterfaceKernelI/OSubsystemTransformingI/ORequeststoHardwareOperationsSTREAMSPerformanceObjectivesExplorethestructureofanoperatingsystem’sI/OsubsystemDiscusstheprinciplesofI/OhardwareanditscomplexityProvidedetailsof
2、theperformanceaspectsofI/OhardwareandsoftwareOverviewI/OmanagementisamajorcomponentofoperatingsystemdesignandoperationImportantaspectofcomputeroperationI/OdevicesvarygreatlyVariousmethodstocontrolthemPerformancemanagementNewtypesofdevicesfrequentPorts,busses,devicecontrollersconn
3、ecttovariousdevicesDevicedriversencapsulatedevicedetailsPresentuniformdevice-accessinterfacetoI/OsubsystemI/OHardwareIncrediblevarietyofI/OdevicesStorageTransmissionHuman-interfaceCommonconcepts–signalsfromI/OdevicesinterfacewithcomputerPort–connectionpointfordeviceBus-daisychain
4、orshareddirectaccessController(hostadapter)–electronicsthatoperateport,bus,deviceSometimesintegratedSometimesseparatecircuitboard(hostadapter)Containsprocessor,microcode,privatememory,buscontroller,etcSometalktoper-devicecontrollerwithbuscontroller,microcode,memory,etcATypicalPCB
5、usStructureI/OHardware(Cont.)I/OinstructionscontroldevicesDevicesusuallyhaveregisterswheredevicedriverplacescommands,addresses,anddatatowrite,orreaddatafromregistersaftercommandexecutionData-inregister,data-outregister,statusregister,controlregisterTypically1-4bytes,orFIFObufferD
6、eviceshaveaddresses,usedbyDirectI/OinstructionsMemory-mappedI/ODevicedataandcommandregistersmappedtoprocessoraddressspaceEspeciallyforlargeaddressspaces(graphics)DeviceI/OPortLocationsonPCs(partial)PollingForeachbyteofI/OReadbusybitfromstatusregisteruntil0Hostsetsreadorwritebitan
7、difwritecopiesdataintodata-outregisterHostsetscommand-readybitControllersetsbusybit,executestransferControllerclearsbusybit,errorbit,command-readybitwhentransferdoneStep1isbusy-waitcycletowaitforI/OfromdeviceReasonableifdeviceisfastButinefficientifdeviceslowCPUswitchestoothertask
8、s?Butifmissacycledataoverwritten/lostInt