已阅读5页,还剩24页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Chapter17 Distributed FileSystems Chapter17Distributed FileSystems BackgroundNamingandTransparencyRemoteFileAccessStatefulversusStatelessServiceFileReplicationAnExample AFS ChapterObjectives ToexplainthenamingmechanismthatprovideslocationtransparencyandindependenceTodescribethevariousmethodsforaccessingdistributedfilesTocontraststatefulandstatelessdistributedfileserversToshowhowreplicationoffilesondifferentmachinesinadistributedfilesystemisausefulredundancyforimprovingavailabilityTointroducetheAndrewfilesystem AFS asanexampleofadistributedfilesystem Background Distributedfilesystem DFS adistributedimplementationoftheclassicaltime sharingmodelofafilesystem wheremultipleuserssharefilesandstorageresourcesADFSmanagessetofdispersedstoragedevicesOverallstoragespacemanagedbyaDFSiscomposedofdifferent remotelylocated smallerstoragespacesThereisusuallyacorrespondencebetweenconstituentstoragespacesandsetsoffiles DFSStructure Service softwareentityrunningononeormoremachinesandprovidingaparticulartypeoffunctiontoaprioriunknownclientsServer servicesoftwarerunningonasinglemachineClient processthatcaninvokeaserviceusingasetofoperationsthatformsitsclientinterfaceAclientinterfaceforafileserviceisformedbyasetofprimitivefileoperations create delete read write ClientinterfaceofaDFSshouldbetransparent i e notdistinguishbetweenlocalandremotefiles NamingandTransparency Naming mappingbetweenlogicalandphysicalobjectsMultilevelmapping abstractionofafilethathidesthedetailsofhowandwhereonthediskthefileisactuallystoredAtransparentDFShidesthelocationwhereinthenetworkthefileisstoredForafilebeingreplicatedinseveralsites themappingreturnsasetofthelocationsofthisfile sreplicas boththeexistenceofmultiplecopiesandtheirlocationarehidden Locationtransparency filenamedoesnotrevealthefile sphysicalstoragelocationLocationindependence filenamedoesnotneedtobechangedwhenthefile sphysicalstoragelocationchanges NamingSchemes ThreeMainApproaches Filesnamedbycombinationoftheirhostnameandlocalname guaranteesauniquesystem widenameAttachremotedirectoriestolocaldirectories givingtheappearanceofacoherentdirectorytree onlypreviouslymountedremotedirectoriescanbeaccessedtransparentlyTotalintegrationofthecomponentfilesystemsAsingleglobalnamestructurespansallthefilesinthesystemIfaserverisunavailable somearbitrarysetofdirectoriesondifferentmachinesalsobecomesunavailable RemoteFileAccess Remote servicemechanismisonetransferapproachReducenetworktrafficbyretainingrecentlyaccesseddiskblocksinacache sothatrepeatedaccessestothesameinformationcanbehandledlocallyIfneededdatanotalreadycached acopyofdataisbroughtfromtheservertotheuserAccessesareperformedonthecachedcopyFilesidentifiedwithonemastercopyresidingattheservermachine butcopiesof partsof thefilearescatteredindifferentcachesCache consistencyproblem keepingthecachedcopiesconsistentwiththemasterfileCouldbecallednetworkvirtualmemory CacheLocation Diskvs MainMemory AdvantagesofdiskcachesMorereliableCacheddatakeptondiskarestillthereduringrecoveryanddon tneedtobefetchedagainAdvantagesofmain memorycaches PermitworkstationstobedisklessDatacanbeaccessedmorequicklyPerformancespeedupinbiggermemoriesServercaches usedtospeedupdiskI O areinmainmemoryregardlessofwhereusercachesarelocated usingmain memorycachesontheusermachinepermitsasinglecachingmechanismforserversandusers CacheUpdatePolicy Write through writedatathroughtodiskassoonastheyareplacedonanycacheReliable butpoorperformanceDelayed write modificationswrittentothecacheandthenwrittenthroughtotheserverlaterWriteaccessescompletequickly somedatamaybeoverwrittenbeforetheyarewrittenback andsoneedneverbewrittenatallPoorreliability unwrittendatawillbelostwheneverausermachinecrashesVariation scancacheatregularintervalsandflushblocksthathavebeenmodifiedsincethelastscanVariation write on close writesdatabacktotheserverwhenthefileisclosedBestforfilesthatareopenforlongperiodsandfrequentlymodified CacheFSanditsUseofCaching Consistency Islocallycachedcopyofthedataconsistentwiththemastercopy Client initiatedapproachClientinitiatesavaliditycheckServercheckswhetherthelocaldataareconsistentwiththemastercopyServer initiatedapproachServerrecords foreachclient the partsof filesitcachesWhenserverdetectsapotentialinconsistency itmustreact ComparingCachingandRemoteService Incaching manyremoteaccesseshandledefficientlybythelocalcache mostremoteaccesseswillbeservedasfastaslocalonesServersarecontractedonlyoccasionallyincaching ratherthanforeachaccess ReducesserverloadandnetworktrafficEnhancespotentialforscalabilityRemoteservermethodhandleseveryremoteaccessacrossthenetwork penaltyinnetworktraffic serverload andperformanceTotalnetworkoverheadintransmittingbigchunksofdata caching islowerthanaseriesofresponsestospecificrequests remote service CachingandRemoteService Cont CachingissuperiorinaccesspatternswithinfrequentwritesWithfrequentwrites substantialoverheadincurredtoovercomecache consistencyproblemBenefitfromcachingwhenexecutioncarriedoutonmachineswitheitherlocaldisksorlargemainmemoriesRemoteaccessondiskless small memory capacitymachinesshouldbedonethroughremote servicemethodIncaching thelowerintermachineinterfaceisdifferentformtheupperuserinterfaceInremote service theintermachineinterfacemirrorsthelocaluser file systeminterface StatefulFileService MechanismClientopensafileServerfetchesinformationaboutthefilefromitsdisk storesitinitsmemory andgivestheclientaconnectionidentifieruniquetotheclientandtheopenfileIdentifierisusedforsubsequentaccessesuntilthesessionendsServermustreclaimthemain memoryspaceusedbyclientswhoarenolongeractiveIncreasedperformanceFewerdiskaccessesStatefulserverknowsifafilewasopenedforsequentialaccessandcanthusreadaheadthenextblocks StatelessFileServer Avoidsstateinformationbymakingeachrequestself containedEachrequestidentifiesthefileandpositioninthefileNoneedtoestablishandterminateaconnectionbyopenandcloseoperations DistinctionsBetweenStatefulandStatelessService FailureRecoveryAstatefulserverlosesallitsvolatilestateinacrashRestorestatebyrecoveryprotocolbasedonadialogwithclients orabortoperationsthatwereunderwaywhenthecrashoccurredServerneedstobeawareofclientfailuresinordertoreclaimspaceallocatedtorecordthestateofcrashedclientprocesses orphandetectionandelimination Withstatelessserver theeffectsofserverfailuresandrecoveryarealmostunnoticeableAnewlyreincarnatedservercanrespondtoaself containedrequestwithoutanydifficulty Distinctions Cont Penaltiesforusingtherobuststatelessservice longerrequestmessagesslowerrequestprocessingadditionalconstraintsimposedonDFSdesignSomeenvironmentsrequirestatefulserviceAserveremployingserver initiatedcachevalidationcannotprovidestatelessservice sinceitmaintainsarecordofwhichfilesarecachedbywhichclientsUNIXuseoffiledescriptorsandimplicitoffsetsisinherentlystateful serversmustmaintaintablestomapthefiledescriptorstoinodes andstorethecurrentoffsetwithinafile FileReplication Replicasofthesamefileresideonfailure independentmachinesImprovesavailabilityandcanshortenservicetimeNamingschememapsareplicatedfilenametoaparticularreplicaExistenceofreplicasshouldbeinvisibletohigherlevelsReplicasmustbedistinguishedfromoneanotherbydifferentlower levelnamesUpdates replicasofafiledenotethesamelogicalentity andthusanupdatetoanyreplicamustbereflectedonallotherreplicasDemandreplication readinganonlocalreplicacausesittobecachedlocally therebygeneratinganewnonprimaryreplica AnExample AFS Adistributedcomputingenvironment Andrew underdevelopmentsince1983atCarnegie MellonUniversity purchasedbyIBMandreleasedasTransarcDFS nowopensourcedasOpenAFSAFStriestosolvecomplexissuessuchasuniformnamespace location independentfilesharing client sidecaching withcacheconsistency secureauthentication viaKerberos Alsoincludesserver sidecaching viareplicas highavailabilityCanspan5 000workstations ANDREW Cont Clientsarepresentedwithapartitionedspaceoffilenames alocalnamespaceandasharednamespaceDedicatedservers calledVice presentthesharednamespacetotheclientsasanhomogeneous identical andlocationtransparentfilehierarchyThelocalnamespaceistherootfilesystemofaworkstation fromwhichthesharednamespacedescendsWorkstationsruntheVirtueprotocoltocommunicatewithVice andarerequiredtohavelocaldiskswheretheystoretheirlocalnamespaceServerscollectivelyareresponsibleforthestorageandmanagementofthesharednamespace ANDREW Cont ClientsandserversarestructuredinclustersinterconnectedbyabackboneLANAclusterconsistsofacollectionofworkstationsandaclusterserverandisconnectedtothebackbonebyarouterAkeymechanismselectedforremotefileoperationsiswholefilecachingOpeningafilecausesittobecached initsentirety onthelocaldisk ANDREWSharedNameSpace Andrew svolumesaresmallcomponentunitsassociatedwiththefilesofasingleclientAfididentifiesaVicefileordirectory Afidis96bitslongandhasthreeequal lengthcomponents volumenumbervnodenumber indexintoanarraycontainingtheinodesoffilesinasinglevolumeuniquifier allowsreuseofvnodenumbers therebykeepingcertaindatastructures compactFidsarelocationtransparent therefore filemovementsfromservertoserverdonotinvalidatecacheddirectorycontentsLocationinformationiskeptonavolumebasis andtheinformationisreplicatedoneachserver ANDREWFileOperations AndrewcachesentirefilesformserversAclientworkstationinteractswithViceserversonlyduringopeningandclosingoffilesVenus cachesfilesfromVicewhentheyareopened andstoresmodifiedcopiesoffilesbackwhentheyareclosedRea
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年太阳能电池水泵系统项目合作计划书
- 2025-2030中国医药质量监管体系完善与行业发展报告
- 客车电动化转型战略创新创业项目商业计划书
- 排球训练视频教程创新创业项目商业计划书
- 家具生产线节能改造创新创业项目商业计划书
- 多功能客厅电视柜书柜组合创新创业项目商业计划书
- 2026届河南省洛阳市汝阳县实验高中高二上化学期中质量跟踪监视试题含解析
- 部编三上语文富饶的西沙群岛公开课教案教学设计一等奖
- 吉林省延边朝鲜族自治州延吉二中2026届化学高一上期中监测试题含解析
- 废气处理设备设计优化方案
- 2025至2030全球及中国花生行业项目调研及市场前景预测评估报告
- 2025年教师职称考试(语文)复习题及答案(小学)(吕梁)
- 2026年南宁市农村信用社联合社秋季校园招聘笔试备考题库(浓缩500题)含答案详解(培优a卷)
- 2025年英语专业专升本模拟试卷真题(含答案)
- 2025年10月18日湖北省直遴选笔试真题及解析(市直卷)
- 2025年江苏(统招专升本)英语考试试题及答案
- 语言经济效应评估模型-洞察与解读
- 无源医疗器械设计开发流程
- 2025年儿童营养与健康知识竞赛答案及解析
- 融媒体笔试试题及答案
- 2025乌鲁木齐银行秋季招聘备考考试题库附答案解析
评论
0/150
提交评论