0% found this document useful (0 votes)
11 views69 pages

DFS

Uploaded by

santhi s
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views69 pages

DFS

Uploaded by

santhi s
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 69

Case Study: The Andrew File System (AFS)

 Like NFS, AFS provides transparent


access to remote shared files for UNIX
programs running on workstations.
 AFS is implemented as two software
components that exist at UNIX processes
called Vice and Venus.
(Figure 11)

Couloris,Dollimore and Kindberg Distributed Systems: Concepts & Design Edn. 4 , Pearson Education 2005

60
Case Study: The Andrew File System (AFS)

Workstations Servers

User Venus
program
Vice
UNIX kernel

UNIX kernel

User Venus Network


program
UNIX kernel

Vice

Venus
User
program UNIX kernel
UNIX kernel

Figure 11. Distribution of processes in the Andrew File System


Couloris,Dollimore and Kindberg Distributed Systems: Concepts & Design Edn. 4 , Pearson Education 2005

61
Case Study: The Andrew File System (AFS)
 The files available to user processes running on
workstations are either local or shared.
 Local files are handled as normal UNIX files.
 They are stored on the workstation’s disk and
are available only to local user processes.
 Shared files are stored on servers, and copies of
them are cached on the local disks of
workstations.
 The name space seen by user processes is
illustrated in Figure 12.

Couloris,Dollimore and Kindberg Distributed Systems: Concepts & Design Edn. 4 , Pearson Education 2005

62
Case Study: The Andrew File System (AFS)

Local Shared
/ (root)

tmp bin . . . vmunix cmu

bin

Symbolic
links

Figure 12. File name space seen by clients of AFS


Couloris,Dollimore and Kindberg Distributed Systems: Concepts & Design Edn. 4 , Pearson Education 2005

63
Case Study: The Andrew File System (AFS)
 The UNIX kernel in each workstation and server
is a modified version of BSD UNIX.
 The modifications are designed to intercept
open, close and some other file system calls
when they refer to files in the shared name
space and pass them to the Venus process in
the client computer.
(Figure 13)

Couloris,Dollimore and Kindberg Distributed Systems: Concepts & Design Edn. 4 , Pearson Education 2005

64
Case Study: The Andrew File System (AFS)

Workstation

User Venus
program
UNIX file Non-local file
system calls operations

UNIX kernel
UNIX file system

Local
disk

Figure 13. System call interception in AFS

Couloris,Dollimore and Kindberg Distributed Systems: Concepts & Design Edn. 4 , Pearson Education 2005

65
Case Study: The Andrew File System (AFS)
 Figure 14 describes the actions taken by Vice,
Venus and the UNIX kernel when a user process
issues system calls.

Couloris,Dollimore and Kindberg Distributed Systems: Concepts & Design Edn. 4 , Pearson Education 2005

66
Case Study: The Andrew File System (AFS)
User process UNIX kernel Venus Net Vice
open(FileName, If FileName refers to a
mode) file in shared file space,
pass the request to Check list of files in
local cache. If not
Venus. present or there is no
valid callback promise,
send a request for the
file to the Vice server
that is custodian of the
volume containing the Transfer a copy of the
file. file and a callback
promise to the
workstation. Log the
Place the copy of the callback promise.
file in the local file
Open the local file and system, enter its local
return the file name in the local cache
descriptor to the list and return the local
application. name to UNIX.
read(FileDescriptor, Perform a normal
Buffer, length) UNIX read operation
on the local copy.
write(FileDescriptor, Perform a normal
Buffer, length) UNIX write operation
on the local copy.
close(FileDescriptor) Close the local copy
and notify Venus that
the file has been closed. If the local copy has
been changed, send a
copy to the Vice server Replace the file
that is the custodian of contents and send a
the file. callback to all other
clients holdingca llba ck
promises on the file.

Figure 14. implementation of file system calls in AFS


Couloris,Dollimore and Kindberg Distributed Systems: Concepts & Design Edn. 4 , Pearson Education 2005

67
Case Study: The Andrew File System (AFS)
 Figure 15 shows the RPC calls provided by AFS
servers for operations on files.

Couloris,Dollimore and Kindberg Distributed Systems: Concepts & Design Edn. 4 , Pearson Education 2005

68
Case Study: The Andrew File System (AFS)
Fetch(fid) -> attr, data Returns 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() -> fid Creates 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.

Figure 15. The main components of the Vice service interface

Couloris,Dollimore and Kindberg Distributed Systems: Concepts & Design Edn. 4 , Pearson Education 2005 69

You might also like