[comp.sys.ibm.pc] physical organization of sectors on a dos

mician@usfvax2.EDU (Rudy Mician) (06/01/88)

Does anyone know exactly how the tracks on a 5 1/4" disk formated with 
DOS (v3.1) to include the system files are organized.  I thought that they
were arranged as concentric circles.  Is it safe to assume that a single
track is defined by a radius from the hub and further by the side of the
disk being examined, or can it assume the form of a spiral.


Thanks for all past and future help!


Rudy Mician     mician@usfvax2.usf.edu
Usenet:		...!{ihnp4, cbatt}!codas!usfvax2!mician
-- 

Rudy Mician     mician@usfvax2.usf.edu
Usenet:		...!{ihnp4, cbatt}!codas!usfvax2!mician

jcmorris@mitre-bedford.ARPA (Joseph C. Morris) (06/02/88)

In a recent article mician@usfvax2.usf.edu.UUCP (Rudy Mician) writes:
>
>                                      Is it safe to assume that a single
>track is defined by a radius from the hub and further by the side of the
>disk being examined, or can it assume the form of a spiral.

A track can be defined as the intersection of a surface (the disk platter;
effectively the head number) and a specific radius from the center of
rotation.  It is *not* a spiral; while there would be some situations in
which a spiral would improve performance, there are many more in which it
would be a major performance bottleneck.

To continue the definition, a cylinder is the set of all tracks which share
the same radius value.  On some mainframe disks this classical definition is
changed to define a cylinder as the set of tracks which can be accessed
without moving the head assembly.  On PC-based systems, the two are usually
synonymous.

Within a track, the sequence of sector numbers is a function of the "interleave
factor" established in the low-level disk format.  As a programmer the only
significance of this is performance; unless you're playing games with the
bare metal you usually don't need to know this value while writing code.
You *do* need to know this if you want to optimize disk data transfer rates.
A disk with a  1:1 interleave factor has sectors in numeric sequence:
1-2-3-4-5.  Other interleave factors spread the sectors out, as in a 2:1
format: 1-4-2-5-3.  Again, for programming purposes (including DOS formatting)
you don't need to know which way your disk was set up.

When you  format a new disk and instruct DOS to install the system  on it,
DOS places the normal boot record in the first sector, then writes the
FAT and root directory, then IBMBIO.COM and IBMDOS.COM in that order in
successively higher (logical) sectors.  All of these except for IBMDOS.COM
must be in contiguous clusters at the start of the disk; beginning with
DOS 3.something IBMDOS.COM may be located anywhere on the disk.  IBMBIO.COM
and IBMDOS.COM, however, MUST be the first two entries  in the root directory
or the disk will not be bootable.  These placement restrictions are 
required because the amount of code in the boot sector is limited and it
must be able to load the startup code (IBMBIO.COM) without having to go
through code to find the members in the directory and then gather-read
data from all over the disk.

There will be a quiz on this material next period.  Class  dismissed.