Difference between revisions of "TENEX file system layout"
m (New cat) |
m (Typos.) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
Files are organized in ''[[Directory|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. | Files are organized in ''[[Directory|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), called ''subindices'', used to map directory names to directory numbers. This is how to find the on-disk location of <SYSTEM>, and thus also <SYSTEM>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), called ''subindices'', used to 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. |
==<SYSTEM>INDEX== | ==<SYSTEM>INDEX== | ||
− | The <SYSTEM>INDEX file is only one page long. Thus the index block only points to one data page in word 0. However, the index block also points to the two subindices. Words 10-17 point to subindex -1, and words 20-27 point to subindex -2. All other words in the | + | The <SYSTEM>INDEX file is only one page long. Thus the index block only points to one data page in word 0. However, the index block also points to the two subindices. Words 10-17 point to subindex -1, and words 20-27 point to subindex -2. All other words in the index block are 0. |
− | Words 15-16 of the INDEX file | + | Words 15-16 of the INDEX file point to a hash table used to map from a directory number to a ''directory descriptor block''. |
Word 17 is the linear address of the indirect index block for <SYSTEM>DIRECTORY. | Word 17 is the linear address of the indirect index block for <SYSTEM>DIRECTORY. | ||
Line 28: | Line 28: | ||
* [https://github.com/PDP-10/tenex/blob/master/pdf/TEN-SYS-2.pdf TEN-SYS-2: Ten-Sys File Structures] - Earlier memo. | * [https://github.com/PDP-10/tenex/blob/master/pdf/TEN-SYS-2.pdf TEN-SYS-2: Ten-Sys File Structures] - Earlier memo. | ||
* [https://github.com/PDP-10/tenex/blob/master/doc/disk-format.doc <DOC>DISK-FORMAT.DOC] - Documents the file system, in particular the [[SUMEX-AIM]] implementation. | * [https://github.com/PDP-10/tenex/blob/master/doc/disk-format.doc <DOC>DISK-FORMAT.DOC] - Documents the file system, in particular the [[SUMEX-AIM]] implementation. | ||
+ | * [http://bitsavers.org/pdf/sri/arc/augment_engine/Tymshare_Tenex_Data_Tables.pdf TENEX Directory Stuff] | ||
* [https://github.com/larsbrinkhoff/pdp10-its-disassembler/blob/lars/checkdsk/checkdsk.c checkdsk.c] - Random ad-hoc examination of SUMEX-AIM disk images. | * [https://github.com/larsbrinkhoff/pdp10-its-disassembler/blob/lars/checkdsk/checkdsk.c checkdsk.c] - Random ad-hoc examination of SUMEX-AIM disk images. | ||
[[Category: PDP-10 Disk Formats]] | [[Category: PDP-10 Disk Formats]] | ||
+ | [[Category: File Systems]] |
Latest revision as of 12:01, 8 November 2024
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 TENEX 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), called subindices, used to 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.
<SYSTEM>INDEX
The <SYSTEM>INDEX file is only one page long. Thus the index block only points to one data page in word 0. However, the index block also points to the two subindices. Words 10-17 point to subindex -1, and words 20-27 point to subindex -2. All other words in the index block are 0.
Words 15-16 of the INDEX file point to a hash table used to map from a directory number to a directory descriptor block.
Word 17 is the linear address of the indirect index block for <SYSTEM>DIRECTORY.
Words 32-63 holds a subindex dispatch table, used to map a directory name to a subindex. The table is 128 7-bit bytes, indexed by the first character of the directory name. The byte is the positive value of the subindex number.
<SYSTEM>DIRECTORY
<SYSTEM>DSKBTTBL
The DSKBTTBL file has one bit for each disk page to record whether it's free or not. It's organized in blocks which each describe the allocation of a cylinder on the disks.
External links
- TENEX-4: File System - BBN memo describing some aspects of the file system.
- TEN-SYS-2: Ten-Sys File Structures - Earlier memo.
- <DOC>DISK-FORMAT.DOC - Documents the file system, in particular the SUMEX-AIM implementation.
- TENEX Directory Stuff
- checkdsk.c - Random ad-hoc examination of SUMEX-AIM disk images.