This module implements another key concept for a computer -- a FILE SYSTEM. The code for this module is located in the code/filesys and code/userprog directories. The file system is an additional means by which an operating system acheives its goals of providing an interface between the user and computer; and providing for efficient use of the computer. It is the mechanism for the storage of and access to data and programs belonging to the operating system and the users of the computer. The general components of the file system are files, directories, and partitions.
The operating system must abstract from the physical properties of its storage devices (be they magnetic disks, tapes, or optical disks) to define what is called a file. This is the logical unit of storage in a computer. The directory structure organizes and provides information for all the files in the system. The partitions are needed to organize large collections of directories. The operating system must keep track of what disk sectors and blocks are associated with each file. This is done by three allocation regimes called contiguous, single-linked, and double-linked. Operations on files such as: