操作系统原理12

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

Chapter12:MassStorageStructure沈卓炜h@dzwshen@seu.edu.cn四牌楼校区文正楼南205,83790819-802九龙湖校区计算机楼316Chapter12:Mass-StorageStSystems„DiskStructure„DikAttht„DiskAttachment„DiskSchedulingg„DiskManagementSSMt„Swap-SpaceManagement„RAIDStructure„Stable-StorageImplementation„TertiaryStorageDevices„OperatingSystemIssuesCollegeofSoftwareEngineering,SoutheastUniversity14.2OperatingSystemConcepts„OperatingSystemIssues„PerformanceIssuesCollegeofSoftwareEngineering,SoutheastUniversity14.3OperatingSystemConceptsDiskHardware(Cont.)()DiskparametersfortheoriginalIBMPCfloppydiskandaWesternDigitalWD18300hardCollegeofSoftwareEngineering,SoutheastUniversity14.4OperatingSystemConceptsgdiskDiskStructure„Diskdrivesareaddressedaslarge1-dimensionalarraysoflogicalblocks,wheretheyg,logicalblockisthesmallestunitoftransfer.„The1-dimensionalarrayoflogicalblocksismappedintothesectorsofthedisksequentially.‹Sector0isthefirstsectorofthefirsttrackontheoutermostcylinder.‹Mappingproceedsinorderthroughthattrackthen‹Mappingproceedsinorderthroughthattrack,thentherestofthetracksinthatcylinder,andthenthroughtherestofthecylindersfromoutermosttoCollegeofSoftwareEngineering,SoutheastUniversity14.5OperatingSystemConceptsthroughtherestofthecylindersfromoutermosttoinnermost.DiskAttachmentsttacet„Disksmabeattachedoneoftoas„Disksmaybeattachedoneoftwoways:1.HostattachedviaanI/Oport2.NetworkattachedviaanetworkconnectionCollegeofSoftwareEngineering,SoutheastUniversity14.6OperatingSystemConceptsNetwork-AttachedStorageCollegeofSoftwareEngineering,SoutheastUniversity14.7OperatingSystemConceptsStorage-AreaNetworkCollegeofSoftwareEngineering,SoutheastUniversity14.8OperatingSystemConceptsDiskSchedulingsScedug„Theoperatingsystemisresponsibleforusinghardwareefficiently—forthediskusinghardwareefficientlyforthediskdrives,thismeanshavingafastaccesstimeanddiskbandwidthanddiskbandwidth.„Accesstimehastwomajorcomponents‹Seektimeisthetimeforthediskaretomovetheheadstothecylindercontainingthedesiredygsector.‹Rotationallatencyistheadditionaltimewaiting‹RotationallatencyistheadditionaltimewaitingforthedisktorotatethedesiredsectortothediskheadCollegeofSoftwareEngineering,SoutheastUniversity14.9OperatingSystemConceptsdiskhead.DiskScheduling(Cont.)sScedug(Cot)„Minimizeseektime„Minimizeseektime„Seektime≈seekdistance„Diskbandwidthisthetotalnumberofbytestransferred,dividedbythetotaltimetransferred,dividedbythetotaltimebetweenthefirstrequestforserviceandthecompletionofthelasttransfercompletionofthelasttransfer.CollegeofSoftwareEngineering,SoutheastUniversity14.10OperatingSystemConceptsDiskScheduling(Cont.)sScedug(Cot)„Seeralalgorithmseisttoschedlethe„SeveralalgorithmsexisttoscheduletheservicingofdiskI/Orequests.„Weillustratethemwitharequestqueue(0-199)199).981833712214124656798,183,37,122,14,124,65,67Headpointer53CollegeofSoftwareEngineering,SoutheastUniversity14.11OperatingSystemConceptsFCFSIllustrationshowstotalheadmovementof640cylinders.CollegeofSoftwareEngineering,SoutheastUniversity14.12OperatingSystemConceptsSSTF(ShortestSeekTimeFirst)SS(SotestSeeest)„Selectsthereqestiththeminimmseek„Selectstherequestwiththeminimumseektimefromthecurrentheadposition.„SSTFschedulingisaformofSJFscheduling;maycausestarvationofsomescheduling;maycausestarvationofsomerequests.Illttihttlhdtf„Illustrationshowstotalheadmovementof236cylinders.CollegeofSoftwareEngineering,SoutheastUniversity14.13OperatingSystemConceptsSSTF(Cont.)SS(Cot)CollegeofSoftwareEngineering,SoutheastUniversity14.14OperatingSystemConceptsSCANSC„Thediskarmstartsatoneendofthedisk„Thediskarmstartsatoneendofthedisk,andmovestowardtheotherend,servicingrequestsuntilitgetstotheotherendofthedisk,wheretheheadmovementisreversed,andservicingcontinues.„Sometimescalledtheelevatoralgorithm„Sometimescalledtheelevatoralgorithm.„Illustrationshowstotalheadmovementof208cylinders.CollegeofSoftwareEngineering,SoutheastUniversity14.15OperatingSystemConceptsSCAN(Cont.)SC(Cot)CollegeofSoftwareEngineering,SoutheastUniversity14.16OperatingSystemConceptsC-SCANCSC„ProvidesamoreuniformwaittimethanSCANSCAN.„Theheadmovesfromoneendofthedisktotheother.servicingrequestsasitgoes.WhenitreachestheotherendhoweveritWhenitreachestheotherend,however,itimmediatelyreturnstothebeginningofthedikithtiitthdisk,withoutservicinganyrequestsonthereturntrip.„TreatsthecylindersasacircularlistthatwrapsaroundfromthelastcylindertotheCollegeofSoftwareEngineering,SoutheastUniversity14.17OperatingSystemConceptswrapsaroundfromthelastcylindertothefirstone.C-SCAN(Cont.)CSC(Cot)CollegeofSoftwareEngineering,SoutheastUniversity14.18OperatingSystemConceptsC-LOOKCOO„VersionofCSCAN„VersionofC-SCAN„Armonlygoesasfarasthelastrequestinygqeachdirection,thenreversesdirectionimmediatelywithoutfirstgoingallthewaytoimmediately,withoutfirstgoingallthewaytotheendofthedisk.CollegeofSoftwareEngineering,SoutheastUniversity14.19OperatingSystemConceptsC-LOOK(Cont.)COO(Cot)CollegeofSoftwareEngineering,SoutheastUniversity14.20OperatingSystemConceptsSelectingaDisk-SchedulingAlithAlgorithm„SSTFiscommonandhasanaturalappeal„SSTFiscommo

1 / 31
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功