TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: CAMERON CLARK
from: JERRY COFFIN
date: 1997-07-31 22:54:00
subject: Signs of numbers

On (30 Jul 97) Cameron Clark wrote to Jerry Coffin...
 CC>     I'm probably confusing another file type, but here goes:
 CC>     I Thought an indexed file(not i.s.)  was a collection of clusters
 CC> that could access by using the index (a pointer). Meaning records
 CC> could be variable length and no seeks where require to access
 CC> record(n) since address calculation could give us the position of the
 CC> pointer to the cluster.
Hmm...this may be one meaning of the word "indexed" -- at minimum it
means that there's in index that points into the main file.  With a
minimum of an "indexed" file, to retrieve record N, you seed to position
N in the index, and it contains a pointer to the position of record N in
the main data file.
Now, if you prefer that the pointers be to clusters rather than merely
offsets in the file, you can fairly easily do that without bypassing DOS
for allocating clusters.  You'll generally end up using DOS int 25h and
25h to do your reading and writing, but it's entirely possible to store
cluster numbers instead of file offsets in your index.
However, any way you go at it, you end up with seeking actually
happening -- if you read track X, sector Y, head Z, then read track
X+30, Sector Y-10, Head Z+3, your disk is going to _have_ to do a seek
no matter what.  The index can contain the translated version of this,
or it can contain file offsets that get translated to head, track and
sector at runtime, but either is logically equivalent as far as indexing
goes.
That's not to discount the value of such a thing: pre-computing the
sectors that corrrespond to specific offsets can be extremely useful IF
you don't have enough memory handy to be able to cache the whole (or
nearly whole) directory and FAT.  In this case, you can avoid seeking
all the way to the directory, then to the FAT just to figure out where
on the disk the information happens to be.  In some cases, avoiding
those two seeks at run-time could be a _huge_ advantge.
    Later,
    Jerry.
... The Universe is a figment of its own imagination.
--- PPoint 1.90
---------------
* Origin: Point Pointedly Pointless (1:128/166.5)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.