OS_Lec18_0511 - DV saviour -' c155 20!)...

Info iconThis preview shows pages 1–20. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 8
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 10
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 12
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 14
Background image of page 15

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 16
Background image of page 17

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 18
Background image of page 19

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 20
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: DV saviour -' c155 20!) "led", 0.5 Chapter 10: pct/Vat a»? 'Fi'leFSy'Stem Interface (I; U’\Strb& gm Chapter 10: File—System Interface I File Concept ? I Access Methods I Directory Structure ! I File-System Mounting I File Sharing I Protection M/‘U-iiy. fife— $54st 3| .54 L. W I I ‘q \\ ‘ dimciorj affidwf. _ ” p’_flas i awe». organsm M4. New“ (yo-.51 : l’hpo‘ abovd‘ am p.292; I'm +hk dad'sle I i ‘5 g 55"?” , : elfsk JIUJJQUggH 13:913.! dfmdwe.) J19 Die; .5! as 4:. W63 MAL..." Z_L._m_." ’_ kDoné-IaLsru-‘a_- fll—W ,9 Objectives I To explain the function of file systems I! To describe the interfaées to file systems I To discuss file—system design tradeoffs. including access methods, file sharing. file locking. and directory structures I To explore file-system protection acme ‘5 0t VIDA/hat; Cojflecfi‘on 0p mad d MOO- Hnai” is recorded can scoowdarj €341: File Concept W I Contiguous logical address space Cam mmnflj , P; Des wpresmr programs and :1on . A I! Data max—ad lag : (D r numeric @ anL-Iabehc , (E) > character 1' @» binary M 36 on B 0 Program A Elfin has Ch Card‘qu Aepi'nefi '5Hucl‘w't) “Jim‘ch dogmas cm H's I'ij I {'6x J'pi‘g, gzqumcg. er? chaletst 5:5ch 9:592. File Structure I None - sequence of words. bytes I Simple record structure 6 Lines 0 Fixed length a Variable length I Complex Structures 0 Formatted document - Relocatable load file I I Can simulate last tw0 with first method by inserting a characters . I Whodecldes: 0 Operating system a» Program l A Hr'fibdflfilm_g9r—€o_ Flij $5 is- File Attributes Name — only information kept in human-readable form‘ ldentifierWWe system i ‘l‘ is l-he non —hun1cwn_ —-u——‘_——‘_——‘—————L . Type — needed for systems that support different types numb?“ :1 9°”! “'19-— _ _ _ _ _ _ _ \ Location — pointer to file location on device I 0"“ Size — current file size E . tha- _ . . _ , Protection — con re 5 who can do reading, writing. executing Time. date, and user identification — data for protection, security, and u a "_—_'—"—"—'——————__. .. _.__ _. __ usage monitoring Information about files are kept in the directory structure. which is maintained on the disk Abéuuu’ GYMHS “We :9. DUEL eas+m .n UQrJJM-L Fifi J‘ Mt; gewmdmfl S43E23; Olen/ibg Mesh) 4W CPA—’- ""9 GWIwbi le-L’L—L...» ‘( g,» 2 seems"! J‘ File Operations File is an abstractdata type. -. $453.35 P recess km mag 41 L; open 9:29; +oub-Cz -Jl 51‘s 0pen(F,)-— search the directo structure on disk for entry F and moire _ 9 fan via HR ‘tfie Genie—fit of entrx to memory afloa- pi‘fle I Ciose (Flj— move the content of entry F,-in memory to directory fudge; EFuctur-é" on disk ‘ .. i ' ergsbaaaindex J‘U‘Z'ei—Lf I 9"— A firm‘3 C‘b‘i (spammed I III Create C—I—aUJ-b—o #41:?! 3pm-o.’fl:, i'ubéL ml I “trite .— (J) process .J‘ ‘fi'fig‘s J1 I Read C“ Q” ,J -3 w I Repositionwithinfile '9‘- 4 OP“ Q‘L—L—du I Delete far—d. J1 Wig: Qatar” ‘ r M 4—. .1 .._. Mme-w. I Truncate dim 03’ . '3 3 ii" I ; 5'35. tuc'caleoPcm Cite; +64% mi (31: ADJ-‘4, m r5 izn' - reg-1' ("Eng-c. ' " (processes Jl sin 3 _ d it? exprnj cl J's-K J”! M _ l Several pieces of data are needed to manage open files: m J] Jill 6; h. file pointer: pointer to last readlwritfi location, per process that , : ‘ has the file open Hack the 43+ W-wn'+¢ mead-non : ‘o P: ’13,. n I File-open count: counter of number of times a file is open — to allow I removal of data from open-file table when last processes closes it o Disk location of the file: cache of data access informaw 0 Access rights: per-process access mode information pmc esscs l J MED-fit; PV‘OC. U: N l J pi'flfl _ :Las’isl W”3%b2 we Jt. flashy-e, uJJ'de opm-n‘fic fame; Jim .____._@Mi“ng Qkag . _.__._ _._... space, “In thgffiea -55_ske¢m.__..m.usf b5 paund gm! _ _ ___#_._._ tn; 9:42;; ,_ . ____ _. ___________ _ 2.. am £231" _-_i'hg,_fle_m)_ Effie. mus“? {52¢ mots-1e __ in Hm dimdog _ _. _ __ __, __ __ 9,: _.Q’fir.-.sys~ .31 15+. £392. AL. _-_—_— ‘ofi‘ La M_s_.l..1_,_ .aflegm-Tgn _mefiqd __—.1_.L. _._._._- . 6g: (.94 J5 _#% ptf‘ €fi__— 1 1 @mm. " ' _ _I _ _.i _._%__ .3. £49;in _an:.s_.1J°A.n_g cunt _Err _ 3___.__ -—-...- AJ-KJ .3 .94- CW4;.W§AQ‘_Q___#__ _ __ .9?!“ _H _ __ .eq. d .3 Drmdflygj C3. Mg Lag“; aflmdg . .L‘s . _ _m¢._"s_:'__._L_sL;L!_ mu b.4513 (.st dire fig“), Joc- JL; 94324: .J! («A @195. __ _ W9 J‘- S‘efi‘nfl‘ 10:55 H» —— _ __ _ _ _ . _. .9302- _L . ..,~ 10me ..azn_ma_«_d_|é2tct______fi__ _ _ {7‘ wall.) fife”? Handfmzi _____.__ med, ,9er _._ _ W419}?! J... wrfl+e.__ .13.) Read J‘ _ A. 53:41 J! (FL. m. --—.—CU.WM pwi'fian—flCJL 4.513 -10"— _._ 3 “fit: eh” n 5 heme; 2+,” ,5 ,, 53$ ,5 ,3 HE): J} :L pa affine-n p_§‘l"“__)i__ —dicc£im:xjn45_o_,__b_._em|3_ __u a}; 3,269. J tgémQJJ. ___ _@_[ereminon mafia.” DJL em (CJL gage/K); ___ JHLJ.Q..23&£UI_ J1 aJ-FT Jab/_n .. ___” Wh__ n. _. $154” Mm; we aim/(Mpgsvdmn PW: wflM _____..__ agatng punk; _. __ _ _—Mg_u_.w‘n_.=gw _m J.) a) 341.3%:3... . __ - . __ .QML_§JA.LLH.___ @ deflate 3 we; seam Haei_clim.dm:3. gulf—TL ___ “GU/fled _H'Ie, 0153.9 cred-24:4 __—‘dj_mctng_aa1@_,_w_e_m&ag__ a.¢2&.€r.&_ apnea, .-.....m....50 Haai'r’i' mm- be, reusw __bj_.m5har prim? efaéc _.%k__c,_. dimofc Mg. {5% “_che M Li: £54.54, EmfifiLLsfi-L}; -fl fi__ . _(_,0La C5,; 33-9%,: Ilia arm'bdm_ #41. _C'JJLA 92.;4W dimchr m __ .n . J J Zane: .f 4fi—_ Mg A] (50": J1 -LLg’nJ Q; , WQLIL. Qfi _ _J__QL_SM_L=’:_JJ-_— .991 n is _idffifi_be£._de£fcp Hfinc’w’? P _— L.daiqn_+_d_e4éjt Dir. in __ __ a—- _ ._ _.QJ:r;__§im_c/mrg\_ _.__ __ __ {a Dir, ‘3‘.1'Kucfu&________ _@__ 50mg, operating Sgsl'ms mede Felon-“lies gr jacking em Open Fife OVSedu’ons moot Frail all} Docks won) one, pmc. hp flow A :91 and pawn?!“ olhof processes Prom gaming QCCst In: H. £519., flocks an: 1453qu For H925 warms;th 55 figfifii Open File Locking M... I Provided by some operating systems and file systems.- - I Mediates access to a file I Mandatory or advisory: ' o Mandatory - access is denied depending on locks held and requested :- Advisory — processes can fi do nd status of locks and decide what to (madefmxi'rer 10:15 Jl :5; 3y cflu SI'UL ""'—_—'_"—--_. ONES an: Proc. afar hame sewn? ijfis Cam . flat-[Ufa a Com acqiigeéksmh Os aneuv ilfl (ELL: cg ouan J! Ls} Pmc'rggr U41: Aim?" -39“. :3 3A4: pmc- final:- _ Can—- a: mg 3 /;,._, fa. "£13; £g‘m'f7c'.’ "" ' '—_“c—_.t;';_fl: __! File Locking Example — Java Pl i I WLMCgu,®i out! echusm our dead—:L‘m importjava.io.": l.) EFL J] M 01L.“ Showed 3 import java.nio.channels.'; public class LockingExarnple { Dublic static final Mlean EXCLUSIVE=faI5e: ' ptqu 3‘ ‘ -" 993' {1f public static final bgolegn SHAREQ = true: W Lat—“- public static void main(String arsgfl} throws IOExceptn'on f FileLock sharedLock = null: FiIeLock exclusiveLock = nulz: W { RandooncessFiie ref = new RaanrnAccessFilel"file.txt". "n~"): - H get the channel for the file ' I FileChannel ch 2 rafgetChannelO; —-—————'>- a“ wannefl ‘9} U dam .43.! if this looks the first haif of the file - exclusive foo“ K‘ (4,.“ p;& ' E J: ' exoiusiveLook = ch.lock(0. raf.length()l2. EXCLUSIVE): "‘ i Y9 I D Q L C4 1“ Now modify the data . . - “LI/1 l! release the lock J 1 Meal "7-) exciusiveLocK.release[}; raise L—U 63".“ 04—1-31 GL3 . I ‘5 GEL J‘d‘szfii‘63fiMpock MM rapt-vi. * exclusive, ck °“‘* Lei“ wile; _ [£ii1LJncK. f5 Qndfiihg __ W ~_,___ _ . _ _— ____;_Xg a; J! blackwfl _flw.r_¢;ui gigs; c1145.- .51 _ _ “($151.3 #4__a._gp__ ._p¥3:§-_- eLU—LQ ..S/mJ dad 4.3%,“. ‘ __3.___._ _HLHflaCFc-Lesimw (74.): UL: _u mg, L, .531:_,._g+i7____ 9 [[9:13ng _ _ _ _ ___Lgiflififlglsjzamw— __ the b e 915:}; nfiflnfi and? 1.3 _ M_exci9usm__ pasl'h‘mj cit-P 4mg mgs‘e_fi__ . _ _ —b2jn.fl__.£c.Ck.Ld.___ _ ___ ____. __..— ___ _._ ._ _ _ _._ _.. :3: " _ ‘ plifll J‘ M 0L.” LLB -« ' ' File Locking Example —“ F""‘-L“’°‘-“3:“‘ Java API(Cont.) 9"?“ I'm“ ‘ ‘ ‘- ii this looks the second half of lhe file - shared SharedLock — uli.lock{raf.lenglh()!2+1. rafJengthO, SHAREDx _ worsroti:t|:ekdala . . . *i I ,.... (fir—“x re 6 B C Q sharedLockmeleaSeo; Q Fm "1 ..__5_+.h_+ 1L } catonfiava.io.!OExoeplion ioe) { Systemerrprintlnfioe): '" }final|y { if (exciusiveLock != null) exolusiveLock.release{); I if (sharedLock != null) shared Lock. releasa( ); } i } OCCCJSS /I§L\.£_}:\s Frees J! 65"; -- rwl’l'og.‘ } Shame! Orb-'1 (flu—«#553 i—‘éilg Ji (an wine ) closes; all“; (JIM. 6,, a“, prune“ 4.25531 imfii i - excflu‘sfw. cw fleas; .ltlu.:,____,0ock_. few.) +64 File Types -—- Name, Extension . One c5 iaJTn‘buJT—l': Wp,_j9)(,_'flii wordproééssor - Evarious'worélibmcessnr _ i dOG._ .' - . _Llormats_“ i library *_ " : lib, a, so. dll . librariés of roulihés for - _. programmers prim or View po. pdfl'jpg nsou or binary file in a 5 format imprinting or _ I i viewing archive ' arc, zip. tar related files grouped into . one file, someti mes oom— i . pressed, for archiving WWW-399 ...................... multimedia 5' moag‘ mov. rm. binary lilo containing mp3, ewi i audio or All! information .— nofeg 7h; 33.51'6m uses Hm exl'ensron +o indi‘c’nd‘e Hue 43m O‘P HIP. 95k and Hag, iype o-P @pefod‘i'onj Hind” (3am be alone do fiat pipe- Access Methods For flies W ........ :n n... .. E - - Esq-emutm-i-hueewas _ read next 6 5‘ 4-, . £315, by ,Qv'I"Q— 6—”‘—" 9)” write next 9"“ 9 J1 gfi‘ " ' " " . reset/ 6* 1 +Q’Pe no read after last write I Direct Access . A Eric [‘5 mdeura (were, access r‘xed-flemgf“ Jogimfi mac» rob ex . dlrsk position to n Head Mood Programs +0 readnext ma; Md Lurihiy lute (d3 write next , i _ rewrite n Va .03 dfly on no 01 WT: C uflaf n = relaiive block number 0 r d e r. I ! noteg .‘L‘ Hm; access Mdhod Mauls be“! -_>. “‘13 .r—‘n QED/1 dam Rec-2.2.5 Neil-10d ‘ Sequential-access File current position and beginning I: read or write w i771; 5"ije5+ access Marked f5 qumfiafl necess, I hope in HM. pi'fle I'S {DI/5:12.35“ in- order, one, meant! Age-I" m o+her_ 11,35 made. orP acCess is 1:3 Raf Hie. mlbsT‘ I Cammona‘ QI’ 1' EdH‘ors and Ca m’kfs ! : “Sum! “C6955 Fries in HIPS fiaski'on = Simulation of Sequential Access on Directwaccess File :: Uari'oible ‘H'lfid' decrm‘ls "" — our car/314:7: pOSi'Tl'OF'i" ' ‘ implementation for direct access v - ‘ Sequential access resef read next write next n . ! ' logical record nape" P] 5 ' -' last nanie ‘ number _ J aid, Lia) l i (search dim Kc: only) i index file relative file : I flew mej’th Wefiflj indefiua Hoe Confirfuchbn ,‘ndv‘ Elf Hie Pffle. Th¢Ind¢x ,PJ'KA Om index In HR; back 0? albwk, COM—fling POWTQVS {‘0 fine, Ual’i'ous bpocks. T3 Fi‘nd office-“d in flat pipe I we firs‘f Search “1:. index and Hth age, all"; poiner *0 aCCeSS Hie. fi'fle dl'fecfifi and TO Fwd HM die-5"ch rem-d- A f}ng sflst‘m Consists 0'0 £135 (6' dime/10'" Directory Structure “My! mam?“ Difci‘org and prowess trips. 1. l' I A collection of nodes containing information about all files ab” ‘p’ 02" ‘ —"""— in the $3 S+em Directory Files Both the directory structure and the files reside on disk Backups of these two structures are kept on tapes —-—Id— - —" '- ——__ _ ______ _..—-._ Disk Structure ' fur-x, ’ ? Disk can be subdivided into partitions / one 5"3KJQJ'SJ. ii; Disks or partitions can be RAID protected against failure ——- I Disk or partition can be used raw — without a file system, or formatted with a file 5 stem M . an, , j___._,_ flied _‘ 'Mkfiqu! : __ 1 . . . I Partitions also knownis minidlsks, slices 55 3"“ I I Sing Entity containing file system known as a volume 7.... Pm LS- _, I Each volume containing file system also tracks that file system's info in '1” l U" device directory or volume table of contents ‘ I .. —-—-——— M i533» I As well as genera-purpose file systems there are many special- purpose file systems. frequently all within the same operating system i or computer Mfigfisflw 4.55% WWprpou' Confident NLwi C_-§ NLJ—olfi-e UJ flies Jl @ @3413“ C’vd‘i: FM“ J' _ disks Jl (random -—c4c1<::J-S “5+0qu devices) 535‘ )l Lskc (D wggi Afifl‘wls S karate” demise J\ 2 or‘4- par‘h'fi‘lbhs Gribl 6—15; (Isis: Ml G.) On: storage device 9-45“ 236 “snub drSk/wflwl © thf4'v4'r'on"h5 ['5 unset—5L9 For jl‘ml.+‘l'8 SIP 2: mo mama-amt? L‘er 531$th» Pmr‘nj mdh‘péz 9.202 555. UP“ 0" H10, 5MP— deWC": or jéau‘fi‘l load» a") “m elevate, QLUmLQQJpCL 90f Othf—V “535* ' I I h I - A Typical File-system Organization ( directory partition A partition B I : directory partition C files ' l Shfigc deUICCS Can GLPSO be, mlfecfed ‘f’ogz/chr- info IQ ID 5 6175 _ Pro UI'GLLH p Y‘QTC-CZ‘ib.” From... ... =5.l.fi_gfe d Ills K .__._. , . __ ._ _.__ __ ___. . ___.. _i Operations Performed on Directory I Search forafile 2 search at drum.ij 9mm 1'0 PM! Hue; Mfg Fara pmcrfcuflar W‘Ee- 4, I Createafile 3 New Wigs need'h: be, Granite] and o‘d‘le'al 6 Hm: directing I Delete afile 3 when at {We is no long“ mededr Wfiwqfi h” be, able, ‘ha Mat}; H- Pram +hg, dfmrg- ' - Li tadirectory sired“ Hm times in adfrtdwfl 474M C°H10d3 Hm dimcfowwr'g for each Free a. he 1365+- l Renameafile 3 we. mag mama «9:92.. whem Hap. Corrwa OI,- MS-e- Chg/nag} I Traverse the file system 3 wc Maj Lugs), 4-1:, am 55 W: ' 2. durflci‘cry and are)?! {We mid-Mn a clfrcdfbfi Si'r'ug‘wr‘e- Wm" (Logically) to Obtain [47 i) DfiLJJ'dm‘ / .5 H513 G) I Efficiency—locating a-file quickly -j-‘- in") '- Phi-F— @ II Naming — convenient to users ' H m n Two usersfi have same name for different files , an" moi" E Cam The same file can have several different names a if n of 6 .I' @I Grouping — logical grouping of files by properties, (e.g., all Java programs. all games, ...) Nun 99am (Mal-5% as : 161» Let“?! /_:,i oi): Girl'M-IIOH at ? ‘1.) 4.1.11: Qmupfnfl y | In Hoe, Po—Qflowinj fie.drbns,tue describe. +he. mesa“ Q0.mf”°" Schemfi’t. 900’” de-ginffi ‘Hfle. 1031"qu Syydm 1.: I: _ ___ ._ _ _ _ ._ _. ' (D Single-Level Directory (simpflas’i di’rdcif‘ov'y 53‘Vudm) r} . _ P m I Asingle directory for all use 5 "‘03 a?” d'Md" _‘j \f—“x/fl'l“ l'n opal opaMr‘na sgs+em3 All Div-10.25 m co "firmed in One big diva-def? (1(qu aficaflfla d—s/pmfig emrj as 9+ new rifle. JL-fiu Gt" user ’14-} ¥~ Grouping problem 0-5 J! ’J'C'od'“ Ni.) £231.99? W'JL-i‘ ~— t Qigdfredoyg kM‘U WU Obj-.53 3(- Naming problem cflirzc'h’ficfi ASE-4L. CIJW M a!“ Q'fie; f1 ML) di‘mdg GU Wmlb?gfln3£bd"md°flfi l6 8 inert, Hurt F's GSeparaie diffichH 3" each user. Cg) Two-Level Directory I Separate directory for each user a Sub_dr'rfdorj can “61- " POEM +0 anoflner subdl'mcxbrfl master file i user 1 directory I. ..................... .. 59 file U l' “Her 2 I me 3 ................... % me an”: 9°” each User‘s each Mrj PMMS’ A” F’moflwcr -‘ "-2 1 1 subdfvud directory 0;!- bo_ 5“ Keir” & daralra “M 9 fine: ain't ll Path name @121 name cal-fife uniquely, a uscr mus‘f Hnouu name up He: fife. desired- I Can have the same fite name for different user I Emelenteearchlng” ML.“ ' -. "#2 299‘?) #1 lg». n; ub*_ I No grouping capability - Lab—EA user’co rcw» WP; as end; :Ai ',.c SR}; *OISK user: ' _,..'. 15:; user __J..l _M1;_E&_u__2_l_ _ _ fl ewg 1312 M 53512111 has 0'. um'que park £4312“? V300? J1 Wanj; SM}: Binderkes Subdir, I553 131:. g"! Subdir. 7- M'm nu Gpc‘SUbJVu‘JL’LJ )7?" ”" I» “6&0? ' Q Q Q Q 3 fl . . A dwedarg (or sadrmog Card-aims awoipfl'f'bs or glacierj‘éfidorisflg ('2‘; d‘ r '3 55.12% a: afln f P.“ bufi'i’rt’s immd In a 5P 0:1" dar m a l ‘ ' n e " , . ma d,‘r~;dbfle:j$ have Hue, We. ink!”an Format. One br+ ml e::r ('1) J Mg define) ‘H‘Wr GS «131qu or as q gubdtm j .. 9k Tree-Structured Directories (Cont) I Efficient searching I Grouping Capability I Current directory (working directory) 1» cdlspeltlmaillprog 0 type list hotegm’rhe Carma/Ul- di‘reciarj Shoufld Cmni'aln most Up Hoe ‘ 0—D carmd’ in relief)? 'l'a Hm. process 1 @gflgghftih be, 00 +£1.30 4-3;:ng AbSofluie and Wm. 2.1.Anabsopufl‘e path-1 mama. begin ai’ Her roo‘f‘ and Pogo“); a put-k down “he +hL "spedpi'ed nje, ' ZIQJQWI'W POI-aH’l Ham-e. def-Emu £34th From “LL CWM‘ - cit-tofu! i ! 6)” if the (1ng directon 1‘s M'r/f'P‘SQF/mqrfl the" {he — - _ [Perl .P «.51: 'Mfilfifim'jbfi'ffgjfi—meffiffig i as does H“ 01°50‘3um "W Net/SM/maifi/Ptr/Q‘rfi Tree-Structured Directories (Cont) Absolute or relatiVe path name I Creating a new file is done in current directory W I Delete a file In efrle-name'p l Creating a new subdirectory is done in current directory mkdir <dir-name> Example: if in current directory (mail mkdi Free ‘4'” L" 2user3 W ghmrs‘ns ‘gJ-O-L—i £22k J1 (3‘31" Deleting "mail" :9 deleting the entire eubtree rooted by “mail” \Y Sham? ZL‘Lpl ugcfiz _Jl gnu: UL GY- quufflrl".m LD- / HOP-1’ eUJ (- J _._ <Cyc€¢ ? flaw I Have shared subdireciories and files Ag; wub m ...... m ado ? b .' rL )\ upflar 333 ' ’6" wéflm /" visaan 2 d‘ENJGI’i‘E‘j fiwfifiéca MRS 3 M 45 lama wrii/ d)" Haw-0.5 I! (fist Acyclic-Graph Directories (Cont) ' I Two different names (aliasing) n O) J fix Nb APB ’ ' Cop . I If dfcrdeletes list: dangling pointer - 14-3-43) N’” j Solutions: a Backpointers. so we can delete all pointers I , Variable size records a problem ,Up . w I Backpointers using a daisy chain organization - o Entry-hold-count solution I New directory entry type a Link — another name (pointer) to an existing file 0 Resolve the link — follow pointer to locate the file wma'ouuul (‘3 3.1;, Hiya.» a, ,5) @ General Graph Directory l;_.a.+_~‘_l 4.9.4402: ‘ text Lmai'l count boolr‘ Lib—oak mail unhex[ General Graph Directory (Cont) I How do we guarantee no cycles? 0 Allow only links to file not subdirectories I Garbage collection 0 Every time a new link is added use a cycle detection algorithm to determine whether it is OK le File System Mca‘untin§]/’—\A # under I_ A filesystem _m_us_t be {haunted before it can be accessed 5%!) <51“qu g Aunmounted file system (i.e., Fig. 11-11(b)) is mounted at a mount point mil—(3A0 Wjdi'skfi‘igpb-‘E. awash .moum‘il'vfl CU—AIJ L50 U I ,_ e k i ' 5M}: dimmrj w W (SL573 ! mien—‘3' WE); | _. . I (a) Existing (b)Unmounted Partition ‘ , {290+ dimrjcfj I \‘i Mount Point File Sharing '__L'—'—————-———_.___H I Sharing of files on multi-user systems is desirable I Sharing may be done through a protection scheme I On distributed systems, files may be shared across a network I Network File System (NFS) is a common distributed file-sharing method ‘3) Ch. \b ...
View Full Document

This note was uploaded on 05/06/2011 for the course CS 12 taught by Professor Staff during the Spring '08 term at University of Texas at Austin.

Page1 / 20

OS_Lec18_0511 - DV saviour -' c155 20!)...

This preview shows document pages 1 - 20. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online