




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、IntroductionFile Service ArchitectureSun Network File SystemThe Andrew File SystemRecent advancesSummaryChapter 7: Distributed File SystemsFile systempersistent storageDistributed file systempersistent storageinformation sharingsimilar (in some case better) performance and reliabilityVarious kinds o
2、f storage systemsIntroductionResponsibilitiesOrganization, storage, retrieval, naming, sharing and protectionImportant concepts related to fileFileInclude data and attributesDirectoryA special file that provides a mapping from text names to internal file identifiersMetadataExtra management informati
3、on; including attribute, directory etcFile system architectureFile system operationsApplications access via library proceduresCharacteristics of file systemsTransparencyaccess transparencylocation transparencymobility transparencyperformance transparencyscaling transparencyConcurrent file updatescon
4、currency controlFile replicationbetter performance & fault toleranceHardware and operating system heterogeneityDistributed file system requirementsFault toleranceidempotent operations: support at-least-semanticsstateless server: restart from crash without recoveryConsistencyOne-copy update semantics
5、SecurityAuthenticate, access control, secure channelEfficiencycomparable with, or better than local file systems in performance and reliabilityDistributed file system requirements continutedSUN NFSFirst file service that was designed as a product 1984Adopted as a internet standardSupported by almost
6、 platforms, e.g. Windows NT, UnixAndrew File SystemCampus information sharing system in CMU 1986800 workstations and 40 servers at CMU 1991Case studiesIntroductionFile Service ArchitectureSun Network File SystemThe Andrew File SystemRecent advancesSummaryChapter 7: Distributed File SystemsFile servi
7、ce architectureFlat file serviceOperate on the contents of filesUnique file identifier (UFID)Directory serviceProvide a mapping between text names to UFIDsClient moduleSupport applications accessing remote file service transparentlyE.g. iterative request to directory service, cache filesThree compon
8、ents of a file serviceFlat file service operationsComparison with UnixNo open and closeRead or write specifying a starting pointFault tolerance reasons for the differencesRepeatable operationsexcept for create, all operations are idempotentStateless serversE.g. without pointer when operate on filesr
9、estart after crash without recoveryFlat file service interfaceUnix File SystemUsers access rights are checked against the access mode requested in the open callStateless DFSDFSs interface is opened to publicFile server cant retain the user IDTwo approaches for access control(1) authenticate based on
10、 capability(2) attach user ID on each requestKerberos in AFS and NFSAccess control in DFSMain taskTranslate text names to UFIDsDirectory service interfaceLookup(Dir, Name) - FileId throws NotFound Locates the text name in the directory and returns therelevant UFID. If Name is not in the directory, t
11、hrows anexception. AddName(Dir, Name, File) throws NameDuplicate If Name is not in the directory, adds (Name, File) to thedirectory and updates the files attribute record.If Name is already in the directory: throws an exception. UnName(Dir, Name) throws NotFound If Name is in the directory: the entr
12、y containing Name isremoved from the directory. If Name is not in the directory: throws an exception. GetNames(Dir, Pattern) - NameSeq Returns all the text names in the directory that match theregular expression Pattern.Directory treeEach directory is a special fileholds the names of the files and o
13、ther directories that are accessible from itPathnameReference a file or a directoryMulti-part name, e.g. “/etc/rc.d/init.d/nfsd”Explore in the tree Translate pathname via multiple lookup operationsDirectory cache at the clientHierarchic file systemIntroductionFile Service ArchitectureSun Network Fil
14、e SystemThe Andrew File SystemRecent advancesSummaryChapter 7: Distributed File SystemsNFS architectureUNIX kernelprotocolClient computerServer computersystem callsLocalRemoteUNIXfilesystemNFSclientNFSserverUNIXfilesystemApplicationprogramApplicationprogramNFSUNIXUNIX kernelVirtual file systemVirtua
15、l file systemOther file systemKeep track of local and remote file systemV-nodeFor local file: refer to an i-nodeFor remote file: refer to a file handleFile handleThe file identifier used in NFSFile handles are passed between client and server to refer to a fileVirtual file systemFilesystem identifie
16、ri-node number of filei-node generation numberFile handleAccess control and authenticationUser ID is attached to each requestKerberos embedded in NFSAuthenticate user when mount Ticket, Authenticator and secure channelClient integration into the kernelNo pilationSingle client module serving all user
17、-level processesRetain encryption key used to authenticate user ID passed to the serverNFS Server interfaceDefined in RFC 1813 Design pointsFile server/etc/exports: contains the names of local file systems that are available for remote mountingClientmount command: include location, pathname of the r
18、emote directoryExampleMount serviceHard-mounted/soft-mountedHard-mounted: process suspends when the accessing remote directory is unavailableSoft-mounted: indicate the error to the process after several triesAutomountermount dynamically whenever an empty mount point is referenced by a clientMount se
19、rvice continuedPath name translationFrom pathname to file handleMulti-part pathname translationClient issues several separated lookup requests to serverDirectory cacheCache the results of translation conducted recentlyPath name translationBuffer cache in UNIX file systemread-aheaddelay-writesync per
20、iodically, e.g. 30 secondsCache reading in NFS serverSimilar to local file systemCache writing in NFS server: enhance reliabilitywrite-throughcommit operation File cache at the serverCache file blocks at the clientMaintain coherenceClient polls server to validate the blocks when using the blocksVali
21、dity conditionTwo timestamp attached to each block in the cacheTc: the time when the cache entry was last validatedTm : the time when the block was last modified at the serverValid: (T-Tc Data throws BadPositionIf 1 i Length(File): Reads a sequence of up to n itemsfrom a file starting at item i and
22、returns it in Data.Write(FileId, i, Data) throws BadPositionIf 1 i Length(File)+1: Writes a sequence of Data to afile, starting at item i, extending the file if necessary.Create() - FileIdCreates a new file of length 0 and delivers a UFID for it. Delete(FileId) Removes the file from the file store.G
23、etAttributes(FileId) - Attr Returns the file attributes for the file. SetAttributes(FileId, Attr) Sets the file attributes (only those attributes that are notshaded in ).NFS server operations (simplified) - 1lookup(dirfh, name) - fh, attrReturns file handle and attributes for the file name in the di
24、rectory dirfh. create(dirfh, name, attr) - newfh, attrCreates a new file name in directory dirfh with attributes attr andreturns the new file handle and attributes.remove(dirfh, name) statusRemoves file name from directory dirfh.getattr(fh) - attrReturns file attributes of file fh. (Similar to the U
25、NIX stat system call.)setattr(fh, attr) - attrSets the attributes (mode, user id, group id, size, access time andmodify time of a file). Setting the size to 0 truncates the file.read(fh, offset, count) - attr, dataReturns up to count bytes of data from a file starting at offset.Also returns the late
26、st attributes of the file.write(fh, offset, count, data) - attrWrites count bytes of data to a file starting at offset. Returns theattributes of the file after the write has taken place.rename(dirfh, name, todirfh, toname)- statusChanges the name of file name in directory dirfh to toname indirectory
27、 to todirfh.link(newdirfh, newname, dirfh, name) - statusCreates an entry newname in the directory newdirfh which refers tofile name in the directory dirfh.NFS server operations (simplified) - 2symlink(newdirfh, newname, string)- statusCreates an entry newname in the directory newdirfh of typesymbol
28、ic link with the value string. The server does not interpretthe string but makes a symbolic link file to hold it.readlink(fh) - stringReturns the string that is associated with the symbolic link fileidentified by fh.mkdir(dirfh, name, attr) - newfh, attrCreates a new directory name with attributes a
29、ttr and returns thenew file handle and attributes.rmdir(dirfh, name) - statusRemoves the empty directory name from the parent directory dirfh.Fails if the directory is not empty.readdir(dirfh, cookie, count) - entriesReturns up to count bytes of directory entries from the directorydirfh. Each entry
30、contains a file name, a file handle, and an opaquepointer to the next directory entry, called a cookie. The cookie isused in subsequent readdir calls to start reading from the followingentry. If the value of cookie is 0, reads from the first entry in thedirectory.statfs(fh) - fsstatsReturns file sys
31、tem information (such as block size, number offree blocks and so on) for the file system containing a file fh.Local and remote file systems accessible on an NFS clientDistribution of processes in the Andrew File SystemFile name space seen by clients of AFSSystem call interception in AFSAFS fidVolume numberFile handleUniquifier32 bits32 bits32 bitsThe main components of the Vic
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 平?jīng)雎殬I(yè)技術(shù)學(xué)院《影視美術(shù)》2023-2024學(xué)年第二學(xué)期期末試卷
- 衡陽師范學(xué)院南岳學(xué)院《食品分析(含儀器分析)》2023-2024學(xué)年第一學(xué)期期末試卷
- 南陽職業(yè)學(xué)院《熱力學(xué)與統(tǒng)計物理》2023-2024學(xué)年第一學(xué)期期末試卷
- 勞務(wù)分包擔(dān)保合同
- 委托技術(shù)服務(wù)合同
- 委托設(shè)備維修合同
- 廢舊物資回收承包合同
- 《對不良誘惑說不》學(xué)會拒絕課件-3
- 20253月合同明確的樓宇自控系統(tǒng)第三方接入標(biāo)準(zhǔn)
- 店房租賃合同范本
- 2024-2025學(xué)年中考?xì)v史復(fù)習(xí)- 階段檢測卷三(中國現(xiàn)代史)(含答案)
- 校園安全管理體系總結(jié)與改進(jìn)措施分析
- 【中國信通院蘇州市機(jī)器人產(chǎn)業(yè)協(xié)會】2025“機(jī)器人+人工智能”工業(yè)應(yīng)用研究報告
- 四川省2024年普通高校招生體育類本科批調(diào)檔線
- 2025-2030中國私募股權(quán)行業(yè)市場發(fā)展現(xiàn)狀及前景趨勢與投資戰(zhàn)略研究報告
- 山東省機(jī)場管理集團(tuán)2025年應(yīng)屆畢業(yè)生校園招聘(67人)筆試參考題庫附帶答案詳解
- 江西高管實業(yè)發(fā)展有限公司招聘考試真題2024
- 2025年中國煤炭地質(zhì)總局招聘(392人)筆試參考題庫附帶答案詳解
- 2024年廣東廣州大學(xué)招聘編制內(nèi)管理和教輔人員筆試真題
- 2025浙江紹興市文化旅游集團(tuán)限公司招聘83人易考易錯模擬試題(共500題)試卷后附參考答案
- 工作交接表表格模板
評論
0/150
提交評論