TENEX file system layout

From Computer History Wiki
Revision as of 19:30, 12 May 2022 by Larsbrinkhoff (talk | contribs) ("Directory directories" have number -1 and -2.)
Jump to: navigation, search

TENEX regards disk storage as an array of 512-word pages, just like memory. In the file system, a page is specified by a linear disk address.

Data is stored in files. The file data pages are located by looking them up in an index block, which has a lot in common with a page table. An index block occupies exactly one page, and each word holds a linear disk address. A short file has only one index block. A long file has an extra level of indirection: a top-level index block points to another layer of index blocks. A file can thus store a maximum of 512 × 512 pages, or 134217728 words.

Files are organized in directories. The data for all directories are inside a long file called <SYSTEM>DIRECTORY. Each directory is associated with a directory number, which is used as a index into the DIRECTORY file. A directory has eight (later sixteen) pages of data. The low end of this data area has meta data such as the protection of the directory, and the start and end of a symbol table. The middle is organized as blocks of various kinds, such as strings used to name files, and file descriptor blocks. At the top end is the symbol table, which is a sequence of words. Each word has a pointer to a string in the left half, and a pointer do a file descriptor block in the right half. These are the files stored in the directory.

Another important file is called <SYSTEM>INDEX. The index block for this file also has the disk addresses for two special directories (number -1 and -2) used to look up map directory names to directory numbers. This is how to find the on-disk location of <SYSTEM>, and thus also <SYSTEM>DIRECTORY>. The location of the <SYSTEM>INDEX index block is the entry point for all other data structures. However, there is no way to locate this block from information on the disk (other than scanning all sectors and make an educated guess). The disk address of the block is built into the monitor as the value of the symbol DIDSC0.

External links