內(nèi)容分布式計算chapter_第1頁
內(nèi)容分布式計算chapter_第2頁
內(nèi)容分布式計算chapter_第3頁
內(nèi)容分布式計算chapter_第4頁
內(nèi)容分布式計算chapter_第5頁
已閱讀5頁,還剩53頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(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)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論