The PDP-11 computer, build by Digital Equipment Corporation (DEC) in the late 20th century, was a classic machine of the minicomputer era. At the time of the -11’s introduction, DEC really had no idea what to do about software for its machines, and wasn’t even sure what was appropriate in the way of operating systems.
Over the next several years, DEC (and others) introduced a flotilla of operating systems for the PDP-11. Here are DEC’s contributions:
- Paper Tape Operating System – name says it all.
- DOS-11 – the Disk Operating System; spent too much time visiting the disk.
- RT-11 – a real time operating system.
- RSX-11 – a resource sharing executive, produced in three flavors.
- RSX11-S – a single-user or stand-alone version
- RSX11-D – disk-based, multi-user, a resource hog.
- RSX11-M – multitasking – a prototype for later systems, notably VMS
- RSTS-11 – a resource sharing, time sharing system.
The RT-11 operating system came in several flavors, but all shared the same, simple file structure. The file system consisted of a single directory configured at a fixed location at the start of the disk volume. The directory could consist of multipe non-contiguous “segments” as defined in the directory’s header.
Searching for files was very simple: when the system booted, the boot code would search the RT-11 directory for the name “MONITR.SYS” which indicated the system image to load and run.
An RT-11 directory entry consisted of the following:
- 16-bit flag word to indicate if the directory entry is permanent, temporary, or currently unused.
- 6-character file name using DEC’s Radix-50 character set (A-Z, 0-9, $, and “.”).
- 3-character extension suffix, also in Radix-50
- File creation date
- File’s starting block number on the hard drive
- File’s length in blocks
- Additional data, as configured when the directory was created
When creating a directory, the operator can configure it to contain extra space for application specific file data. It would be the application’s responsibility to update the additional data in a file’s entry.
To create a new file, even temporarily, RT-11 had to allocate space by updating the directory. If the program specified a particular file size, RT-11 would try to fit that size. If the program did not specify a file size, RT-11 would allocate half of the largest block of free space available on the hard drive.
Once RT-11 had determined the amount of space for the new fiile, and its intended location on the hard drive, it would usually allocate the hard drive space by creating two adjacent directory entries. The first entry would be for the new file, and would contain the number of blocks desired for the new file. The second entry would be for any free space left over after allocating the desired amount of space for the file.
When first opened, a file was generally marked as “tentative” in the directory, and updated to “permanent” when and if the creating program actually closed the file.
Here is an assessment of RT-11’s file system in the context of the eight concepts (Challenges and Objecives) noted earlier:
- File storage – each file consists of a contiguous group of blocks on the hard drive.
- Locating files – files were located via the directory, which resided in a fixed location at the beginning of the hard drive. The directory consisted of a single array of entries, each with a 6.3 character file name formatted in DEC’s Radix-50 format. A file’s directory entry indicated the address of the first block of the file.
- Managing free space – unallocated disk space is represented by “empty” directory entries that indicate the starting disk address and length of the empty space.
- Easy to implement – Yes. Consists of a single directory data structure.
- Speed – Efficient for very small hard drives: to find the last file in the directory you must read every block in the directory.
- Direct vs. sequential – supported both. Direct access simply required the offset to the start of the file and a seek limit based on the file’s length.
- Storage sizes – limited to the offset sizes in the directory entries, which were generally 16-bit values.
- Robustness – since files were made up of sequential blocks, accidental deletions were easy to undo. A trained developer could recover an entire directory with a lot of work by looking at block contents to identify the start and ending blocks for individual files.
The RT-11 file system’s simplicity led to its being used in various other applications. For example, the microcode disk used by the original VAX hardware used an RT-11 file system. The LOCK trusted computing base used the RT-11 file system for accessing files on its embedded SIDEARM processor.