INFLUENCE OF FEATURES ON DESIGN AND
ARCHITECTURE Back To Home
Using a Layered Architecture:
The NFS architecture uses a Layers Pattern to provide portability. It
consists of three major layers -
The first layer is the UNIX file-system interface, based on the open,
read, write and close calls, and file descriptors.
The second layer is called Virtual File System (VFS) layer - it servers two
important functions:
- It separates file-system generic operations from their implementation by
defining a clean VFS interface. Several implementations for the VFS interface
may co-exist on the same machine, allowing transparent access to different
types of file systems mounted locally.
- The VFS is based on a file representation structure called a vnode
that contains a numerical designator for a file that is unique across the
network. The kernel maintains one vnode structure for each active node (file
or directory).
The bottom most layer implements the NFS protocol and is called the NFS
service layer.
Let us look at the sequence of events with the help of an example - we will
trace how an operation on an already-open remote file is handled:
- The client initiates the operation by a regular system call.
- The OS layer maps this call to a VFS operation on the appropriate
vnode.
- The VFS layer identifies the file as a remote one and invokes the
appropriate NFS procedure.
- An RPC call is made to the NFS service layer at the remote server.
- This call is reinjected to the VFS layer on the remote system, which finds
that it is local and invokes the appropriate file-system operation. This path
is retraced to return the result.
Click
here to see a schematic view of the NFS architecture
Click
here to see get a view of layered architecture of NFS
Next: Using a
client/server architecture
Sources:
http://www.eecs.lehigh.edu/~zhz3/CSC350/NFS/nfs.html
Operating Systems
Concepts (Fifth Edition) by Galvin and SilberSchatz