内容分布式计算chapter_第1页
内容分布式计算chapter_第2页
内容分布式计算chapter_第3页
内容分布式计算chapter_第4页
内容分布式计算chapter_第5页
已阅读5页,还剩53页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论