Message-ID: <330@pucc-i>
Date: Mon, 25-Jun-84 18:12:48 EDT
Article-I.D.: pucc-i.330
Posted: Mon Jun 25 18:12:48 1984
Date-Received: Thu, 28-Jun-84 02:34:02 EDT
Organization: Purdue University Computing Center
Lines: 41
I tried to respond to this by mail, but it didn't work. I said earlier that
Apple Pascal is *much* faster on disk accesses than Apple DOS, and that it
is also faster than CP/M.
How much faster than CP/M? I don't have CP/M myself, so my information here is
second hand. I do know that Pascal uses a "two-ascending" sector interleaving
scheme, while CP/M uses "three-ascending". Two-ascending is guaranteed to be
faster as long as you are not missing sectors and having to wait an extra full
rotation. Pascal can do this because there is less intermediate processing
going on during a block read.
I don't have a reference handy and I can't quote any performance statistics,
but I recall reading that Pascal beats CP/M on disk access, which is what
you would expect when reading half the sectors that go by instead of a third.
Apple DOS uses a "three-descending" interleaving scheme, which is equivalent
to "thirteen-ascending" and means there is a LOT of waiting between sectors
if you try to read them in ascending order. A common optimization scheme
is to read the sectors in descending order to cut down on the wait time, but
that still leaves you with the equivalent of a "three-ascending" scheme,
the same as CP/M.
As everyone knows, there is no free lunch. In order to get faster disk
access, you have to give up something. In Pascal, what you give up is
chaining; files are always allocated in sequential blocks instead of
being strung randomly around the disk. This means you can occasionally
run out of room on a file because space on the disk is fragmented.
In practice, I have found that the problem is not serious (file compaction
is quick and easy and does not have to be done very often) and I gladly make
the tradeoff.
There is a second benefit: because there are no chaining sectors, you get
more space for actual data on each disk (274 out of 280 blocks to be exact,
where a block is 512 bytes = 2 sectors, the smallest amount of data you can
address on a Pascal disk). That leaves 2 blocks for a boot program and
4 blocks for the disk directory. The actual data storage per disk is
140,288 bytes out of 143,360.
--
Dave Seaman "My hovercraft is full of eels."
..!pur-ee!pucc-i:ags