Dos 1
Dos 1
Dos 1
DISTRIBUTED FILE
SYSTEMS
DISTRIBUTED FILE SYSTEM
Topics
Introduction
File Service Architecture
DFS: Case Studies
Case Study: Sun NFS
Case Study: The Andrew File System
DISTRIBUTED FILE SYSTEM
Introduction
File system were originally developed for
centralized computer systems and desktop
computers.
File system was as an operating system
facility providing a convenient
programming interface to disk storage.
DISTRIBUTED FILE SYSTEM
Introduction
Distributed file systems support the
sharing of information in the form of files
and hardware resources.
With the advent of distributed object
systems (CORBA, Java) and the web, the
picture has become more complex.
Figure 1 provides an overview of types of
storage system.
DISTRIBUTED FILE SYSTEM
Introduction
Sharing Persis- Distributed Consistency Example
tence cache/replicas maintenance
Main memory 1 RAM
File system 1 UNIX file system
Distributed file system Sun NFS
Web Web server
Introduction
Figure 2 shows a typical layered module
structure for the implementation of a non-
distributed file system in a conventional
operating system.
DISTRIBUTED FILE SYSTEM
Introduction
Introduction
File systems are responsible for the
organization, storage, retrieval, naming,
sharing and protection of files.
Files contain both data and attributes.
A typical attribute record structure is
illustrated in Figure 3.
DISTRIBUTED FILE SYSTEM
Introduction
File length
Creation timestamp
Read timestamp
Write timestamp
Attribute timestamp
Reference count
Owner
File type
Access control list
Introduction
Figure 4 summarizes the main operations
on files that are available to applications in
UNIX systems.
DISTRIBUTED FILE SYSTEM
Introduction
Figure 4. UNIX file system operations
filedes = open(name, mode) Opens an existing file with the given name.
filedes = creat(name, mode) 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) Transfers n bytes from the file referenced by filedes to buffer.
count = write(filedes, buffer, n) 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, Moves the read-write pointer to offset (relative or absolute,
whence) 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.
DISTRIBUTED FILE SYSTEM
Introduction
Distributed File system requirements
Related requirements in distributed file systems
are:
Transparency
Concurrency
Replication
Heterogeneity
Fault tolerance
Consistency
Security
Efficiency
DISTRIBUTED FILE SYSTEM
Client module
IP address date
DISTRIBUTED FILE SYSTEM
NFS architecture
Application Application
program program
UNIX
system calls
UNIX kernel
UNIX kernel Virtual file system Virtual file system
Operations Operations
on local files on
file system
remote files
UNIX NFS NFS UNIX
file file
Other
client server
system system
NFS protocol
Figure 8. NFS architecture (remote operations)
*
DISTRIBUTED FILE SYSTEM
fh = file handle:
Remote Remote
people students x staff users
mount mount
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.
Figure 10. Local and remote file systems accessible on an NFS client
DISTRIBUTED FILE SYSTEM
t freshness guarantee
Tc time when cache entry was last
validated
Tm time when block was last
updated at server
T current time
DISTRIBUTED FILE SYSTEM
Workstations Servers
User Venus
program
Vice
UNIX kernel
UNIX kernel
Vice
Venus
User
program UNIX kernel
UNIX kernel
Local Shared
/ (root)
bin
Symbolic
links
Workstation
User Venus
program
UNIX file Non-local file
system calls operations
UNIX kernel
UNIX file system
Local
disk
Application
Distributed file systems can be advantageous because they make it easier to
distribute documents to multiple clients and they provide a centralized storage
system so that client machines are not using their resources to store files.
NFS from Sun Microsystems and Dfs from Microsoft are examples of
distributed file systems.
DISTRIBUTED FILE SYSTEM
Scope of Research
Application