Witchy wrote:
I always thought FAT (File Allocation Table) was the
directory structure of
RT11, but I'm younger than 40 so I'm prepared to be shot down in flames :)
Jerome Fine replies:
Since RT-11 is still actively used, a set of DOCs can still
help anyone who is interested.
Assuming that RT11 actually means RT-11 based originally
on DEC (Digital Equipment Corporation) PDP-11 computer
systems, then a brief review of the RT-11 file structure might
be helpful.
(a) RT-11 does NOT use a FAT!!!!!!!!!!!!!!!!!
(b) While block ONE for a file structured device
does contain some additional directory information,
it is not normally required for directory operations.
(c) Block 6 is the start of the directory for ALL
random access file structured media. Note that while
block 1 contains a word that has 6 as the value that
is nominally used to point to block 6, so many RT-11
programs ASSUME that block 6 is the start that
it is no longer possible for any other block to be used.
(d) The file structure is based on directory segments.
(e) Each directory segment is EXACTLY 2 blocks
in size or 512 words of 16 bits.
(f) The RT-11 command to set-up an RT-11 file
structure is "INITIALIZE dev:" and this command
is totally separate from the FORMAT command
which deals ONLY with the LLF (Low Level
Format) of a disk drive or the media in the case
of removable media (with certain exceptions that
most users would not appreciate - including the
fact that probably most media can't be FORMATed
from RT-11 in the first place). In RT-11, the
FORMAT command does NOT include setting
up the RT-11 file structure. For DOS/Windows
people, this usually causes GREAT confusion!!!!
(g) All file space in an RT-11 directory is accounted
for via entries within each directory segment - including
areas that are NOT yet allocated that are noted in the
status word as being just that - UNUSED.
(h) Each freshly initialized RT-11 file structure has
exactly one directory segment which contains exactly
one file entry for all of the UNUSED blocks on that
random access device. There are a maximum of
31 directory segments allowed (some RT-11 file
structures for devices that are small such as floppy
media allow for many fewer than 31 segments.
(i) Each directory segment has 5 words at the start:
o Maximum Number of Directory Segments
o Next Directory Segment - Zero if the Last
o Total Number of Directory Segments in Use -
ONLY maintained in Directory Segment #1
o Number of Extra Bytes in Each File Entry
o Starting Block Number of First Area which
means the maximum device is 65535 blocks
(RT-11 does NOT check to verify that this
value is correct and follows immediately after
the previous file entry in the linked list - thus
it is possible to successfully "fool" RT-11,
but this is STRONGLY against ALL rules
and should not even be considered EXCEPT
for READ ONLY MEDIA such as a CD -
and then ONLY in special cases!)
(j) Each File Entry is Composed of a Minimum
of 7 words - extra WORDS are allowed
o Status Word - File Entry Type (see k below)
o 3 words of RAD50 file name (2) and type (1)
o Number of Blocks in the File Entry which means
that the maximum file is 65535 blocks
o Used for TENTATIVE File Entries - used by
TSX-PLUS for file times for PERMANENT
files - proposed for use for Y10K dates
o Creation Date (01-Jan-1972 up to 31-Dec-2099)
o Extra WORDS are used by user programs as
specified by Number of Extra Bytes (ALWAYS
EVEN) in Each File Entry
(k) The are (currently - and probably this will NEVER
change) ONLY three types of space:
o UNUSED - (1000) the space is available
o TENTATIVE - (400) the space has been requested
o PERMANENT - (2000) the space has been allocated
o END OF FILE entries (4000 - only ONE word
is then required for the whole file entry)
(l) The maximum number of file entries in each directory
segment is 72 [=(512-6)/7].
(m) All file entry blocks are contiguous by definition which
means that all files are contiguous. Files can be
"extended" only if the immediately following file
entry is UNUSED and has sufficient blocks available -
this is rare and can't be relied upon in most cases.
Since the above is already TOO much detail, I will not
mention how files are allocated by the USR (User
Service Routine) along with how extra directory segments
are created.
Any questions are welcome!
Sincerely yours,
Jerome Fine
--
If you attempted to send a reply and the original e-mail
address has been discontinued due a high volume of junk
e-mail, then the semi-permanent e-mail address can be
obtained by replacing the four characters preceding the
'at' with the four digits of the current year.