Virtual File Systems

 $$
How does an OS allow multiple types of file systems to be integrated into a directory structure?
 $$
An obvious but suboptimal method of implementing multiple types of file systems is to write directory and file routines for each type.
 $$
Instead, most OSs, including UNIX, use object-oriented techniques to simplify, organize, and modularize the implementation.
 $$
The use of these methods allows very dissimilar file-system types to be implemented within the same structure, including network file systems, such as NFS.
 $$
The file-system implementation consists of three major layers, as depicted schematically in Fig. 5.
Figure 5: Schematic view of a virtual file system.
\includegraphics[scale=0.5]{figures/11-04}
1
The first layer is the file-system interface, based on the $open ()$, $read ()$, $write ()$, and $close ()$ calls and on file descriptors.
2
The second layer is called the virtual file system (VFS) layer; it serves two important functions:
 $$
The VFS distinguishes local files from remote ones, and local files are further distinguished according to their file-system types.
Cem Ozdogan 2010-05-11