版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Chapter14:Mass-StorageSystemsDiskStructureDiskSchedulingDiskManagementSwap-SpaceManagementRAIDStructureDiskAttachmentStable-StorageImplementationTertiaryStorageDevicesOperatingSystemIssuesPerformanceIssues
1
7/27/2023DiskStructureDiskdrivesareaddressedaslarge1-dimensionalarraysoflogicalblocks,wherethelogicalblockisthesmallestunitoftransfer.
The1-dimensionalarrayoflogicalblocksismappedintothesectorsofthedisksequentially.Sector0isthefirstsectorofthefirsttrackontheoutermostcylinder.Mappingproceedsinorderthroughthattrack,thentherestofthetracksinthatcylinder,andthenthroughtherestofthecylindersfromoutermosttoinnermost.
2
7/27/2023DiskSchedulingTheoperatingsystemisresponsibleforusinghardwareefficiently—forthediskdrives,thismeanshavingafastaccesstimeanddiskbandwidth.
操作系统有责任高效地使用硬件——对于磁盘设备,这意味着很短的访问时间和磁盘带宽。Accesstimehastwomajorcomponents访问时间包括两个主要部分Seektimeisthetimeforthediskaretomovetheheadstothecylindercontainingthedesiredsector.寻道时间是指把磁头移到所需柱面的时间。Rotationallatencyistheadditionaltimewaitingforthedisktorotatethedesiredsectortothediskhead.旋转延迟是指等待磁盘上所需要的扇区旋转到磁头下面的时间。
3
7/27/2023DiskSchedulingMinimizeseektime最小寻道时间Seektimeseekdistance寻道时间寻道距离Diskbandwidthisthetotalnumberofbytestransferred,dividedbythetotaltimebetweenthefirstrequestforserviceandthecompletionofthelasttransfer.
磁盘带宽,是用传输的总位数,除以第一个服务请求与最后传输完成之间的总时间。
4
7/27/2023DiskScheduling(Cont.)SeveralalgorithmsexisttoscheduletheservicingofdiskI/Orequests.Weillustratethemwitharequestqueue(0-199).
98,183,37,122,14,124,65,67 Headpointer53
5
7/27/2023FCFSIllustrationshowstotalheadmovementof640cylinders.
6
7/27/2023SSTFSelectstherequestwiththeminimumseektimefromthecurrentheadposition.SSTFschedulingisaformofSJFscheduling;maycausestarvationofsomerequests.Illustrationshowstotalheadmovementof236cylinders.
7
7/27/2023SSTF(Cont.)
8
7/27/2023SCANThediskarmstartsatoneendofthedisk,andmovestowardtheotherend,servicingrequestsuntilitgetstotheotherendofthedisk,wheretheheadmovementisreversedandservicingcontinues.Sometimescalledtheelevatoralgorithm(电梯算法).Illustrationshowstotalheadmovementof208cylinders.
9
7/27/2023SCAN(Cont.)
10
7/27/2023C-SCANProvidesamoreuniformwaittimethanSCAN.Theheadmovesfromoneendofthedisktotheother.servicingrequestsasitgoes.Whenitreachestheotherend,however,itimmediatelyreturnstothebeginningofthedisk,withoutservicinganyrequestsonthereturntrip.Treatsthecylindersasacircularlistthatwrapsaroundfromthelastcylindertothefirstone.
11
7/27/2023C-SCAN(Cont.)
12
7/27/2023C-LOOKVersionofC-SCANArmonlygoesasfarasthelastrequestineachdirection,thenreversesdirectionimmediately,withoutfirstgoingallthewaytotheendofthedisk.
13
7/27/2023C-LOOK(Cont.)
14
7/27/2023SelectingaDisk-SchedulingAlgorithmSSTFiscommonandhasanaturalappealSCANandC-SCANperformbetterforsystemsthatplaceaheavyloadonthedisk.Performancedependsonthenumberandtypesofrequests.Requestsfordiskservicecanbeinfluencedbythefile-allocationmethod.Thedisk-schedulingalgorithmshouldbewrittenasaseparatemoduleoftheoperatingsystem,allowingittobereplacedwithadifferentalgorithmifnecessary.EitherSSTForLOOKisareasonablechoiceforthedefaultalgorithm.
15
7/27/2023DiskManagementLow-levelformatting,orphysicalformatting—Dividingadiskintosectorsthatthediskcontrollercanreadandwrite.Touseadisktoholdfiles,theoperatingsystemstillneedstorecorditsowndatastructuresonthedisk.Partitionthediskintooneormoregroupsofcylinders.Logicalformattingor“makingafilesystem”.Bootblockinitializessystem.ThebootstrapisstoredinROM.Bootstraploaderprogram.Methodssuchassectorsparingusedtohandlebadblocks.
16
7/27/2023MS-DOSDiskLayout
17
7/27/2023Swap-SpaceManagementSwap-space—Virtualmemoryusesdiskspaceasanextensionofmainmemory.Swap-spacecanbecarvedoutofthenormalfilesystem,or,morecommonly,itcanbeinaseparatediskpartition.Swap-spacemanagement4.3BSDallocatesswapspacewhenprocessstarts;holdstextsegment(theprogram)anddatasegment.Kernelusesswapmapstotrackswap-spaceuse.Solaris2allocatesswapspaceonlywhenapageisforcedoutofphysicalmemory,notwhenthevirtualmemorypageisfirstcreated.
18
7/27/20234.3BSDText-SegmentSwapMap
19
7/27/20234.3BSDData-SegmentSwapMap
20
7/27/2023RAIDStructureRAID–multiplediskdrivesprovidesreliabilityviaredundancy.RAIDisarrangedintosixdifferentlevels.
21
7/27/2023RAID(cont)Severalimprovementsindisk-usetechniquesinvolvetheuseofmultipledisksworkingcooperatively.
Diskstripingusesagroupofdisksasonestorageunit.
RAIDschemesimproveperformanceandimprovethereliabilityofthestoragesystembystoringredundantdata.Mirroringorshadowingkeepsduplicateofeachdisk.Blockinterleavedparityusesmuchlessredundancy.
22
7/27/2023RAIDLevels
23
7/27/2023RAID(0+1)and(1+0)
24
7/27/2023DiskAttachmentDisksmaybeattachedoneoftwoways:HostattachedviaanI/OportNetworkattachedviaanetworkconnection
25
7/27/2023Network-AttachedStorage
26
7/27/2023Storage-AreaNetwork
27
7/27/2023Stable-StorageImplementationWrite-aheadlogschemerequiresstablestorage.
Toimplementstablestorage:Replicateinformationonmorethanonenonvolatilestoragemediawithindependentfailuremodes.Updateinformationinacontrolledmannertoensurethatwecanrecoverthestabledataafteranyfailureduringdatatransferorrecovery.
28
7/27/2023TertiaryStorageDevicesLowcostisthedefiningcharacteristicoftertiarystorage.
Generally,tertiarystorageisbuiltusingremovablemedia
CommonexamplesofremovablemediaarefloppydisksandCD-ROMs;othertypesareavailable.
29
7/27/2023RemovableDisksFloppydisk—thinflexiblediskcoatedwithmagneticmaterial,enclosedinaprotectiveplasticcase.
Mostfloppiesholdabout1MB;similartechnologyisusedforremovabledisksthatholdmorethan1GB.Removablemagneticdiskscanbenearlyasfastasharddisks,buttheyareatagreaterriskofdamagefromexposure.
30
7/27/2023RemovableDisks(Cont.)Amagneto-opticdiskrecordsdataonarigidplattercoatedwithmagneticmaterial.Laserheatisusedtoamplifyalarge,weakmagneticfieldtorecordabit.Laserlightisalsousedtoreaddata(Kerreffect).Themagneto-opticheadfliesmuchfartherfromthedisksurfacethanamagneticdiskhead,andthemagneticmaterialiscoveredwithaprotectivelayerofplasticorglass;resistanttoheadcrashes.
Opticaldisksdonotusemagnetism;theyemployspecialmaterialsthatarealteredbylaserlight.
31
7/27/2023WORMDisksThedataonread-writediskscanbemodifiedoverandover.WORM(“WriteOnce,ReadManyTimes”)diskscanbewrittenonlyonce.Thinaluminumfilmsandwichedbetweentwoglassorplasticplatters.Towriteabit,thedriveusesalaserlighttoburnasmallholethroughthealuminum;informationcanbedestroyedbynotaltered.Verydurableandreliable.ReadOnlydisks,suchadCD-ROMandDVD,comfromthefactorywiththedatapre-recorded.
32
7/27/2023TapesComparedtoadisk,atapeislessexpensiveandholdsmoredata,butrandomaccessismuchslower.Tapeisaneconomicalmediumforpurposesthatdonotrequirefastrandomaccess,e.g.,backupcopiesofdiskdata,holdinghugevolumesofdata.Largetapeinstallationstypicallyuserobotictapechangersthatmovetapesbetweentapedrivesandstorageslotsinatapelibrary.stacker–librarythatholdsafewtapessilo–librarythatholdsthousandsoftapesAdisk-residentfilecanbearchivedtotapeforlowcoststorage;thecomputercanstageitbackintodiskstorageforactiveuse.
33
7/27/2023OperatingSystemIssuesMajorOSjobsaretomanagephysicaldevicesandtopresentavirtualmachineabstractiontoapplications
Forharddisks,theOSprovidestwoabstraction:Rawdevice–anarrayofdatablocks.Filesystem–theOSqueuesandschedulestheinterleavedrequestsfromseveralapplications.
34
7/27/2023ApplicationInterfaceMostOSshandleremovabledisksalmostexactlylikefixeddisks—anewcartridgeisformattedandanemptyfilesystemisgeneratedonthedisk.Tapesarepresentedasarawstoragemedium,i.e.,andapplicationdoesnotnotopenafileonthetape,itopensthewholetapedriveasarawdevice.Usuallythetapedriveisreservedfortheexclusiveuseofthatapplication.SincetheOSdoesnotprovidefilesystemservices,theapplicationmustdecidehowtousethearrayofblocks.Sinceeveryapplicationmakesupitsownrulesforhowtoorganizeatape,atapefullofdatacangenerallyonlybeusedbytheprogramthatcreatedit.
35
7/27/2023TapeDrivesThebasicoperationsforatapedrivedifferfromthoseofadiskdrive.locatepositionsthetapetoaspecificlogicalblock,notanentiretrack(correspondstoseek).Thereadpositionoperationreturnsthelogicalblocknumberwherethetapeheadis.Thespaceoperationenablesrelativemotion.Tapedrivesare“append-only”devices;updatingablockinthemiddleofthetapealsoeffectivelyeraseseverythingbeyondthatblock.AnEOTmarkisplacedafterablockthatiswritten.
36
7/27/2023FileNamingTheissueofnamingfilesonremovablemediaisespeciallydifficultwhenwewanttowritedataonaremovablecartridgeononecomputer,andthenusethecartridgeinanothercomputer.ContemporaryOSsgenerallyleavethenamespaceproblemunsolvedforremovablemedia,anddependonapplicationsanduserstofigureouthowtoaccessandinterpretthedata.Somekindsofremovablemedia(e.g.,CDs)aresowellstandardizedthatallcomputersusethemthesameway.
37
7/27/2023HierarchicalStorageManagement(HSM)Ahierarchicalstoragesystemextendsthestoragehierarchybeyondprimarymemoryandsecondarystoragetoincorporatetertiarystorage—usuallyimplementedasajukeboxoftapesorremovabledisks.Usuallyincorporatetertiarystoragebyextendingthefilesystem.Smallandfrequentlyusedfilesremainondisk.Large,old,inactivefilesarearchivedtothejukebox.HSMisusuallyfoundinsupercomputingcentersandotherlargeinstallationsthathaveenormousvolumesofdata.
38
7/27/2023SpeedTwoaspectsofspeedintertiarystoragearebandwidthandlatency.
Bandwidthismeasuredinbytespersecond.Sustainedbandwidth–averagedatarateduringalargetransfer;#ofbytes/transfertime.
Dataratewhenthedatastreamisactuallyflowing.Effectivebandwidth–averageovertheentireI/Otime,includingseekorlocate,andcartridgeswitching.
Drive’soveralldatarate.
39
7/27/2023Speed(Cont.)Accesslatency–amountoftimeneededtolocatedata.Accesstimeforadisk–movethearmtotheselectedcylinderandwaitfortherotationallatency;<35milliseconds.Accessontaperequireswindingthetapereelsuntiltheselectedblockreachesthetapehead;tensorhundredsofseconds.Generallysaythatrandomaccesswithinatapecartridgeisaboutathousandtimesslowerthanrandomaccessondisk.Thelowcostoftertiarystorageisaresultofhavingmanycheapcartridgesshareafewexpensivedrives.Aremovablelibraryisbestdevotedtothestorageofinfrequentlyuseddata,becausethelibrarycanonlysatisfyarelativelysmallnumberofI/Orequestsperhour.
40
7/27/2023ReliabilityAfixeddiskdriveislikelytobemorereliablethanaremovablediskortapedrive.
Anopticalcartridgeislikelytobemorereliablethanamagneticdiskortape.
Aheadcrashinafixedharddiskgenerallydestroysthedata,whereasthefailureofatapedriveoropticaldiskdriveoftenleavesthedatacartridgeunharmed.
41
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年成都文化旅游发展集团有限责任公司校园招聘笔试备考试题及答案解析
- 2026广东广州市招聘中山医学院医科公共平台技术员1人备考题库(夺分金卷)附答案详解
- 2026太平洋财险安庆中支招聘2人备考题库附完整答案详解(历年真题)
- 2026年朔黄铁路校园招聘笔试参考题库及答案解析
- 2026深圳能源春季校园招聘备考题库汇编附答案详解
- 2026贵州省旅游产业发展集团有限公司招聘3人备考题库含答案详解【综合题】
- 2026陕西延安北方医院招聘备考题库【全优】附答案详解
- 2026上海AI实验室访问学者计划全球招募备考题库含答案详解(基础题)
- 施工组织设计(方案)编制审批制度
- 2026年中石化福建石油分公司校园招聘考试参考题库及答案解析
- 部编版七年级下册语文第二单元集体备课教案(表格式)
- 高二下学期期末英语读后续写画的风波:我和妹妹在奶奶家的冲突讲义
- 教科版四年级下册科学期末测试卷含答案(精练)
- DL-T5054-2016火力发电厂汽水管道设计规范
- 2023河南中医药大学学士学位英语题
- 浙江弘利新材料有限公司年产2万吨造纸化学品中性施胶剂技改项目环境影响报告
- 新能源汽车电池介绍课件
- 车库拆除工程施工方案
- EXCEL培训-EXCEL函数教程
- 呼吸系统解剖生理学课件
- 烧结烟气循环
评论
0/150
提交评论