WAITS on-disk file structure

From Computer History Wiki
Jump to: navigation, search

This is a description of the WAITS' on-disk file structure. It tries to describe the variants in use with 3300-2 packs on a KA10 around 1974, and with RP06 and RP07 packs on a KL10 in 1988. Much of this information comes from the last version of Ralph Gorin's RSKINI, which is used to format a disk pack, and SAIL alumnus Bruce Baumgart's tool RALF.

Disk area units and geometry

A disk sector of 128 words is often called record, especially if it's part of the disk structure. Addresses are usually linear record numbers. Some disk areas fall outside the usable range of sectors, and the record address does not take those into account.

Four records together make up a page, always 512 words. Some number of records, usually 9 or 10, grouped together is called a block. The this is the smallest unit of allocation. The bits in the SAT refer to blocks.

A disk is viewed as some number of cylinders, each comprising the sectors that can be accessed without a disk seek. Each cylinder has several tracks, and each track has several records. WAITS may elect to format the disk with some sectors left over per track. E.g. only 18 of the 20 sectors on a bootable RP06 track may be used, and the last two are invisible to the file system code.

The records of a cylinder are divided into pages. The logical end of the cylinder may have some left over records after the last page. The cylinder pages are divided into blocks; again there may be an unused remainder since pages might not divide blocks evenly.

A file structure may stretch across several disk packs, called units. Record and block addresses span across units.

HOM blocks

In the 1988 format, there are two HOM blocks. The 1974 format has no HOM blocks. They are both at the logical beginning of the disk, i.e. on the first track of the first cylinder of the first unit. The first block is sector 1 (starting from 0), and the second is 10 (decimal). There are no HOM blocks on the other units.

The HOM block is one record, i.e. 128 words. The ID strings are 8-bit ASCII, stored byte swapped in half words.

Offset Description
0 SIXBIT "HOM "
1 0
2 0
3 SIXBIT structure name.
4 Number of packs,,Unit number for this pack
5 Address of other HOM block,,Address of this block
6 Pages on this unit
7 First swapping cylinder
10 Address of MFD
11 Address of SAT
12 Size of SAT, in records
13 Number of records in this unit
14 Number of cylinders on all structure units
15 0
61 Address of front-end file system
62 Size of front-end file system
101 Address of bootstrap
102 Size of bootstrap
164 Processor serial number
165-167 Unit ID
170-172 Owner ID
173-175 File system ID
176 HOM magic number 0707070
177 This HOM block address

BAT block

The BAT block is after the first HOM block, and is optional in the 1988 format. The 1974 format has no BAT block.

SAT

The SAT is the Storage Allocation Table. There is only one SAT for the entire structure. It can be on any unit. In the 1974 format, the SAT is at the logical beginning of the disk, i.e. on the first track of the first cylinder of the first unit. In the 1988 format, the location of the SAT is in the HOM block.

The SAT starts with a header consisting of some data fields. After that comes a bit array, indexed by block address. 1 means free, and 0 means allocated. Bits inside words are MSB, i.e. bit 0 by PDP-10 convention, first

All disk areas in use, including HOM and BAT blocks, SAT, and swapping area, must be allocated in the SAT.

Offset 74 Offset 88 Description
0 Number of blocks used on disk
1 Address of last block assigned
2 SIXBIT name of structure
3 XOR checksum of all SAT bits
4 Number of items in bad block list
5 Checksum of bad block list
6 Start of back block list
63 SIXBIT "SATID "
64 Time of last write
65 Date of last write
66 P1 offset
67 P2 offset
71 200 Start of SAT bits

Swapping area

Each unit has a swapping area, starting at the cylinder specified in the HOM block. The size, in number of cylinders, is a system constant

RIB

All blocks start with a RIB, retrieval information block, also called retrieval record. It's a record which holds information about the file the block belongs to.

Offset Description
0 SIXBIT file name
1 SIXBIT file extension,,Creation timestamp
2 Protection
3 PPN
4 Record address of the first block in the file
5 File length, in words
6 Reference timestamp
7 Dump status
10 Record address of this group
11 Record address of next group
12 SAT ID
13-16 DQINFO
17 Record offset

MFD

The MFD is the Master File Directory. There is only one MFD for the entire structure. It can be on any unit. In the 1974 format, the MFD is on the second track of the first cylinder of the first unit. In the 1988 format, the location of the MFD is in the HOM block.

The MFD is the [1,1] directory. Each file in the MFD is a UFD with a file name matching that UFD's PPN. The MFD itself is the file ' 1 1'.UFD[1,1].

UFD

A UFD is a User File Directory, corresponding to a user PPN, project-programmer number. A UFD is a file with extension UFD in the [1,1] directory. It consists of a sequence of UFD entries which are either 4 or 16 words long, depending on whether the monitor was assembled with FTLUFD enabled or not. WAITS changed to the long format late 1977.

Offset Description
0 SIXBIT file name
1 SIXBIT file extension,,Creation timestamp
2 Protection
3 Record address of the first block in the file
The information below is only in the long entry format
4 File length, in words
5 Last time written
6 Reference timestamp
7 Dump status
12 SAT ID
13-16 DQINFO
17 Record offset

UDP

A UDP is a User Disk Pack. This is a removable disk pack that holds data for a single user. WAITS will have at least one disk drive available for mounting UDPs.