In a virtual file system, many file systems are integrated in a particular order. In this method, VFS contains codes which are common to all the file systems and it acts as a bridge between user process and individual file systems. POSIX system calls are used by user processes to communicate with the VFS. VFS uses VFS interface for communicating with the other file systems. In the below given figure, VFS is implemented as having two interfaces, one is the POSIX interface and the other is the VFS interface.
Working: When computer boots the file systems including root file system is registered to VFS. By registering a file system actually provides list of the addresses of functions which is required by VFS. To use a file system first it needs to be mounted. After that, VFS creates a v-node and calls file system to return information in i-node of file. This information is then copied to v-node. Then, an entry is made in the file descriptor table for a calling process. This entry then points to the created v-node. After that file descriptor is returned to the caller. This file descriptor is used by the caller to read, write, and close the file.