Distributed Computing
D
ISTRIBUTED
F
ILE
S
YSTEMS
File System
File :
named collection of logically related data.
An un interpreted sequence of bytes
File system :
Provides hierarchical structure (file tree) of files and directories to organize data and programs into groups.
Provides a logical view of data and storage functions
User-friendly interface
Provides facility to create, modify, organize, and delete files
Provides sharing among users in a controlled manner
File Service V/s File Server
File service:
The specification of the file system offers to its clients.
The interface to file system functionality (primitives, parameters, semantics).
True file service: operations on files
Directory service: operations on directories.
File server:
An implementation of this interface.
file servers may be local or remote.
Distributed File Systems
A distributed file system enables co-operating hosts
(clients and servers) to efficiently share file system
resources across both local area and wide area
networks.
It allows users to access remote files and directories and
treat those files and directories as if they were local.
DFS Goals
Access transparency: a single set of file operations for access to both local and remote files.
Location transparency: a uniform file name space which does not contain file physical location information.
Concurrency transparency: a user’s file operations will not be interfered by another user.
Failure transparency: when part of the system fails, the rest of the system can still provide file services.
Heterogeneity: interoperable among different operating systems and communication protocols.
Characteristics of DFS
Security: Authentication and Authorization
Federated Namespace
Caching
Replication
Authentication
Have a central authentication, users do not require
individual login ID’s for numerous systems.
Requires less management tasks in the form of account
maintenance.
Federated Namespace
Providing a single federated rendered namespace that is
seen from all users greatly enhances collaboration and
sharing of file system data.
The namespace can exist across many server systems
that might be geographically far apart or reside in
different administrative domains and organizations.
Caching
•
Most network file system client implementations do
caching of both data and attributes to improve
performance and reduce network traffic.
Replication
Replication provides for copies of file system data on
multiple servers.
Clients are aware of the replicas and can switch to
another server when the currently accessed server
becomes unavailable.
Migration
Migration enables the relocation of file system data from one
server to another.
To be effective, it includes server mechanisms that keep data
available (online) during migration events with minimal access
delays.
Clients are
“migration aware.” They recognize migration
events, follow the data to its new location, and avoid
disruptions
or
unexpected
events
when
accessing
applications.
Benefits of migration include:
– Managing load across servers.
Sun’s Network File System(NFS)
NFS is a distributed file system that enables users to
access files and directories on remote servers as if they
were local.
The user can use operating system commands to
create, remove, read, write, and set file attributes for
remote files and directories.
NFS Architecture
Two main models:
–
Remote Access Model:
Clients are offered transparent
access to a File system runs on servers.
File system is truly remote.
Little space is needed in the client.
–
Upload/Download model:
The entire file is transferred
from server to client and vice versa
.
Simple.
Whole file transfer is efficient.
More storage needed in the client, transferring entire file may be wasteful or impossible.
NFS Architecture
The basic NFS architecture for UNIX systems.
NFS Implementation
It consists of three layers:
–
system call layer
:
This handles calls like OPEN, READ, and CLOSE.
–
virtual file system (VFS)
:
The task of the VFS layer is to maintain a table with one
entry for each open file, analogous to the table of I-nodes for
open files in UNIX. VFS layers has an entry, called a v-node (virtual i-node) for every open file telling whether the file is local or remote.
–
NFS client code
:
NFS Protocols (Mounting)
Clients can treat servers as
“black boxes” that accepts and
process a specific set of requests.
Mounting:
– A client can send a path name to a server and request permission to mount that directory somewhere in its directory hierarchy.
– If the path name is legal and the directory specified has been exported, the server returns a file handle to the client for read and write to file.