From cff237d4451b9e1b9793191b3ef8a6e24aa75ee8 Mon Sep 17 00:00:00 2001 From: Warren Toomey Date: Sun, 13 Mar 2016 09:58:18 +1000 Subject: [PATCH] Added dir.5 and filesys.5 manuals. --- man/dir.5 | 34 +++++++++++++++++ man/filesys.5 | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+) create mode 100644 man/dir.5 create mode 100644 man/filesys.5 diff --git a/man/dir.5 b/man/dir.5 new file mode 100644 index 0000000..66a5515 --- /dev/null +++ b/man/dir.5 @@ -0,0 +1,34 @@ + 11/3/70 DIRECTORY (V) + + +NAME format of directories + +SYNOPSIS + +DESCRIPTION A directory behaves exactly like an ordinary file, save + that no user may write into a directory. The fact that a + file is a directory is indicated by a bit in the flag word + of its i-node entry. + + Directory entries are 8 words long. The first word is the + i-node of the file represented by the entry, if non-zero; + if zero, the entry is empty. + + Words 1-4 represent the (8-character) file name, space + padded on the right. These words are not necessarily + cleared for empty slots. + + By convention, the first entry in each directory is + for "dd", which is the "directory directory" that holds + all the users' home directories and the "system" directory. + The "system" directory contains "init" and "sh". + +FILES + +SEE ALSO file system format + +DIAGNOSTICS + +BUGS + +OWNER ken, dmr diff --git a/man/filesys.5 b/man/filesys.5 new file mode 100644 index 0000000..9d28db1 --- /dev/null +++ b/man/filesys.5 @@ -0,0 +1,104 @@ + 11/3/70 FILE SYSTEM (V) + + +NAME format of file system + +SYNOPSIS + +DESCRIPTION The RB09 fixed head disk has 8,000 64-word blocks on + each of its two surfaces. Unix uses the second surface + (physical blocks 8,000 to 15,999) and numbers them + from logical block 0 to logical block 7,999. The following + discussion refers to logical blocks. + + The Unix filesystem is divided into 8,000 blocks of 64 words + per block. Block 0 is the "sysdata" block. The first word + points to the first block of the free-storage map. Each block + in the free-storage map is structured as follows: the first + word is the block number of the next block in the free-storage + map, or zero if this is the end of the free-storage map. The + next nine words hold free block numbers, or zero (no block number). + + Block 1 on the filesystem is unused. (?) + + I-numbers begin at 1, and the storage for i-nodes begins at + block 2. Blocks 2 to 711 contain the i-nodes, with five + consecutive i-nodes per block. Certain i-nodes are reserved for + special files, directories and devices: + + 1 The core file written by "sys save" or a bad system call + 2 The "dd" directory directory + 3 The "system" directory + 6 The "ttyin" special file + 7 The "keyboard" (graphic-2) special file + 8 The "pptin" (paper tape reader) special file + 10 The "ttyout" special file + 11 The "display" (graphic-2) special file + 12 The "pptout" (paper tape punch) special file + + + There is only one file system which is always mounted; + it resides on the RB disk. This device is also used for + swapping. The swap areas are at the high blocks on this device: + blocks 6,400 to 7,999. These blocks do not appear in the free list. + + Each i-node represents one file. The format of + an i-node is as follows, where the left column represents + the offset in words from the beginning of the i-node: + + 0 flags (see below) + 1 first indirect block or contents block + ... + 7 seventh indirect block or contents block + 8 user ID of owner + 9 link count + 10 size in words + 11 unique value assigned at creation + + The flags are as follows: + + 400000 i-node is allocated + 200000 large file + ?????? allocated bit (always on) + 000040 special file + 000020 directory + 000010 read, owner + 000004 write, owner + 000002 read, non-owner + 000001 write, non-owner + + The allocated bit (flag ??????) is believed even if the i-node + map says the i-node is free; thus corruption of the map may + cause i-nodes to become unallocatable, but will not cause active + nodes to be reused. + + Word number n of a file is accessed as follows: n is + divided by 64 to find its logical block number (say b) in + the file. If the file is small (flag 200000 is 0), then b + must be less than 7, and the physical block number corresponding + to b is the bth entry in the address portion of the i-node. + + If the file is large, b is divided by 64 to yield a number + which must be less than 8 (or the file is too large for + UNIX to handle). The corresponding slot in the i-node + address portion gives the physical block number of an + indirect block. The residue mod 64 gives a word offset + in the indirect block, and the word found there is the + physical address of the block corresponding to b. + + If block b in a file exists, it is not necessary that all + blocks less than b exist. A zero block number either in the + address words of the i-node or in an indirect block + indicates that the corresponding block has never been + allocated. Such a missing block reads as if it contained + all zero words. + +FILES + +SEE ALSO format of directories + +DIAGNOSTICS + +BUGS + +OWNER