PDP-1-X microtape format

From Computer History Wiki
Jump to: navigation, search

The PDP-1-X time-sharing system used a file system for storing data on microtapes. Microtapes could also be stored in a drum area, from which they could be written to 7-track magnetic tapes.

The two main data structures on a tape are the directory and the block table. There is just one directory, listing all file names and pointing to the first data block in the file. However, the files are arranged in a hierarchical manner which can be viewed as a system with sub-directories. The block table has a link to the next block for all blocks on the tape.

There are two versions of the file system. The older version only stored 512 blocks on a tape. The newer version stores 576 blocks; for this to work, the directory and block table are expanded in size and moved to another location. At this editorially awkward position we should mention that blocks are 256 words of 18 bits.

The file system always refers to logical block numbers, which start from 0. Even and odd blocks are interleaved in an alternating fashion. Even blocks start at physical block 1 and goes up to 255 or 287, which is the last physical block. Odd blocks go in the other direction and thus start at the penultimate physical block, and go back to physical block 0.

The first 11 logical blocks are reserved by the system for storing the directory, block table, and file system code.

Versions

In the old file system version, the directory occupies block 6 and 7. The block table is stored in blocks 8 and 9.

The new file system version moves the directory to block 0, but has a 32 word header. The directory crosses into block 1 and 2. Right after the directory comes the block table, starting at offset 32 in block 2. The block table occupies 576 words through blocks 3 and 4.

The formats of the directory and block tables are the same between the two versions, just differing in block table size.

The file system checks two words in block 0 to determine the version. If words 32 and 33 both have 0 in the upper half, it's the new version.

Directory

The first word of the directory has the offset to the first file, from which the entire directory listing can be unraveled. The second word is the offset to the first free (unused) file.

After the first two words come 102 file entries of five words each. Note that this entirely fills the 512 words of the two directory blocks.

Each file entry looks like this:

Offset Description
0 Offset to next (sibling) file, or 0 for last file
1-3 File name, using the FIODEC character set
4 First data block, or offset to subname (subdirectory file)

Word five in each entry has bit 0 set (PDP-1 numbering) to indicate a regular data file; the low 9 or 10 bits indicate the first data block. If clear, this is a "subname" (or directory) and the low bits point to the subfiles.

Block table

Each word in the block table correspond to a logical block on the tape. The contents points to the next block in a file.

Since the first few blocks on a tape are reserved by the system, the tape name can be encoded in the first three words of the table. The fourth word stores the number of usable blocks on the tape, i.e. the physical maximum minus 11.

External links