[Coco] Another Coco Virtual Disk Util
Theodore (Alex) Evans
alxevans at concentric.net
Tue Oct 22 04:49:22 EDT 2013
On 10/21/2013 10:37 PM, Gene Heskett wrote:
> On Monday 21 October 2013 22:27:42 Theodore (Alex) Evans did opine:
>> I have never seen any actual OS-9 documentation that referes to that
>> area as a FAT. The Level 2 documentation calls it a disk allocation
>> map and I haven't looked at my level 1 documentation, but I believe
>> that it calls it the same thing. It doesn't even serve the same
>> function as a FAT. It merely indicated what ckusters are and are not
>> allocated. A FAT is a singly linked list of allocated regions for
>> each file.
> In os9, that is referred to as the FD.SEG, and is part of the file
> descriptor sector. That is a series of 48 each 5 byte entries, where the
> first is the LSN of the first (or next) piece of the file, 3 bytes,
> followed by 2 bytes which is the length of that part of the file in
> clusters. Every file, including directories, has an FD.SECTOR that
> describes the file, and where its at. While this could be used to
> determine where free space that can be used is located, locating, then
> reading, every FD.SECTOR on the disk would be a very time consuming
> operation, so os9 has a separate allocation map in a known place, between
> the disk's own descriptor in LSN0, and the first FD.SECTOR describing the
> root directory. Then writing a new file is just a matter of finding out
> how big SAS is set to, and then searching through this allocation map
> looking for a big enough space to write SAS clusters of the file, something
> it can do about 500-5000 times faster. It then allocates SAS clusters, and
> writes the file till it runs out of file, closes it and returns the unused
> portion of SAS to the free disk by clearing those bits not used. If the
> file is bigger than SAS clusters, another SAS clusters will be allocated, a
> 2nd FD.SEG entry in the FD.SECTOR is composed, and that process repeats
> till it has run of of room to create the 49th FD.SEG entry, or the file has
> been written in its entirety.
Which is exactally my point. There is neither a FAT, nor a singular
equivalent to a FAT on an OS-9 disk. The function of the FAT on a FAT
formatted disk is split into seperate things on an OS-9 disk.
>> If you have a FAT the directory entry points to the first
>> allocated region. Each entry in a FAT indicated one of three things,
>> the region is unallocated, wht the next region in the file is, or that
>> the region is the last allocated region in the file. As it happens
>> (not surprisingly considering that RS-DOS was developed by MS) this is
>> exactally the way the track 17 on an RS-DOS disk is layed out.
> Applicable to the RS-DOS filesystem. But don't they call that a GAT, for
> Granule Allocation Table??
Yes, but it it at least has the same function as a FAT.
--
Theodore (Alex) Evans
More information about the Coco
mailing list