Subject: Re: RFC: My fd* wish list :)
To: Todd Vierling <tv@NetBSD.ORG>
From: Brian C. Grayson <bgrayson@ece.utexas.edu>
List: port-i386
Date: 04/26/1998 20:03:05
Todd Vierling wrote:
>
> On Sun, 26 Apr 1998, Brian C. Grayson wrote:
>
> : The savings are from converting
> : <header gap data gap>^n into header gap <data>^n gap, i.e., using
> : ``useless'' dead/idle space for data, and not with changing the
> : lower-level bit format.
>
> Where is this ``useless'' space coming from?
Quick summary: BEFORE: 18 headers, 18 pre-data gaps, 18
post-data gaps. AFTER: 3 headers, 3 pre-data gaps, 3 post-data
gaps. All the space that was needed for 15 headers+gaps (around
3000 bytes) can now be used for more data instead. I can give
you some numbers if you want to see how it all plays out in
reality.
The gaps are needed between the address and data fields on the
disk. Take the example of writing one sector: once we find the
right address field, we need to turn on the erase head (nonzero
delay) and then start writing the new sector. Once we finish the
sector, we need to turn off the erase head (again nonzero delay).
If there were no gap bytes between the end of the data and the
next address field, the first bytes of the address field would
get clobbered by the erase head before it could get turned off.
However, the post-data gap (over which the user has control,
even on ST506 drives) is usually very conservative, in order to
allow an 8MHz 8080 to have enough time after the last sector to
decide it wants the next sector also (for 1:1 interleave). :)
It can usually be reduced _very_ much and still work perfectly,
just like a bunch of Pentium and K6 chips can be overclocked and
still work perfectly. Plus floppies have builtin retry, so it's
even less of a concern.
> A SCSI or IDE (actually, ATAPI) disk gives a flat, 512 bytes per sector (or
> whatever the disk's byte per sector count is), sector-mapped interface to
> the computer. The "header" and "data" you refer to is part of those disks'
> (opaque) _encoding_. You cannot change it, nor even touch the headers from
> outside the disk.
I'm assuming hard disks look like ST506, which it sounds like
is no longer true. On the ST506, the layout on the disk was
very similar to the floppy format: each sector has 14 bytes of
gap before the address field, followed by a 7-byte address field,
then 15 bytes gap, data, and 3+x gap (where x is controllable).
By increasing the sector size, one eliminates the 14+7+15+3+x
= 39+x bytes of ``overhead'' -- what I previously called
``useless.'' Yes, you can not modify the header, and the access
is still ``flat,'' but you can reduce the _number_ of
headers+gaps (overhead) on a track by using a larger sector size.
If modern hard disks no longer have address fields and the
requisite gaps, through techniques such as the
single-sector track mentioned in another post, or through using
actual larger sectors on the disk and simply exporting a
``view'' of 512-byte sectors, then increasing the sector size
will not buy you anything.
Does that explain my point of view better?
Happy hacking...
Brian
--
Brian Grayson (bgrayson@ece.utexas.edu)
Graduate Student, Electrical and Computer Engineering
The University of Texas at Austin
Office: ENS 406 (512) 471-8011
Finger bgrayson@orac.ece.utexas.edu for PGP key.