background
play

Background Dist r ibut ed f ile syst em (DFS) a dist r ibut ed - PDF document

Background Dist r ibut ed f ile syst em (DFS) a dist r ibut ed implement at ion of t he classical t ime-shar ing model 20: Dist ribut ed File Syst ems of a f ile syst em, wher e mult iple user s shar e f iles and st or age r esour ces.


  1. Background � Dist r ibut ed f ile syst em (DFS) – a dist r ibut ed implement at ion of t he classical t ime-shar ing model 20: Dist ribut ed File Syst ems of a f ile syst em, wher e mult iple user s shar e f iles and st or age r esour ces. Last Modif ied: � A DFS manages set of disper sed st or age devices 7/ 3/ 2004 1:51:15 PM � Over all st or age space managed by a DFS is composed of dif f er ent , r emot ely locat ed, smaller st or age spaces. � Ther e is usually a cor r espondence bet ween const it uent st or age spaces and set s of f iles. -1 -2 DFS St ruct ure Naming and Transparency � Service – sof t ware ent it y running on one or � Naming – mapping bet ween logical and physical more machines and providing a part icular obj ect s. t ype of f unct ion t o a priori unknown client s. � Mult ilevel mapping – abst ract ion of a f ile t hat hides t he det ails of how and wher e on t he disk t he � Server – ser vice sof t war e r unning on a f ile is act ually st ored. single machine. � A t r anspar ent DFS hides t he locat ion wher e in t he � Client – process t hat can invoke a service net wor k t he f ile is st or ed. using a set of operat ions t hat f orms it s � For a f ile being r eplicat ed in sever al sit es, t he client int erf ace. mapping r et ur ns a set of t he locat ions of t his f ile’s � A client int er f ace f or a f ile ser vice is f or med r eplicas; bot h t he exist ence of mult iple copies and by a set of pr imit ive f ile oper at ions (cr eat e, t heir locat ion ar e hidden. delet e, read, writ e). -3 -4 Naming Schemes —Thr ee Main Naming St ruct ures Approaches � Locat ion t ransparency – f ile name does not r eveal � 1) Files named by combinat ion of t heir host name t he f ile’s physical st or age locat ion. and local name; guar ant ees a unique syst emwide name. � File name st ill denot es a specif ic, alt hough hidden, set of physical disk blocks. � Convenient way t o share dat a. � 2) At t ach r emot e dir ect or ies t o local dir ect or ies, � Can expose correspondence bet ween component unit s and giving t he appear ance of a coher ent dir ect or y machines. t r ee; only pr eviously mount ed r emot e dir ect or ies � Locat ion independence – f ile name does not need can be accessed t r anspar ent ly. t o be changed when t he f ile’s physical st or age locat ion changes. � 3)Tot al int egr at ion of t he component f ile syst ems. � Bet t er f ile abst ract ion. � A single global name st ruct ure spans all t he f iles in t he � P romot es sharing t he st orage space it self . syst em. � Separat es t he naming hierarchy f rom t he st orage- � I f a server is unavailable, some arbit rary set of devices hierarchy. direct ories on dif f erent machines also becomes unavailable. -5 -6 1

  2. Client Caching Benef it s of Caching � Fast Access � Reduce net wor k t r af f ic by r et aining r ecent ly � many remot e accesses handled ef f icient ly by t he local accessed disk blocks in a cache, so t hat r epeat ed cache; most remot e accesses will be served as f ast as accesses t o t he same inf or mat ion can be handled local ones. locally. � Decr ease Load on Ser ver s � I f needed dat a not already cached, a copy of dat a is � Servers are cont ract ed only occasionally in caching brought f rom t he server t o t he user. (rat her t han f or each access). � Accesses are perf ormed on t he cached copy. � Enhances pot ent ial f or scalabilit y. � Files ident if ied wit h one mast er copy residing at t he � Ef f icient Use of Net wor k server machine, but copies of (part s of ) t he f ile are � Reduces net work t raf f ic. scat t ered in dif f erent caches. � Tot al net work overhead in t ransmit t ing big chunks of � Cache- consist ency problem – keeping t he cached copies dat a (caching) is lower t han a series of responses t o consist ent wit h t he mast er f ile specif ic request s (remot e- service). � Where is cache? Client disk, Client memory, Bot h? -7 -8 P roblems of Caching Cache Updat e P olicy � Write- t hrough – wr it e dat a t hr ough t o disk as � Cache Consist ency soon as t hey ar e placed on any cache. Reliable, but poor per f or mance. � Wit h f r equent wr it es, subst ant ial over head incur r ed t o over come cache-consist ency � Delayed- write – modif icat ions wr it t en t o t he pr oblem cache and t hen wr it t en t hr ough t o t he ser ver � Mor e lat er .. lat er . Wr it e accesses complet e quickly; some dat a may be over wr it t en bef or e t hey ar e wr it t en back, � New I nt er f ace and so need never be wr it t en at all. � I n caching, t he lower int er machine int er f ace is � P oor reliabilit y; unwrit t en dat a will be lost whenever a dif f er ent f or m t he upper user int er f ace. user machine crashes. � Variat ion – scan cache at regular int ervals and f lush � I n r emot e-ser vice (no caching), t he blocks t hat have been modif ied since t he last scan. int er machine int er f ace mir r or s t he local user - � Variat ion – wr it e - on- close , writ es dat a back t o t he server f ile-syst em int er f ace. when t he f ile is closed. Best f or f iles t hat are open f or long periods and f requent ly modif ied. -9 -10 Consist ency St at ef ul File Service � I s locally cached copy of t he dat a consist ent wit h � Mechanism. t he mast er copy? � Client opens a f ile. � Server f et ches inf ormat ion about t he f ile f rom it s disk, st ores it in it s memory, and gives t he client a connect ion � Client-init iat ed appr oach ident if ier unique t o t he client and t he open f ile. � Client init iat es a validit y check. � I dent if ier is used f or subsequent accesses unt il t he � Server checks whet her t he local dat a are consist ent wit h session ends. t he mast er copy. � Server must reclaim t he main- memory space used by client s who are no longer act ive. � Server-init iat ed appr oach � Server records, f or each client , t he (part s of ) f iles it � I ncr eased per f or mance. caches. � Fewer disk accesses. � When server det ect s a pot ent ial inconsist ency, it must � St at ef ul server knows if a f ile was opened f or sequent ial react . access and can t hus read ahead t he next blocks. -11 -12 2

Recommend


More recommend