Simplest (practical) file system?
> How did some of the very early DOS systems allocate disk space in the
> days before FAT tables, etc?
>
> Just how simply can this be done?
>
Bob, pre-CP/M, the fairly popular North Star DOS filesystem simply used a
directory (first four blocks of the filesystem) with the name, starting
sector, number of sectors, and type for each file (16 bytes per entry).
Each file was laid out contiguously on the disk, starting at the sector
indicated and continuing for the set number of sectors. There was no file
allocation table or similar structure. It's lightweight and simple, but it
required you to know or "guess" the length of a new file when creating it.
You could specify a starting sector when creating a file, but if you didn't,
N*DOS would traverse the active directory entries to find the
highest-numbered used sector (start+length of each active file), then create
the new file at highest+1. And "growing" a file was a leap of faith--if
there was free space after it (and you had to know), you could delete the
file, which modified only the directory (didn't touch the data blocks), and
immediately recreate it with a new increased length using the same starting
sector. You could, of course, shrink a file using the same process. An
included utility would compress "holes" out of the filesystem caused by
deleted or shrinking files. --Patrick
Received on Sun Jul 27 2003 - 13:32:00 BST
This archive was generated by hypermail 2.3.0
: Fri Oct 10 2014 - 23:36:06 BST