Hardware manual

The "defaultVersionsKept" entry in the DiskDescriptor records the number of old versions of files that
should be retained by the system. If this entry is 0, no version accounting is done: new files simply replace
old ones. Version numbers have been deimplemented.
The entry in the disk descriptor named "freePages" is used to maintain a count of free pages on the disk.
This is a hint about a hint: it is computed when a disk is opened by counting the bits in the bit table, and
then incrementing and decrementing as pages are released and allocated. However the bit table is itself
just a collection of hints, as explained below.
The bit table contains a "1" corresponding to each virtual disk address that is believed to be occupied by a
file, and "0" for free addresses. These values are, however, only hints. Programs that assign new pages
should check to be sure that a page thought to be free is indeed so by reading the label and checking to see
that it describes a free page. (The WriteDiskPages and CreateDiskFile procedures in the disk object
perform this checking for you.)
2.5. Oversights
If the Alto file system were to be designed again, several deficiencies could be corrected:
Directory entries and label entries should have the same concept of file identifier. Presently, we have
filePointers and fileIds.
There is no reason why the last page of a file cannot contain 512 bytes.
It is unfortunate that the disk controller will not check an entry of 0 in a label, because these values
often arise (numChars of the last page, page number of the leader page). Another don’t care value
should be chosen: not a legal disk address; with enough high order bits so that it will check numChars
and page number fields.
The value used to terminate the chain of disk addresses stored in the labels should not be a legal disk
address. (It should also not be zero, so that it may be checked.) If it is a legal address, and if you try to
run the disk at full speed using the trick of pointing page i’s label at page i+1’s disk address in the
command block, the disk will try to read the page at the legal disk address represented by the chain
terminator. Only when this results in an error is end of file detected. A terminator of zero has the
undesirable property that a seek to track 0 occurs whenever a chain runs into end-of-file.
3. The Disk Object
In order to facilitate the interface between various low-level disk drivers and higher-level software, we
define a "disk object." A small data structure defines a number of generic operations on a disk -- the
structure DSK is defined in "Disks.D." Each procedure takes the disk structure as its first argument:
ActOnDiskPages: Used to read and write the data fields of pages of an existing file.
WriteDiskPages: Used to read and write data fields of the pages of a file, and to extend the file if
needed.
DeleteDiskPages: Used to delete pages from the end of a file.
CreateDiskFile: Used to create a new disk file, and to build the leader page correctly.
AssignDiskPage: Used to find a free disk page and return its virtual disk address.
ReleaseDiskPage: Used to release a virtual disk address no longer needed.
VirtualDiskDA: Converts a real disk address into a virtual disk address.
Disks & Bfs August 10, 1980 54
For Xerox Internal Use Only -- December 15, 1980