Unformatted text preview:

CSE 8343 Adv OS Group A2 Distributed File System by Sajida Begum Samina Choudhry 01 14 19 1 Outline 01 14 19 Terminology Overview of Centralized File System What is Distributed File System Naming in DFS Semantics of DFS Caching Stateful vs stateless service File Replication Examples 2 Terminology Tightly coupled system Processors share memory and a clock Communication through shared memory Loosely Coupled System No shared memory or clock Each process has its own local memory Communication through various communication lines e g high speed buses and telephone lines Distributed System It is a collection of loosely coupled machines inter connected by communication network 01 14 19 3 Terminology Cont d Remote and Local Resources In a distributed system the resources of a specific processor are called local while the rest of the processors and their respective resources are remote Service A software entity running on one or more machines and providing a particular type of function to a priori unknown clients Server The service software running on a Single machine Client 01 14 19 A process that can invoke a service using a set of operations that forms its client interface 4 Overview of Centralized File System File Naming c courses cse8343 proc ps MS DOS usr schoudhr courses cse8343 process ps UNIX File Structure Bitstream or bytestream Record oriented record key data Indexed e g B trees IBM VSAM File Types Text e g ASCII Binary e g executables images etc 01 14 19 5 Cont d 01 14 19 Directory Structures Flat hierarchical tree graph Allocation of File to Disk Blocks contiguous linked indexed i node UNIX 6 Distributed File System Def DFS is a distributed implementation of the classical time sharing model of a file system where multiple users share files and storage resources OR A DFS is a file system whose clients servers and storage devices are dispersed among the machines of a distributed system Object The purpose of a DFS is to support the same kind of sharing when the files are physically dispersed among the various sites of a distributed system 01 14 19 7 Significant Features of DFS No single centralized data repository Multiple and independent storage devices Multiplicity of clients servers The multiplicity and dispersion of servers and storage devices should be made transparent i e the client interface of a DFS should not distinguish between local and remote files Autonomy of Clients and Servers Transparent DFS It facilitates user mobility by bringing over the user s environment home directory to wherever a user logs in 01 14 19 8 Storage Management DFS manages a set of dispersed storage devices The overall storage space managed by a DFS is composed of different and remotely located smaller storage spaces Correspondence between storage spaces and Set of files All files belonging to the same component unit must reside in the same location Where component unit is the smallest set of files that can be stored on a single machine independently from other units 01 14 19 9 DFS Design A DFS typically has two reasonably distinct components 1 File Service Interface Upload download model 1 file moved to a client old file new file client step 3 server step 2 1 File moved to client 2 entire files are retrieved from the server and accessed at the client 3 once the client is done the file is stored back at the server typical of mass storage system e g Unitree 01 14 19 10 File Service Interface cont d remote access model Client Server Requests from client to access remote file file stays on server only the needed blocks of files are retrieved from the server Once the client is done with a block it is written back to the server Example NFS 01 14 19 11 2 Directory service Interface File server 1 A B B A A C B C 01 14 19 E D A F B C Client 2 root A B D C F E Client 2 root D F root D File server 2 E client 1 root Client 1 E A F B C D E a b E c 12 Naming in DFS Def Naming is a mapping between logical and physical objects Naming Structure Location Transparency The name of a file does not reveal the file location e g serverA dir1 dir2 x does not show where the server is located Location Independence Files can be moved and all references to them continue to be valid i e the name of a file does not has to be changed with any change in file s physical storage location 01 14 19 13 Naming Cont d Two Level Naming Symbolic Names human readable e g courses slides files ps Binary Names machine readable names Easier to manipulate e g UNIX i node or server IP address i node number Symbolic to binary name mapping may be one to many in a distributed system file replication 01 14 19 14 Semantics of File Sharing Unix Semantics used in centralized systems a read that follows a write sees the value written by the write write x to block a read block a t1 t2 get x x a X X a a a read that follows two writes in quick succession sees the result the last write write x to block a t1 write x to block a t2 read block a t3 get x 01 14 19 x X X X X 15 Semantics of File Sharing Issues of File Sharing easy to implement UNIX semantics Client File Caching improves performance by decreasing demand at the server Updates to the cached files are not seen by other clients 01 14 19 Single File Server No Client Caching 16 Semantics of File Sharing Session Semantics relaxed semantics changes to an open file are only visible to the process that modified the file when the file is closed changes are visible to other processes closed file is sent back to the server What final result depends on who closes last use an arbitrary rule to decide who wins file pointer sharing is not possible when a process and its children run on different machines 01 14 19 if two or more clients are caching and modifying a file 17 Semantics of File Sharing No file Update Semantics files are never updated allowed file operations create and read files are atomically replaced in the directory Problem what if two clients want to replace a file at the same time take the last one or use any non deterministic rule Transaction Semantics all file changes are delimited by a Begin and End transaction all file requests within the transaction are carried out in the order the complete transaction is carried out either completely or not at all atomically 01 14 19 18 Semantics of file Sharing 01 14 19 UNIX Semantics Every operation is instantly visible to others Session Semantics No changes visible until file is closed No Update Semantics No file updates are allowed Transactions


View Full Document
Download Distributed File System
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 System 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 System 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?