|
A filesystem API is an application programming interface that allows developers to add support of a filesystem to an operating system without the operating system needing to know anything about what filesystem it is or how it works. See Filing system for this term as it is used in libraries and offices In computing, a file system is a method for storing and organizing computer files and the data they contain to make it easy to find and access them. ...
API with 3 clients, using the Unified Modeling Language notation An application programming interface (API) is the interface that a computer system or application provides in order to allow requests for service to be made of it by other computer programs, and/or to allow data to be exchanged between...
It is similar in functionality to driver APIs, as programs and the operating system itself know nothing about the filesystem. Ocassionally they also provide interfaces so common filesystem maintenance functions (such as making a new filesystem, checking the metadata's integrity, defraging it and so on) became universal and transparent to the applications that handle them.
History
Originally, operating systems were capable of handling only a disk filesystem, but as systems expanded two problems arose: - Network shares were required to appear to the user as local disks.
- Users wanted to exchange files with other users that might be running another operating system.
In the old scheme, all filesystems and network protocols are specific to the operating system's kernel and when the user tried to access a file, it was the kernel that knew how the filesystem or network protocol worked. This scheme means that adding support for a filesystem requires a major kernel rewrite. This isn't very efficient, so operating systems designers thought about separating the specific filesystem code from the file and network handling code of the kernel, and filesystem APIs resulted.
Kernel-based API The API is "kernel-based" when the kernel not only provides the interfaces for the filesystems developers but is also the space in which the filesystem code reside. It differs with the old schema in that the kernel itself uses its own facilities to talk with the filesystem driver and vice-versa, as contrary to the kernel being the one that handles the filesystem layout and the filesystem the one that directly access the hardware. It isn't the cleanest scheme but resolves the difficulties of major rewrite that has the old scheme. With modular kernels it allows adding filesystems as any kernel module, even third party ones. With non-modular kernels however it requires the kernel to be recompiled with the new filesystem code (and in closed-source kernels, this makes third party filesystem impossible). Unixes and Unix-like systems such as Linux have used this scheme. Wikibooks has more about this subject: Guide to UNIX Unix or UNIX is a computer operating system originally developed in the 1960s and 1970s by a group of AT&T Bell Labs employees including Ken Thompson, Dennis Ritchie, and Douglas McIlroy. ...
A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification. ...
Tux is the official Linux mascot. ...
There is a variation of this scheme used in MS-DOS (DOS 4.0 onward) and compatibles to support CD-ROM and network filesystems. Instead of adding code to the kernel, as in the old scheme, or using kernel facilities as in the kernel-based scheme, it traps all calls to a file and identifies if it should be redirected to the kernel's equivalent function or if it has to be handled by the specific filesystem driver, and the filesystem driver "directly" access the disk contents using low-level BIOS functions. Microsofts disk operating system, MS-DOS, was Microsofts implementation of DOS, which was the first popular operating system for the IBM PC, and until recently, was widely used on the PC compatible platform. ...
This article is about the software. ...
Driver-based API The API is "driver-based" when the kernel provides facilities but the filesystem code resides totally external to the kernel (not even as a module of a modular kernel). It is a cleaner scheme as the filesystem code is totally independent, it allows filesystems to be created for closed-source kernels and online filesystem additions or removals from the system. Examples of this scheme are the Windows NT and OS/2 respective IFSs. Windows NT is a family of operating systems produced by Microsoft, and was succeeded by Windows 2000 (still based on Windows NT). ...
OS/2 is an operating system created by Microsoft and IBM and later developed by IBM exclusively. ...
The Installable File System (IFS) is a Filesystem API in IBM OS/2 and Microsoft Windows NT that enables the operating system to recognize and load drivers for filesystems. ...
Mixed kernel-driver-based API In this API all filesystems are in the kernel, like in kernel-based APIs, but they are automatically trapped by another API, that is driver-based, by the OS. This scheme was used in Windows 3.11 for providing a FAT filesystem driver in 32-bit protected mode, and cached, (VFAT) that bypassed the DOS FAT driver in the kernel (MSDOS.SYS) completely, and later in the Windows 9x series (95, 98 and Me) for VFAT, the ISO9660 filesystem driver (along with Joliet), network shares, and third party filesystem drivers, as well as adding to the original DOS APIs the LFN API (that IFS drivers can not only intercept the already existent DOS file APIs but also add new ones from within the 32-bit protected mode executable). A typical Windows 3. ...
Windows 95 (codename Chicago) is a hybrid 16-bit/32-bit graphical user interface-based operating system released on August 24, 1995 by the Microsoft Corporation. ...
Windows 98 (codename Memphis) is a graphical operating system released on June 25, 1998 by Microsoft. ...
Windows Millennium Edition (originally codenamed Millennium), also known as Windows Me, is a 32-bit graphical operating system released on September 14, 2000 by Microsoft. ...
However that API was not completely documented, and third parties found themselves in a "make-it-by-yourself" scenario even worse than with kernel-based APIs.
Userland-based API The API is "userland" when the filesystem doesn't use kernel facilities (if they are available) but accesses disks using high-level operating system functions and provides functions in a library that a series of utilities uses to access the filesystem. This is useful for handling disk images. The great advantage is that the filesystem can be easily portable between operating system as the high-level functions it will be using can be as common as ANSI C, but the great disadvantage is that the API is uniquely to each application that implements one. Examples of this scheme are the hfsutils and the [1].
Interoperatibility between filesystem APIs As all filesystems (at least the disk ones) need equivalent functions provided by the kernel, it is possible to easily port a filesystem code from one API to another, even if they are of different types. For example, the ext2 driver for OS/2 is simply a wrapper from the Linux's VFS to the OS/2's IFS and the Linux's ext2 kernel-based, and the HFS driver for OS/2 is a port of the hfsutils to the OS/2's IFS. There also exists a project that uses a Windows NT IFS driver for making NTFS work under Linux.
Bibliography - O'Reilly - Windows NT File System Internals, A Developer's Guide - By Rajeev Nagar - ISBN 1-56592-249-2
- Microsoft Press - Inside Windows NT File System - By Helen Custer - ISBN 1-55615-660-X
- Wiley - UNIX Filesystems: Evolution, Design, and Implementation - By Steve D. Pate - ISBN 0471164836
- Microsoft Press - Inside Windows NT - By Helen Custer - ISBN 1-55615-481-X
See also In computing, a file system is a method for storing and organizing computer files and the data they contain to make it easy to find and access them. ...
The Installable File System (IFS) is a Filesystem API in IBM OS/2 and Microsoft Windows NT that enables the operating system to recognize and load drivers for filesystems. ...
The Filing Open Service Interface Definition (OSID) is an O.K.I. specification. ...
Virtual file system or Virtual filesystem switch (VFS) is a standard and abstract software layer that allows the operating system kernel (e. ...
The following lists identify, characterise and link to fuller information on computer file systems. ...
The following tables compare general and technical information for a number of file systems. ...
A filename extension is an extra set of (usually) alphanumeric characters that is appended to the end of a filename to allow computer users (as well as various pieces of software on the computer system) to quickly determine the type of data stored in the file. ...
A Virtual file system or Virtual filesystem switch (VFS) is an abstraction layer on top of a more concrete file system. ...
External links - Filesystem Specifications and Technical Whitepapers
- Amazon books about filesystems
- A Tour of the Linux VFS
- Microsoft's IFSKit
- IBM's information about IFS
- hfsutils
- adflib
|