Xref: utzoo comp.sys.amiga.tech:8050 comp.sys.amiga:43233 Path: utzoo!attcan!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!wuarchive!brutus.cs.uiuc.edu!samsung!uunet!mcsun!sunic!dkuug!freja!rimfaxe!thomas From: thomas@rimfaxe.diku.dk (Thomas Nikolajsen) Newsgroups: comp.sys.amiga.tech,comp.sys.amiga Subject: Re: More dos questions Message-ID: <4952@freja.diku.dk> Date: 2 Nov 89 22:12:13 GMT References: <5599@ucdavis.ucdavis.edu> <8181@cbmvax.UUCP> Sender: news@freja.diku.dk Lines: 36 daveh@cbmvax.UUCP (Dave Haynie) writes: >in article <5599@ucdavis.ucdavis.edu>, rogers@iris.ucdavis.edu (Brewski Rogers) says: >> Keywords: dos,sod,dso,osd >> Xref: cbmvax comp.sys.amiga.tech:8243 comp.sys.amiga:44101 >> 1. How exactly is Seek() implemented? If I Seek 200K forward, will dos >> read through all the data until it gets there, or does it have some way of >> figuring out where to move the head to? If it does have a way of knowing >> where to move the head to, is the information easily found, or does it >> have to move the head to find it? >Each file header contains pointers to the first 72 data blocks. If a file >is longer than that, the file header will have a pointer to an extension >block, which points to the next 72 data blocks, and also has an extension >block. So to seek ahead 200K, the filesystem will have to move through >5 extension blocks to find the pointer that references the block at 200K. This answer indicates that: (X) all data blocks in a file, but the last, shall have the same length. Especially this shall be the case for OSF (the old file system), but there each data block does have a long word containing the length of the data in the block, this seems quite stupid if it is only really used in the last one. If it is only for the redundancy with the total number of bytes in the files, stored in the file header block, then it seems to be a waisted long word per data block, it could be done cheaper. I don't remember to have seen the (X) requirement in the "Amigados Technical Reference Manual" for v1.2 (or what the title of the "technical" part of this Amigados manual from Bantam Books is). As I don't have the manual here to check it out, I could be entirely wrong. Off cause the (X) requirement should be granted to make it possible to implement Seek() in an efficient way. Thomas Nikolajsen, thomas@freja.diku.dk "don't say it makes any sense, it doesn't" Computer Science Department, Copenhagen University, Denmark, here, somewhere