章系统概述硬件应用程序接口内核ch13.pptx
Chapter13:I/OSystems
Chapter13:I/OSystemsOverviewI/OHardwareApplicationI/OInterfaceKernelI/OSubsystemTransformingI/ORequeststoHardwareOperationsSTREAMSPerformance
ObjectivesExplorethestructureofanoperatingsystem’sI/OsubsystemDiscusstheprinciplesofI/OhardwareanditscomplexityProvidedetailsoftheperformanceaspectsofI/Ohardwareandsoftware
OverviewI/OmanagementisamajorcomponentofoperatingsystemdesignandoperationImportantaspectofcomputeroperationI/OdevicesvarygreatlyVariousmethodstocontrolthemPerformancemanagementNewtypesofdevicesfrequentPorts,busses,devicecontrollersconnecttovariousdevicesDevicedriversencapsulatedevicedetailsPresentuniformdevice-accessinterfacetoI/Osubsystem
I/OHardwareIncrediblevarietyofI/OdevicesStorageTransmissionHuman-interfaceCommonconcepts–signalsfromI/OdevicesinterfacewithcomputerPort–connectionpointfordeviceBus-daisychainorshareddirectaccessPCIbuscommoninPCsandservers,PCIExpress(PCIe)expansionbusconnectsrelativelyslowdevicesController(hostadapter)–electronicsthatoperateport,bus,deviceSometimesintegratedSometimesseparatecircuitboard(hostadapter)Containsprocessor,microcode,privatememory,buscontroller,etcSometalktoper-devicecontrollerwithbuscontroller,microcode,memory,etc
ATypicalPCBusStructure
I/OHardware(Cont.)I/OinstructionscontroldevicesDevicesusuallyhaveregisterswheredevicedriverplacescommands,addresses,anddatatowrite,orreaddatafromregistersaftercommandexecutionData-inregister,data-outregister,statusregister,controlregisterTypically1-4bytes,orFIFObufferDeviceshaveaddresses,usedbyDirectI/OinstructionsMemory-mappedI/ODevicedataandcommandregistersmappedtoprocessoraddressspaceEspeciallyforlargeaddressspaces(graphics)
DeviceI/OPortLocationsonPCs(partial)
PollingForeachbyteofI/OReadbusybitfromstatusregisteruntil0