VFS

From OSDev.wiki
Revision as of 04:20, 12 April 2008 by osdev>Thepowersgang (Initial - List models : DOS/List/Graph)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This page is a work in progress.
This page may thus be incomplete. Its content may be changed in the near future.

Introduction

The VFS or Virtual File System is used to provide transparent access to storage devices from applications. There are many different models for virtual file systems. Ranging from the DOS style of having a letter correspond to each file system to node list type.

VFS Models

DOS/Windows

The VFS model used in DOS and Microsoft Windows assigns a letter from the alphabet to each accessible file system on the machine. This type of VFS is the most simple to implement but is restricted to 26 mounted file systems and can get more and more complex as features are added.

Mount Point List

A more complex model is that of a mount point list. This system maintains a list of mounted file systems and where they are mounted. When a file is requested the list is scanned to determine what file system the file is on. The rest of the path is then passed on to the file system driver to fetch the file. This design is a quite versatile one but suffers from speed problems when large amounts of mount points are used.

Node Graph

A VFS model that can be very efficient is the Node Graph. This model maintains a graph of file system nodes that can represent a file, folder, mount point or other type of file. A node graph can be faster to traverse than a list but suffers from complexity problems and, if a large amounts of nodes are needed, can take up large amounts of memory.