VFS: Difference between revisions

From OSDev.wiki
Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content added Content deleted
(Add VFS Tutorial (jamesmolloy.co.uk))
(Add Image)
Line 1: Line 1:
{{In Progress}}
{{In Progress}}
==Introduction==
==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.
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 having a node list type.
[[image:vfs_diagram.png]]


==VFS Models==
==VFS Models==
===DOS/Windows===
===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.
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.
When a file is requested the VFS checks what drive the file is on and then passes the request on to the relevant driver.
===Mount Point List===
===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.
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.

Revision as of 07:26, 19 April 2008

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 having a 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. When a file is requested the VFS checks what drive the file is on and then passes the request on to the relevant driver.

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.

Extra Information

Tutorials

http://www.jamesmolloy.co.uk/tutorial_html/8.-The%20VFS%20and%20the%20initrd.html