Jump to content

Hierarchical file system

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Guy Harris (talk | contribs) at 21:22, 23 February 2023 (Path: Get rid of extra closing square brackets.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computing, "a hierarchical file system is one that uses directories to organize files into a tree structure."[1]

If a hierarchical file system, directories contain information about both files and other directories, called subdirectories which, in turn, can point to other subdirectories, and so on.[2] This is organized as a tree structure, or hierarchy, from which it takes its name. A directory called the root directory is the base of the hierarchy, and is usually stored at some fixed location.

A hierarchical file system contrasts with a flat file system, where information about all files is stored in a single directory, and there are no subdirectories.

Almost all file systems today are hierarchical. What is referred to as a file system is a specific instance of a hierarchical system. For example, NTFS, HPFS, and EXT4, all implement a hierarchical system with different features for buffering, file allocation, and file recovery.

Concepts

Path

"A file path describes the location of a file in a web site's folder [directory] structure."[3] That is, it represents the directory nodes visited from the root directory to the file as a list of node names, with the items in the list separated by path separators. The path separator is > on Multics, / on Unix-like systems, and \ on MS-DOS 2.0 and later, Windows, and OS/2 systems.

An absolute path begins with a path separator character, which representes the root directory; a path consisting only of a path separator character refers to the root directory.

Working directory

The working directory of a process is a directory dynamically associated with each process. Files are searched relative to the working directory, rather than from the root directory. A user is assigned a working directory at logon, and the directory may be set using a command.

A relative path represents the directory nodes visited from the working directory to the file, rather than from the root directory to the file. A relative path does not begin with a path separator character.

History

Multics

Multics is the first operating system to provide a hierarchical file system.[4][5]

Personal computers

The CP/M operating system used a flat file system, with a directory containing information on a maximum of 64 files—adequate when a floppy disk held only 128&sbsp;KB. PC DOS 1.0 inherited the same structure. PC DOS, which supported hard disk drives introduced a hierarchical file system. The hierarchical file system was used instead of simply expanding the flat directory for performance reasons. "A flat DOS file structure with a single directory and 10 times as many files would logically require 10 times as long to search."[2]

References

  1. ^ Sharma, Vivek; Varshney, Manish; Sharma, Shantanu (2010). Design and Implementation of Operating System. University Science Press. p. 346. Retrieved February 22, 2023.
  2. ^ a b Stephens, Mark (June 6, 1988). "Netware, LAN Manager Spar in Network Software Contest". No. Vol 10, issue 23. InfoWorld. Retrieved February 22, 2023. {{cite news}}: |issue= has extra text (help)
  3. ^ "HTML File Paths". W3Schools. Retrieved February 22, 2023.
  4. ^ "Multics Glossary -F-". www.multicians.org. Retrieved April 11, 2018.
  5. ^ R. C. Daley and P. G. Neumann, "A general-purpose file system for secondary storage", AFIPS '65 (Fall, part I) Proceedings of the November 30 – December 1, 1965