您好,欢迎访问三七文档
Chapter12:MassStorageStructure沈卓炜h@dzwshen@seu.edu.cn四牌楼校区文正楼南205,83790819-802九龙湖校区计算机楼316Chapter12:Mass-StorageStSystemsDiskStructureDikAtthtDiskAttachmentDiskSchedulinggDiskManagementSSMtSwap-SpaceManagementRAIDStructureStable-StorageImplementationTertiaryStorageDevicesOperatingSystemIssuesCollegeofSoftwareEngineering,SoutheastUniversity14.2OperatingSystemConceptsOperatingSystemIssuesPerformanceIssuesCollegeofSoftwareEngineering,SoutheastUniversity14.3OperatingSystemConceptsDiskHardware(Cont.)()DiskparametersfortheoriginalIBMPCfloppydiskandaWesternDigitalWD18300hardCollegeofSoftwareEngineering,SoutheastUniversity14.4OperatingSystemConceptsgdiskDiskStructureDiskdrivesareaddressedaslarge1-dimensionalarraysoflogicalblocks,wheretheyg,logicalblockisthesmallestunitoftransfer.The1-dimensionalarrayoflogicalblocksismappedintothesectorsofthedisksequentially.Sector0isthefirstsectorofthefirsttrackontheoutermostcylinder.MappingproceedsinorderthroughthattrackthenMappingproceedsinorderthroughthattrack,thentherestofthetracksinthatcylinder,andthenthroughtherestofthecylindersfromoutermosttoCollegeofSoftwareEngineering,SoutheastUniversity14.5OperatingSystemConceptsthroughtherestofthecylindersfromoutermosttoinnermost.DiskAttachmentsttacetDisksmabeattachedoneoftoasDisksmaybeattachedoneoftwoways:1.HostattachedviaanI/Oport2.NetworkattachedviaanetworkconnectionCollegeofSoftwareEngineering,SoutheastUniversity14.6OperatingSystemConceptsNetwork-AttachedStorageCollegeofSoftwareEngineering,SoutheastUniversity14.7OperatingSystemConceptsStorage-AreaNetworkCollegeofSoftwareEngineering,SoutheastUniversity14.8OperatingSystemConceptsDiskSchedulingsScedugTheoperatingsystemisresponsibleforusinghardwareefficiently—forthediskusinghardwareefficientlyforthediskdrives,thismeanshavingafastaccesstimeanddiskbandwidthanddiskbandwidth.AccesstimehastwomajorcomponentsSeektimeisthetimeforthediskaretomovetheheadstothecylindercontainingthedesiredygsector.RotationallatencyistheadditionaltimewaitingRotationallatencyistheadditionaltimewaitingforthedisktorotatethedesiredsectortothediskheadCollegeofSoftwareEngineering,SoutheastUniversity14.9OperatingSystemConceptsdiskhead.DiskScheduling(Cont.)sScedug(Cot)MinimizeseektimeMinimizeseektimeSeektime≈seekdistanceDiskbandwidthisthetotalnumberofbytestransferred,dividedbythetotaltimetransferred,dividedbythetotaltimebetweenthefirstrequestforserviceandthecompletionofthelasttransfercompletionofthelasttransfer.CollegeofSoftwareEngineering,SoutheastUniversity14.10OperatingSystemConceptsDiskScheduling(Cont.)sScedug(Cot)SeeralalgorithmseisttoschedletheSeveralalgorithmsexisttoscheduletheservicingofdiskI/Orequests.Weillustratethemwitharequestqueue(0-199)199).981833712214124656798,183,37,122,14,124,65,67Headpointer53CollegeofSoftwareEngineering,SoutheastUniversity14.11OperatingSystemConceptsFCFSIllustrationshowstotalheadmovementof640cylinders.CollegeofSoftwareEngineering,SoutheastUniversity14.12OperatingSystemConceptsSSTF(ShortestSeekTimeFirst)SS(SotestSeeest)SelectsthereqestiththeminimmseekSelectstherequestwiththeminimumseektimefromthecurrentheadposition.SSTFschedulingisaformofSJFscheduling;maycausestarvationofsomescheduling;maycausestarvationofsomerequests.IllttihttlhdtfIllustrationshowstotalheadmovementof236cylinders.CollegeofSoftwareEngineering,SoutheastUniversity14.13OperatingSystemConceptsSSTF(Cont.)SS(Cot)CollegeofSoftwareEngineering,SoutheastUniversity14.14OperatingSystemConceptsSCANSCThediskarmstartsatoneendofthediskThediskarmstartsatoneendofthedisk,andmovestowardtheotherend,servicingrequestsuntilitgetstotheotherendofthedisk,wheretheheadmovementisreversed,andservicingcontinues.SometimescalledtheelevatoralgorithmSometimescalledtheelevatoralgorithm.Illustrationshowstotalheadmovementof208cylinders.CollegeofSoftwareEngineering,SoutheastUniversity14.15OperatingSystemConceptsSCAN(Cont.)SC(Cot)CollegeofSoftwareEngineering,SoutheastUniversity14.16OperatingSystemConceptsC-SCANCSCProvidesamoreuniformwaittimethanSCANSCAN.Theheadmovesfromoneendofthedisktotheother.servicingrequestsasitgoes.WhenitreachestheotherendhoweveritWhenitreachestheotherend,however,itimmediatelyreturnstothebeginningofthedikithtiitthdisk,withoutservicinganyrequestsonthereturntrip.TreatsthecylindersasacircularlistthatwrapsaroundfromthelastcylindertotheCollegeofSoftwareEngineering,SoutheastUniversity14.17OperatingSystemConceptswrapsaroundfromthelastcylindertothefirstone.C-SCAN(Cont.)CSC(Cot)CollegeofSoftwareEngineering,SoutheastUniversity14.18OperatingSystemConceptsC-LOOKCOOVersionofCSCANVersionofC-SCANArmonlygoesasfarasthelastrequestinygqeachdirection,thenreversesdirectionimmediatelywithoutfirstgoingallthewaytoimmediately,withoutfirstgoingallthewaytotheendofthedisk.CollegeofSoftwareEngineering,SoutheastUniversity14.19OperatingSystemConceptsC-LOOK(Cont.)COO(Cot)CollegeofSoftwareEngineering,SoutheastUniversity14.20OperatingSystemConceptsSelectingaDisk-SchedulingAlithAlgorithmSSTFiscommonandhasanaturalappealSSTFiscommo
本文标题:操作系统原理12
链接地址:https://www.777doc.com/doc-4221756 .html