This paper describe the disk-related facilities as implemented in DRIVER. These facilities are used in the system to handle font changing, colour and picture definitions. A brief description on the FR80 disk structure is also included.
A disk is divide into blocks of 400(octal) words and there are 2000(octal) blocks in a disk. Some blocks are reserved for special purposes and we are particularly interested in the following:
BLOCK NUMBER PURPOSE 1754 master directory 1755-1773 user directories 1774 usage map
Fifteen user directory entries are allowed in the Master directory and 50 files are allowed in each user directory. The layout of both is shown in diagram-1. It is always possible to check what is in the disk by using the command $UT<CR> within DISK AUDIT. Effectively the system displays the usage map as illustrated in diagram-2. Alternatively, one may read the usage map directly within a program. A block is occupied if there is a '0' in the corresponding bit.
The following facilities are currently provided
An overall picture is shown in diagram-3. Operations (3), (4) and (5) are tasks in the sense that. their activities can be overlapped with others. Users are not allowed to create new files through DRIVER and all disk blocks acquired will be released at the end of a job (or as soon as it is no longer required).
The usage map is searched and the first available block will be allocated to the requesting process. The corresponding bit in the table will be set to '0' to indicate that it is no longer available. The operation can call the disk handler directly without goes through the CONTROL as there is no I/O involved.
Binary files consists of data organized in a set of groups with the following format:
address
2's complement of 'n'
'n' data words
the last group is followed by either a 'JMP' or 'HLT' (in both cases bit 0 is set, so can be distinguished from an address easily).
Following this is a list of variable-names/addresses. A variable name may consist of 1 to 6 characters and 3 characters are packed into 1 word in right adjusted SQOZE code. Suppose the character codes of the 3 characters are C1,C2 and C3, the SQOZE code will be
C1*1600+C2*40+C3
Bit O will be set in the first word for a 2-words entry. Character codes are: (in octals)
0,1,... = 1,2, ... A,B,... = 13,14,...
The last paragraph is included here for information only and is not relevant to the operation concerned. It is possible .to allow this operation to be a task but at the moment it is not.
Given the block number of the first block of a file, the remaining blocks can be traced through word 0 of each block. So a requesting process will be fed. continuously without further interaction, with the disk-read task once the request is granted. It is possible for a requesting task to terminate its own request, without waiting till the end of a file. The Read Control shown in the diagram is used to prevent two processes competing with each other. As far as the tasks are concerned, the priority of 'READ' is lower than that of 'WRITE' and this is dictated by the way they are used in DRIVER.
Buffers are arranged in a queue and will be written to disk in due course. While they are in the queue, word 0 of each buffer is used temporarily to record the state of that particular block, for example first or last block of a file and etc. Once again, the 'WRITE CONTROL' prevents two different processes disrupting each other. Perhaps it has to be emphasized again that all files written to disk will be lost at end of a job.
This is done by setting the appropriate bit in the usage table corresponding to the number of the block returned.
A filename consists of 3 parts.
directory-name;filename-1 filename2
a directory name can be 1 to 3 characters packed into one word and is placed in the master directory. A filename can be 1 to 6 characters packed into 2 words and are placed in word-1 to word-4 of each entry in the user directory (for binary files, filename-2 should be the characters BINARY, in other cases, it may be absent). So searching a file is just an exercise of going through the directories. If a file is found, word 5 of that entry is the block number of the first data block of that file.
The disk handler is designed with other facilities in mind, which includes font changing, colour and picture definitions. At this stage it is difficult to predict how much overlapping can be achieved. Nevertheless, it is one of the aims of this exercise.
0000 WWWWWWWWWWWWWWWW WWWWWWWWWWWWWWWW
0040 WWWWWWWWWWWWWWWW WWWWWWWWWWWWWWWW
0100 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
0140 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
0200 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
0240 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
0300 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
0340 XXXXXXXXXX------ --------XXXXXXXX
0400 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
0440 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
0500 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
0540 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
0600 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
0640 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
0700 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
0740 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
1000 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
1040 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
1100 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
1140 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
1200 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
1240 XXXXXXXXX------- --XXXXXXXXXXXXXX
1300 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
1340 XXXXXXX--------- -XXXXXXXXXXXXXXX
1400 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
1440 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
1500 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
1540 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
1600 XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
1640 XXXX------------ ----------------
1700 ----------XXXXXX XXXXXXXXX-------
1740 ------------MDDD DDDDDDDDDDDDTANB
The left column gives octal disk addresses Each
letter in the table describes the usage of the block
represented by its position
W means Debug swapping block
X allocated file block
- available file block
M Master directory
D User directory
T Track usage table
U Unused block
A Message of the day
N Tape names for each directory
B Disk bootstrap
DIAGRAM 2