From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 12: Distributed.

Slides:



Advertisements
Similar presentations
DISTRIBUTED FILE SYSTEMS
Advertisements

CS6223: Distributed Systems Distributed File Systems.
Slides for Chapter 8: Distributed File Systems From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Pearson Education.
CS 425 / ECE 428 Distributed Systems Fall 2014 Indranil Gupta (Indy) Lecture 27: Distributed File Systems All slides © IG.
Slides for Chapter 8: Distributed File Systems
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition File-System Interface.
CS Distributed Computing Systems Chapter 8: Distributed File Systems Chin-Chih Chang, From Coulouris, Dollimore and Kindberg Distributed.
1 Reliable Distributed Systems Stateless and Stateful Client- Server Systems.
Programming Servers October Programming the Server What happens on the server when the client tries to establish a rendezvous ? The server starts.
6/24/2015B.RamamurthyPage 1 File System B. Ramamurthy.
Programming Servers June Programming the Server What happens on the server when the client tries to establish a rendezvous ? The server starts listening.
7/15/2015B.RamamurthyPage 1 File System B. Ramamurthy.
Distributed Computing Systems
Distributed Processing Systems (Distributed File System) 오 상 규 서강대학교 정보통신 대학원
Networked File System CS Introduction to Operating Systems.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
Distributed File Systems
Distributed File Systems
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
Lecture 7: Distributed File Systems Haibin Zhu, PhD. Assistant Professor Department of Computer Science Nipissing University © 2002.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 10: Peer-to-Peer.
Distributed system Distributed File System Nguyen Huu Tuong Vinh Huynh Thi Thu Thuy Dang Trang Tri.
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Chapter 10: File-System.
Page 110/19/2015 CSE 30341: Operating Systems Principles Chapter 10: File-System Interface  Objectives:  To explain the function of file systems  To.
DISTRIBUTED FILE SYSTEM 1 DISTRIBUTED FILE SYSTEMS From Chapter 8 of Distributed Systems Concepts and Design,4 th Edition, By G. Coulouris, J. Dollimore.
1 Chap8 Distributed File Systems  Background knowledge  8.1Introduction –8.1.1 Characteristics of File systems –8.1.2 Distributed file system requirements.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Exercises for Chapter 12: Distributed.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Addison-Wesley Publishers Distribuerede.
Distributed File Systems File  A file is a collection of data with a user view (file structure) and a physical view (blocks).  Files contain both data.
DISTRIBUTED FILE SYSTEMS Pages - all 1. Topics  Introduction  File Service Architecture  DFS: Case Studies  Case Study: Sun NFS  Case Study: The.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 21: Designing.
Lecture 27-1 Computer Science 425 Distributed Systems CS 425 / ECE 428 Fall 2013 Indranil Gupta (Indy) December 3, 2013 Lecture 27 Distributed File Systems.
Distributed System and Middleware Distributed Systems Distributed File System Dr. Sunny Jeong. Mr. Coling Zhang
DISTRIBUTED FILE SYSTEM 1 DISTRIBUTED FILE SYSTEMS.
Lecture 27-1 Lecture 28-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2012 Indranil Gupta (Indy) December 6, 2012 Lecture.
Information Management NTU Distributed File Systems.
Slide 13-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter File Management.
1 Reliable Distributed Systems Stateless and Stateful Client- Server Systems.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 7: Operating.
Exercises for Chapter 9: Name Services From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Pearson Education 2005.
1 Distribuerede systemer og sikkerhed – 4. marts 2002 zFrom Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design zEdition 3, © Addison-Wesley.
Distributed File Systems Questions answered in this lecture: Why are distributed file systems useful? What is difficult about distributed file systems?
Distributed Systems Coulouris 5’th Ed Distributed Systems Distributed File Systems Understand a Generic Distributed File System Understand.
Distributed Computing Systems Distributed File Systems.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 9 Web Services.
1 Reliable Distributed Systems Stateless and Stateful Client- Server Systems Based on K. Birman’s of Cornell, Dusseu’s of Wisconsin.
Distributed Systems Course Distributed File Systems
Distributed File Systems (DFS)
Andrew File System (AFS)
Lecture 25: Distributed File Systems
Understand Distributed Object System (Short)
Lecture 25: Distributed File Systems
Programming Models for Distributed Application
Chapter 8: Distributed File Systems
File System B. Ramamurthy B.Ramamurthy 11/27/2018.
Slides for Chapter 8: Distributed File Systems
Distributed File Systems
Ch. 7 Distributed File Systems
Slides for Chapter 6: Operating System support
Distributed File Systems
Distributed Systems Course Distributed File Systems
Exercises for Chapter 8: Distributed File Systems
Distributed File System
Exercises for Chapter 16: Distributed Shared Memory
Lecture 25: Distributed File Systems
Distributed file system
Distributed File Systems
Today: Distributed File Systems
Distributed File Systems
Slides for Chapter 14: Time and Global States
Presentation transcript:

From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 12: Distributed File Systems

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 12.1 Storage systems and their properties SharingPersis- tence Distributed cache/replicas Consistency maintenance Example Main memory RAM File systemUNIX file system Distributed file systemSun NFS Web Web server Distributed shared memoryIvy (DSM, Ch. 18) Remote objects (RMI/ORB)CORBA Persistent object store 1 CORBA Persistent Object Service Peer-to-peer storage system OceanStore (Ch. 10) Types of consistency: 1: strict one-copy. : slightly weaker guarantees. 2: considerably weaker guarantees.

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 12.2 File system modules

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 12.3 File attribute record structure File length Creation timestamp Read timestamp Write timestamp Attribute timestamp Reference count Owner File type Access control list

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 12.4 UNIX file system operations filedes = open(name, mode) filedes = creat(name, mode) Opens an existing file with the given name. Creates a new file with the given name. Both operations deliver a file descriptor referencing the open file. The mode is read, write or both. status = close(filedes)Closes the open file filedes. count = read(filedes, buffer, n) count = write(filedes, buffer, n) Transfers n bytes from the file referenced by filedes to buffer. Transfers n bytes to the file referenced by filedes from buffer. Both operations deliver the number of bytes actually transferred and advance the read-write pointer. pos = lseek(filedes, offset, whence) Moves the read-write pointer to offset (relative or absolute, depending on whence). status = unlink(name)Removes the file name from the directory structure. If the file has no other names, it is deleted. status = link(name1, name2)Adds a new name (name2) for a file (name1). status = stat(name, buffer)Gets the file attributes for file name into buffer.

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 12.5 File service architecture Client computerServer computer Application program Application program Client module Flat file service Directory service

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 12.6 Flat file service operations Read(FileId, i, n) -> Data —throws BadPosition If 1 ≤ i ≤ Length(File): Reads a sequence of up to n items from a file starting at item i and returns it in Data. Write(FileId, i, Data) —throws BadPosition If 1 ≤ i ≤ Length(File)+1: Writes a sequence of Data to a file, 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. GetAttributes(FileId) -> Attr Returns the file attributes for the file. SetAttributes(FileId, Attr) Sets the file attributes (only those attributes that are not shaded in Figure 12.3).

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 12.7 Directory service operations Lookup(Dir, Name) -> FileId — throws NotFound Locates the text name in the directory and returns the relevant UFID. If Name is not in the directory, throws an exception. AddName(Dir, Name, FileId) —throws NameDuplicate If Name is not in the directory, adds (Name, File) to the directory and updates the file’s attribute record. If Name is already in the directory: throws an exception. UnName(Dir, Name) —throws NotFound If Name is in the directory: the entry containing Name is removed 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 the regular expression Pattern.

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 12.8 NFS architecture UNIX kernel protocol Client computerServer computer system calls LocalRemote UNIX file system NFS client NFS server UNIX file system Application program Application program NFS UNIX UNIX kernel Virtual file system Other file system

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 12.9 NFS server operations (simplified) – 1 lookup(dirfh, name) -> fh, attr Returns file handle and attributes for the file name in the directory dirfh. create(dirfh, name, attr) ->  newfh, attr Creates a new file name in directory dirfh with attributes attr and returns the new file handle and attributes. remove(dirfh, name) status Removes file name from directory dirfh. getattr(fh) -> attr Returns file attributes of file fh. (Similar to the UNIX stat system call.) setattr(fh, attr) -> attr Sets the attributes (mode, user id, group id, size, access time and modify time of a file). Setting the size to 0 truncates the file. read(fh, offset, count) -> attr, data Returns up to count bytes of data from a file starting at offset. Also returns the latest attributes of the file. write(fh, offset, count, data) -> attr Writes count bytes of data to a file starting at offset. Returns the attributes of the file after the write has taken place. rename(dirfh, name, todirfh, toname) -> status Changes the name of file name in directory dirfh to toname in directory to todirfh. link(newdirfh, newname, dirfh, name) -> status Creates an entry newname in the directory newdirfh which refers to file name in the directory dirfh. Continues on next slide...

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure 12.9 NFS server operations (simplified) – 2 symlink(newdirfh, newname, string) -> status Creates an entry newname in the directory newdirfh of type symbolic link with the value string. The server does not interpret the string but makes a symbolic link file to hold it. readlink(fh) -> string Returns the string that is associated with the symbolic link file identified by fh. mkdir(dirfh, name, attr) -> newfh, attr Creates a new directory name with attributes attr and returns the new file handle and attributes. rmdir(dirfh, name) -> status Removes the empty directory name from the parent directory dirfh. Fails if the directory is not empty. readdir(dirfh, cookie, count) -> entries Returns up to count bytes of directory entries from the directory dirfh. Each entry contains a file name, a file handle, and an opaque pointer to the next directory entry, called a cookie. The cookie is used in subsequent readdir calls to start reading from the following entry. If the value of cookie is 0, reads from the first entry in the directory. statfs(fh) -> fsstats Returns file system information (such as block size, number of free blocks and so on) for the file system containing a file fh.

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure Local and remote file systems accessible on an NFS client Note: The file system mounted at /usr/students in the client is actually the sub-tree located at /export/people in Server 1; the file system mounted at /usr/staff in the client is actually the sub-tree located at /nfs/users in Server 2.

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure Distribution of processes in the Andrew File System

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure File name space seen by clients of AFS

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure System call interception in AFS

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure Implementation of file system calls in AFS

Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012 Figure The main components of the Vice service interface Fetch(fid) -> attr, dataReturns the attributes (status) and, optionally, the contents of file identified by the fid and records a callback promise on it. Store(fid, attr, data)Updates the attributes and (optionally) the contents of a specified file. Create() -> fidCreates a new file and records a callback promise on it. Remove(fid)Deletes the specified file. SetLock(fid, mode)Sets a lock on the specified file or directory. The mode of the lock may be shared or exclusive. Locks that are not removed expire after 30 minutes. ReleaseLock(fid)Unlocks the specified file or directory. RemoveCallback(fid)Informs server that a Venus process has flushed a file from its cache. BreakCallback(fid)This call is made by a Vice server to a Venus process. It cancels the callback promise on the relevant file.