Difference between revisions of "File system"

From Computer History Wiki
Jump to: navigation, search
(A decent start)
 
(Copyedit)
Line 1: Line 1:
A '''file system''' is an abstraction provided to users by an [[operating system]], using [[secondary storage]] (typically [[disk]]), which can be used to store blocks of data of all kinds (program source, [[executable binary]], document source and formatted output, etc, etc), using names which make sense to the users.
+
A '''file system''' is an abstraction provided by an [[operating system]] to users for them to store data aggregates of all sorts (program source, [[executable binary]], document source and formatted output, etc, etc), using names for them which make sense to the users. The actual storage itself typically uses [[secondary storage]] (generally [[disk]]).
  
The file system takes the blocks (normally identified with a block number) on a disk, and first allocates enough of them to hold a file of the desired size, and then makes a record of which blocks belong to which files. A file system also normally includes '''directories''', which are collections of related files.
+
The file system takes the actual storage blocks (normally identified with a block number) on a disk, and starts by allocates enough of them to hold a file of the desired size, and then makes a record of which blocks belong to which files. It also has to know which blocks are 'free', and available for allocation - a variety of data structures are used to hold this information (free lists, free arrays, etc).
  
Modern file systems are tree-structured; i.e. a directory can also include other directories, the whole being structured as a tree descending from a '''root directory'''.
+
A file system also normally includes '''directories''', which are collections of related files. Modern file systems are usually tree-structured; i.e. a directory can also include other directories, the whole being structured as a tree descending from a '''root directory'''.
  
 
==Approaches==
 
==Approaches==
Line 11: Line 11:
 
Originally, the information as to which blocks were part of a file was kept in the directory, along with other meta-information about the file (date last modified, etc); this approach was used in early operating systems such as [[Multics]], as well as later ones like [[Windows]].
 
Originally, the information as to which blocks were part of a file was kept in the directory, along with other meta-information about the file (date last modified, etc); this approach was used in early operating systems such as [[Multics]], as well as later ones like [[Windows]].
  
[[UNIX]] started a new approach, in which such information was kept in a separate structure (called an [[inode]] in UNIX); directories only held mappings from file-names (visible to users) to inode numbers.
+
[[UNIX]] started a new approach, in which most information about a file (particularly, which blocks were used to hold it) was kept in a separate structure (called an '''inode''' in UNIX); directories (usually implemented as an abstraction on top of the previous layer)only held mappings from file-names (visible to users) to inode numbers. (More information about UNIX file-systems can be found [[UNIX file system}|here]].)

Revision as of 19:52, 7 August 2017

A file system is an abstraction provided by an operating system to users for them to store data aggregates of all sorts (program source, executable binary, document source and formatted output, etc, etc), using names for them which make sense to the users. The actual storage itself typically uses secondary storage (generally disk).

The file system takes the actual storage blocks (normally identified with a block number) on a disk, and starts by allocates enough of them to hold a file of the desired size, and then makes a record of which blocks belong to which files. It also has to know which blocks are 'free', and available for allocation - a variety of data structures are used to hold this information (free lists, free arrays, etc).

A file system also normally includes directories, which are collections of related files. Modern file systems are usually tree-structured; i.e. a directory can also include other directories, the whole being structured as a tree descending from a root directory.

Approaches

Two main approaches have been used to organize file systems.

Originally, the information as to which blocks were part of a file was kept in the directory, along with other meta-information about the file (date last modified, etc); this approach was used in early operating systems such as Multics, as well as later ones like Windows.

UNIX started a new approach, in which most information about a file (particularly, which blocks were used to hold it) was kept in a separate structure (called an inode in UNIX); directories (usually implemented as an abstraction on top of the previous layer)only held mappings from file-names (visible to users) to inode numbers. (More information about UNIX file-systems can be found [[UNIX file system}|here]].)