DOC PREVIEW
CORNELL CS 4410 - Distributed File Systems

This preview shows page 1-2-3-22-23-24-44-45-46 out of 46 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Distributed File Systems RPC NFS and AFS Announements Homework 6 available later tonight Due next Tuesday December 2nd See me after class to pick up prelim Upcoming Agenda No class on Thursday Happy Thanksgiving Next week last week of classes December 2nd and 4th Final Thursday December 18th at 2pm Room 131 Warren Hall Length is 2hrs 2 Goals for Today Distributed file systems DFS Network file system NFS Remote Procedure Calls RPC Andrew file system AFS 3 Distributed File Systems DFS 4 Distributed File Systems Goal view a distributed system as a file system Storage is distributed Web tries to make world a collection of hyperlinked documents Issues not common to usual file systems Naming transparency Load balancing Scalability Location and network transparency Fault tolerance We will look at some of these today 5 Transfer Model Upload download Model Client downloads file works on it and writes it back on server Simple and good performance Remote Access Model File only on server client sends commands to get work done 6 Naming transparency Naming is a mapping from logical to physical objects Ideally client interface should be transparent Not distinguish between remote and local files machine path or mounting remote FS in local hierarchy are not transparent A transparent DFS hides the location of files in system 2 forms of transparency Location transparency path gives no hint of file location server1 dir1 dir2 x tells x is on server1 but not where server1 is Location independence move files without changing names Separate naming hierarchy from storage devices hierarchy 7 File Sharing Semantics Sequential consistency reads see previous writes Ordering on all system calls seen by all processors Maintained in single processor systems Can be achieved in DFS with one file server and no caching 8 Caching Keep repeatedly accessed blocks in cache Improves performance of further accesses How it works If needed block not in cache it is fetched and cached Accesses performed on local copy One master file copy on server other copies distributed in DFS Cache consistency problem how to keep cached copy consistent with master file copy Where to cache Disk Pros more reliable data present locally on recovery Memory Pros diskless workstations quicker data access Servers maintain cache in memory 9 File Sharing Semantics Other approaches Write through caches immediately propagate changes in cache files to server Reliable but poor performance Delayed write Writes are not propagated immediately probably on file close Session semantics AFS write file back on close Alternative NFS scan cache periodically and flush modified blocks Better performance but poor reliability File Locking The upload download model locks a downloaded file Other processes wait for file lock to be released 10 Network File System NFS 11 Network File System NFS Developed by Sun Microsystems in 1984 Used to join FSes on multiple computers as one logical whole Used commonly today with UNIX systems Assumptions Allows arbitrary collection of users to share a file system Clients and servers might be on different LANs Machines can be clients and servers at the same time Architecture A server exports one or more of its directories to remote clients Clients access exported directories by mounting them The contents are then accessed as if they were local 12 Example 13 NFS Mount Protocol Client sends path name to server with request to mount Not required to specify where to mount If path is legal and exported server returns file handle Contains FS type disk i node number of directory security info Subsequent accesses from client use file handle Mount can be either at boot or automount Using automount directories are not mounted during boot OS sends a message to servers on first remote file access Automount is helpful since remote dir might not be used at all Mount only affects the client view 14 NFS Protocol Supports directory and file access via remote procedure calls RPCs All UNIX system calls supported other than open close Open and close are intentionally not supported For a read client sends lookup message to server Server looks up file and returns handle Unlike open lookup does not copy info in internal system tables Subsequently read contains file handle offset and num bytes Each message is self contained Pros server is stateless i e no state about open files Cons Locking is difficult no concurrency control 15 NFS Implementation Three main layers System call layer Handles calls like open read and close Virtual File System Layer Maintains table with one entry v node for each open file v nodes indicate if file is local or remote If remote it has enough info to access them For local files FS and i node are recorded NFS Service Layer This lowest layer implements the NFS protocol 16 NFS Layer Structure 17 How NFS works Mount Sys ad calls mount program with remote dir local dir Mount program parses for name of NFS server Contacts server asking for file handle for remote dir If directory exists for remote mounting server returns handle Client kernel constructs v node for remote dir Asks NFS client code to construct r node for file handle Open Kernel realizes that file is on remotely mounted directory Finds r node in v node for the directory NFS client code then opens file enters r node for file in VFS and returns file descriptor for remote node 18 Cache coherency Clients cache file attributes and data If two clients cache the same data cache coherency is lost Solutions Each cache block has a timer 3 sec for data 30 sec for dir Entry is discarded when timer expires On open of cached file its last modify time on server is checked If cached copy is old it is discarded Every 30 sec cache time expires All dirty blocks are written back to the server 19 Remote Procedure Call RPC 20 Procedure Call More natural way is to communicate using procedure calls every language supports it semantics are well defined and understood natural for programmers to use Basic idea define server as a module that exports a set of procedures callable by client programs To use the server the client just does a procedure call as if it were linked with the server call Client Server return 21 Remote Procedure Call So we would like to use procedure call as a model for distributed communication Lots of issues how do we make this invisible to the programmer what are the semantics of parameter passing how is binding done locating the server how do we support heterogeneity OS arch


View Full Document

CORNELL CS 4410 - Distributed File Systems

Download Distributed File Systems
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Distributed File Systems and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Distributed File Systems 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?