




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
Chapter14:Mass-StorageSystemsDiskStructureDiskSchedulingDiskManagementSwap-SpaceManagementRAIDStructureDiskAttachmentStable-StorageImplementationTertiaryStorageDevicesOperatingSystemIssuesPerformanceIssuesDiskStructureDiskdrivesareaddressedaslarge1-dimensionalarraysoflogicalblocks,wherethelogicalblockisthesmallestunitoftransfer.
The1-dimensionalarrayoflogicalblocksismappedintothesectorsofthedisksequentially.Sector0isthefirstsectorofthefirsttrackontheoutermostcylinder.Mappingproceedsinorderthroughthattrack,thentherestofthetracksinthatcylinder,andthenthroughtherestofthecylindersfromoutermosttoinnermost.DiskSchedulingTheoperatingsystemisresponsibleforusinghardwareefficiently—forthediskdrives,thismeanshavingafastaccesstimeanddiskbandwidth.
操作系統(tǒng)有責任高效地使用硬件——對于磁盤設(shè)備,這意味著很短的訪問時間和磁盤帶寬。Accesstimehastwomajorcomponents訪問時間包括兩個主要部分Seektimeisthetimeforthediskaretomovetheheadstothecylindercontainingthedesiredsector.尋道時間是指把磁頭移到所需柱面的時間。Rotationallatencyistheadditionaltimewaitingforthedisktorotatethedesiredsectortothediskhead.旋轉(zhuǎn)延遲是指等待磁盤上所需要的扇區(qū)旋轉(zhuǎn)到磁頭下面的時間。DiskSchedulingMinimizeseektime最小尋道時間Seektimeseekdistance尋道時間尋道距離Diskbandwidthisthetotalnumberofbytestransferred,dividedbythetotaltimebetweenthefirstrequestforserviceandthecompletionofthelasttransfer.
磁盤帶寬,是用傳輸?shù)目偽粩?shù),除以第一個服務(wù)請求與最后傳輸完成之間的總時間。DiskScheduling(Cont.)SeveralalgorithmsexisttoscheduletheservicingofdiskI/Orequests.Weillustratethemwitharequestqueue(0-199).
98,183,37,122,14,124,65,67 Headpointer53FCFSIllustrationshowstotalheadmovementof640cylinders.SSTFSelectstherequestwiththeminimumseektimefromthecurrentheadposition.SSTFschedulingisaformofSJFscheduling;maycausestarvationofsomerequests.Illustrationshowstotalheadmovementof236cylinders.SSTF(Cont.)SCANThediskarmstartsatoneendofthedisk,andmovestowardtheotherend,servicingrequestsuntilitgetstotheotherendofthedisk,wheretheheadmovementisreversedandservicingcontinues.Sometimescalledtheelevatoralgorithm(電梯算法).Illustrationshowstotalheadmovementof208cylinders.SCAN(Cont.)C-SCANProvidesamoreuniformwaittimethanSCAN.Theheadmovesfromoneendofthedisktotheother.servicingrequestsasitgoes.Whenitreachestheotherend,however,itimmediatelyreturnstothebeginningofthedisk,withoutservicinganyrequestsonthereturntrip.Treatsthecylindersasacircularlistthatwrapsaroundfromthelastcylindertothefirstone.C-SCAN(Cont.)C-LOOKVersionofC-SCANArmonlygoesasfarasthelastrequestineachdirection,thenreversesdirectionimmediately,withoutfirstgoingallthewaytotheendofthedisk.C-LOOK(Cont.)SelectingaDisk-SchedulingAlgorithmSSTFiscommonandhasanaturalappealSCANandC-SCANperformbetterforsystemsthatplaceaheavyloadonthedisk.Performancedependsonthenumberandtypesofrequests.Requestsfordiskservicecanbeinfluencedbythefile-allocationmethod.Thedisk-schedulingalgorithmshouldbewrittenasaseparatemoduleoftheoperatingsystem,allowingittobereplacedwithadifferentalgorithmifnecessary.EitherSSTForLOOKisareasonablechoiceforthedefaultalgorithm.DiskManagementLow-levelformatting,orphysicalformatting—Dividingadiskintosectorsthatthediskcontrollercanreadandwrite.Touseadisktoholdfiles,theoperatingsystemstillneedstorecorditsowndatastructuresonthedisk.Partitionthediskintooneormoregroupsofcylinders.Logicalformattingor“makingafilesystem””.Bootblockinitializessystem.ThebootstrapisstoredinROM.Bootstraploaderprogram.Methodssuchassectorsparingusedtohandlebadblocks.MS-DOSDiskLayoutSwap-SpaceManagementSwap-space—Virtualmemoryusesdiskspaceasanextensionofmainmemory.Swap-spacecanbecarvedoutofthenormalfilesystem,or,morecommonly,itcanbeinaseparatediskpartition.Swap-spacemanagement4.3BSDallocatesswapspacewhenprocessstarts;holdstextsegment(theprogram)anddatasegment.Kernelusesswapmapstotrackswap-spaceuse.Solaris2allocatesswapspaceonlywhenapageisforcedoutofphysicalmemory,notwhenthevirtualmemorypageisfirstcreated.4.3BSDText-SegmentSwapMap4.3BSDData-SegmentSwapMapRAIDStructureRAID–multiplediskdrivesprovidesreliabilityviaredundancy.RAIDisarrangedintosixdifferentlevels.RAID(cont)Severalimprovementsindisk-usetechniquesinvolvetheuseofmultipledisksworkingcooperatively.Diskstripingusesagroupofdisksasonestorageunit.RAIDschemesimproveperformanceandimprovethereliabilityofthesMirroringorshadowingkeepsduplicateofeachdisk.Blockinterleavedparityusesmuchlessredundancy.RAIDLevelsRAID(0+1)and(1+0)DiskAttachmentDisksmaybeattachedoneoftwoways:HostattachedviaanI/OportNetworkattachedviaanetworkconnectionNetwork-AttachedStorageStorage-AreaNetworkStable-StorageImplementationWrite-aheadlogschemerequiresstablestorage.Toimplementstablestorage:Replicateinformationonmorethanonenonvolatilestoragemediawithindependentfailuremodes.UpdateinformationinacontrolledmannertoensurethatwecanrecoverthestabledataaTertiaryStorageDevicesLowcostisthedefiningcharacteristicoftertiarystorage.Generally,tertiarystorageisbuiltusingremovablemediaCommonexamplesofremovablemediaarefloppydisksandCD-ROMs;othertypesareavailable.RemovableDisksFloppydisk——thinflexiblediskcoatedwithmagneticmaterial,enclosedinaprotectiveplasticcase.Mostfloppiesholdabout1MB;similartechnologyisusedforremovabledisksthatholdmorethan1GB.Removablemagneticdiskscanbenearlyasfastasharddisks,buttheyareatagreaterriskofdamagefromexposure.RemovableDisks(Cont.)Amagneto-opticdiskrecordsdataonarigidplattercoatedwithmagneticmaterial.Laserheatisusedtoamplifyalarge,weakmagneticfieldtorecordabit.Laserlightisalsousedtoreaddata(Kerreffect).Themagneto-opticheadfliesmuchfartherfromthedisksurfacethanamagneticdiskhead,andthemagneticmaterialiscoveredwithaprotectivelayerofplasticorglass;resistanttoheadcrashes.Opticaldisksdonotusemagnetism;theyemployspecialmaterialsthatarealteredbylaserlight.WORMDisksThedataonread-writediskscanbemodifiedoverandover.WORM(“WriteOnce,ReadManyTimes”)diskscanbewrittenonlyonce.Thinaluminumfilmsandwichedbetweentwoglassorplasticplatters.Towriteabit,thedriveusesalaserlighttoburnasmallholethroughthealuminum;informationcanbedestroyedbynotaltered.Verydurableandreliable.ReadOnlydisks,suchadCD-ROMandDVD,comfromthefactorywiththedatapre-recorded.TapesComparedtoadisk,atapeislessexpensiveandholdsmoredata,butrandomaccessismuchslower.Tapeisaneconomicalmediumforpurposesthatdonotrequirefastrandomaccess,e.g.,backupcopiesofdiskdata,holdinghugevolumesofdata.Largetapeinstallationstypicallyuserobotictapechangersthatmovetapesbetweentapedrivesandstorageslotsinatapelibrary.stacker–librarythatholdsafewtapessilo––librarythatholdsthousandsoftapesAdisk-residentfilecanbearchivedtotapeforlowcoststorage;thecomputercanstageitbackintodiskstorageforactiveuse.OperatingSystemIssuesMajorOSjobsaretomanagephysicaldevicesandtopresentavirtualmachineabstractiontoapplicationsForharddisks,theOSprovidestwoabstraction:Rawdevice––anarrayofdatablocks.Filesystem–theOSqueuesandschedulestheinterleavedrequestsfromseveralapplications.ApplicationInterfaceMostOSshandleremovabledisksalmostexactlylikefixeddisks——anewcartridgeisformattedandanemptyfilesystemisgeneratedonthedisk.Tapesarepresentedasarawstoragemedium,i.e.,andapplicationdoesnotnotopenafileonthetape,itopensthewholetapedriveasarawdevice.Usuallythetapedriveisreservedfortheexclusiveuseofthatapplication.SincetheOSdoesnotprovidefilesystemservices,theapplicationmustdecidehowtousethearrayofblocks.Sinceeveryapplicationmakesupitsownrulesforhowtoorganizeatape,atapefullofdatacangenerallyonlybeusedbytheprogramthatcreatedit.TapeDrivesThebasicoperationsforatapedrivedifferfromthoseofadiskdrive.locatepositionsthetapetoaspecificlogicalblock,notanentiretrack(correspondstoseek).ThereadpositionoperationretThespaceoperationenablesrelativemotion.Tapedrivesare“append-only”devices;updatingablockinthemiddleofthetapealsoeffectivelyeraseseverythingbeyondthatblock.AnEOTmarkisplacedafterablockthatiswritten.FileNamingTheissueofnamingfilesonremovablemediaisespeciallydifficultwhenwewanttowritedataonaremovablecartridgeononecomputer,andthenusethecartridgeinanothercomputer.ContemporaryOSsgenerallyleavethenamespaceproblemunsolvedforremovablemedia,anddependonapplicationsanduserstofigureouthowtoaccessandinterpretthedata.Somekindsofremovablemedia(e.g.,CDs)aresowellstandardizedthatallcomputersusethemthesameway.HierarchicalStorageManagement(HSM)Ahierarchicalstoragesystemextendsthestoragehierarchybeyondprimarymemoryandsecondarystoragetoincorporatetertiarystorage——usuallyimplementedasajukeboxoftapesorremovabledisks.Usuallyincorporatetertiarystoragebyextendingthefilesystem.Smallandfrequentlyusedfilesremainondisk.Large,old,inactivefilesarearchivedtothejukebox.HSMisusuallyfoundinsupercomputingcentersandotherlargeinstallationsthathaveenormousvolumesofdata.SpeedTwoaspectsofspeedintertiarystoragearebandwidthandlatency.Bandwidthismeasuredinbytespersecond.Sustainedbandwidth–averagedatarateduringalargetransfer;#ofbytes/transfertime.Dataratewhenthedatastreamisactuallyflowing.Effectivebandwidth–averageovertheentireI/Otime,includingseekorlocate,andcartridgeswitching.Drive’soveralldatarate.Speed(Cont.)Accesslatency––amountoftimeneededtolocatedata.Accesstimeforadisk–movethearmtotheselectedcylinderandwaitfortherotationallatency;<35milliseconds.Accessontaperequireswindingthetapereelsuntiltheselectedblockreachesthetapehead;tensorhundredsofseconds.Generallysaythatrandomaccess
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 工程課題立項申報書
- 儲罐氣體銷售合同范本
- 代駕租賃合同范本
- Unit 3 Keep Fit section B 1a-1d 同步課時講練(含答案)七年級英語下冊(人教版2024)
- 原料購置合同范例
- 公司食堂 燃氣 合同范本
- 印刷紙箱合同范本
- 產(chǎn)品折扣合同范本
- 課題申報書怎么寫作
- 卡位包間租賃合同范本
- 2024年廣州市公安局招聘交通輔警考試真題
- 隨機交易策略(TB版)
- 《綠色建筑設(shè)計原理》課件
- 中醫(yī)館裝修合同范本
- 1.1 銳角三角函數(shù)(第1課時) 課件 2024-2025學年北師大版九年級數(shù)學下冊
- 2025年分手協(xié)議書規(guī)范承諾函
- 椎管打骨水泥后的護理
- 學習與科技的融合主題班會
- 《直播銷售》課件-項目一 認識直播與直播銷售
- 2025年南京科技職業(yè)學院高職單招數(shù)學歷年(2016-2024)頻考點試題含答案解析
- 2025-2030年中國航空配餐行業(yè)市場發(fā)展現(xiàn)狀及投資前景規(guī)劃研究報告
評論
0/150
提交評論