File System

The term for a low-level programming model for persistent data storage.

In traditional operating systems, persistence of data has to be explicitly managed. Persistent storage is made of physical partitions, each of which is organized as a filesystem, out of which programs can allocate files, that are raw sequences of bytes that can be read of modified.

Typically, files are named by small character strings with many limitations.

In a hierarchical filesystem, as most every filesystem is, files are grouped into directories, that can be named like files, and recursively contain other subdirectories and subfiles. These directories are naturally structured as a finite pointed tree, that can be isomorphically thought as a finite partial order whose bounded intervals are all total orders.

In such filesystems, files and directories are named by the "path" of successive names of directories to go through to reach the said file or directory, from the root of the tree (or any other "current" directory). Those paths are themselves encoded as character strings, where elementary names are concatenated, with as a separator a special character that is otherwise forbidden in file names (typically "/" on Unix systems, "\" on bad subclones, and ":" or "." in a few other systems).

Because a raw sequence of byte is so poor an abstraction, and because even the simplest paranoid protection system in a multiprogramming environment requires some way of tracking "ownership" and "rights" to access files and directories, filesystems generally associate various "attributes" to files. While most (primitive) file systems have a finite space of possible attributes, as described by a few fields (numeric owner identifier, bitfields for access rights, etc), some allow for longer attributes (access control lists or whatever).

Now, because filesystems have proven so difficult to use, many tricks were invented to make things better:

So after all, here is what we can reproach to filesystem design:

The low-level programming model of filesystems is deeply linked to the low-level programming model of enclosing Operating Systems in general. Again, there are lots of historical reasons why filesystems exist; but no good technical reason. Operating systems with much better paradigms have existed and run successfully for just decades. See orthogonal persistence for a better paradigm.

This page is linked from: Distributed   Microkernel Debate   Persistence   Plan9