Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tracks, Sectors, Heads, cylinders, etc...

503 views
Skip to first unread message

MORTALIS

unread,
Sep 6, 1996, 3:00:00 AM9/6/96
to

can someone explain to me how these work on a floppy drive? I know
basicly about sectors, but what are heads, Tracks, & cylinders? How do
they all relate to each other... I think they go in the order of
sectors, tracks, heads, cylinders... is there anyway just to use
sectors? maybe a formula were I can just input the sectors and it will
give me which track/head/cylinder it is on? any help would be
appreciated.

George C. Lindauer

unread,
Sep 7, 1996, 3:00:00 AM9/7/96
to

MORTALIS (lo...@iamerica.net) wrote:
: can someone explain to me how these work on a floppy drive? I know

Floppies don't have cylinders. I think cylinder is another name for track,
but you usually see it in conncetion with a hard drive.

The data on a disk is stored in 80 concentric circles (these days) on the
disk. Each circle is successfully smaller than the last, until you get to
the circle closest to the hub. On a floppy disk with more than one head,
they have arranged that both sides of the disk can be used. When you
switch heads you are switching to the other side of the disk. Each of
the concentric circles is called a 'track'. The disk is further cut into
pie-shaped pieces... on a 1.44MB disk there will be 18 such pieces on
each side of the disk. When you cut one of the tracks into the 18 pieces
the pie shape suggests you get the 18 sectors of that track. So
for disk capacity we get:

512 bytes/sector*18 sectors/side-track*2 sides * 80 tracks

you should get the total capacity for the disk, 1.44MB.

Note that not all disks are double sided, so the number of heads may
change. Different sized disks also have differing numbers of sectors
because only so much data can be squeezed into any given design. The
basic constant is that the majority of floppy disks these days are
formatted with 80 tracks. Although often you can squeeze one or two more
tracks out of them if necessary...but be prepared for a higher
error rate on such extra tracks if you use them. Another thing you
can do is change the way the pie is cut to have less sectors; then you
can have more data/sector. Since there is some overhead between sectors
you can squeeze lots more space out of the disk. I regularly
use 1.44MB disks which I have custom formatted to hold 1.6MB of data
without trying to use extra tracks. Dos doesn't like it, but if you
are going around dos it can be quite effective.

You can pick your own formula for pconverting a logical sector number
into the corresponding track/sector/head trio if you aren't using someone
else's format. Generally it is customary to go linearlyu accross the
disk though... first progress through all the sectors in the first
track, then switch heads and go through all the sectors in the other side;
then switch to the next track and go back to the first head and proceed
through the sectors there... then proceed to the other head (other side)
and keep going like that. This is customary because for files
that are stored in consecutive sectors this method yeilds the fastest
access.

So the basic formula to convert logical sector x is:

sector = x % sectors/track/head;
temp = x / (sectors/track/head);
head = temp % heads
temp = temp/heads;
track = temp

Which for a 1.44MB disk is:

sector = x % 18;
temp = x/18;
head = temp %2;
temp = temp/2;
track = temp;

At this point if track is greater than or equal to
total tracks you are trying to
access beyond the end of the disk. The first time you try writing
use a blank disk so you won't corrupt information MSDOS needs and lose
the data on your disk.

David

@#$%!?!

unread,
Sep 7, 1996, 3:00:00 AM9/7/96
to

: can someone explain to me how these work on a floppy drive? I know
: basicly about sectors, but what are heads, Tracks, & cylinders? How do
: they all relate to each other... I think they go in the order of
: sectors, tracks, heads, cylinders... is there anyway just to use

head: The mechanical component of a disk drive that comes close enough
to the surface of the disk to read or write data. A disk drive
has at least one head per surface. Some drives have a separate
head for each track. I believe some have multiple heads per
track.
arm: The heads are at the ends of a arm that moves the heads back
and forth across the tracks. The arm places the each head
over the same track of every surface of the disk simultaneously.
(Assuming this isn't a head per track drive.) The physical
movement of the arm over the disk is the track seeking.

sector: The smallest chunk of a data on disk. I don't know details of
sector formats but I think their supposed to include sector
address and error detection/correction. It is because of this
overhead data is grouped into sectors rather than just picking
up a random string of bits from anywhere on the surface.
track: A sequence of sectors that for a complete ring around the disk.
A track is all the sectors that can be read from one disk
surface without moving the arm. Once the head is over the
correct track, it then begins sector seeking.

platter: One of the actual disks piled together to make a disk. Floppies
have a single platter.
surface: One side or the other of platter. Old floppies had one usable
surface. Modern ones have two. Hard disks have a surface on
both sides of each platter except, possibly, the top and bottom
platters.

cylinder: The disk arm places on heads over the same track address of
each surface simultaneously. All the sectors you can reach on
one surface without moving the heads in the track. All the
sectors you can reach on all surfaces without moving the heads
is the cylinder.

Seeking a sector involves two motions: moving the arm to the correct
track, and rotating the sector to the head. If all data transfers are
restricted to a single cylinder, you only have rotational delay.

: sectors? maybe a formula were I can just input the sectors and it will
: give me which track/head/cylinder it is on? any help would be
: appreciated.

Actually converting a logical sector address into a physical (track,
surface, sector) address depends on the how much intelligence is in
the disk drive and its controller. The controller might handle
the whole conversion, or it might expect you to do it yourself. To
make things more interesting, sectors are sometimes interleaved
due to cpu/memory/drive speed differences, so that the logical
sector of a track might be physically orderred as 1, 7, 2, 8, 3, 9,
4, 10, 5, 11, 6, 12, 1, 7, ... There might also still be disk out
there that have different sectors/tracks for different tracks.

If your disk drive/controller does not do the address conversion, you
might want to check with the manufacturer for the best techniques.

--
In mirrored maze he met the Mother, | smr...@netcom.com PO Box 1563
the lost and breathless, lonely brother. | Cupertino, California
Both crone and child, now crying wild, | (xxx)xxx-xxxx 95015
her clinging clay will clothe and smother. | I don't use no smileys

KC

unread,
Sep 7, 1996, 3:00:00 AM9/7/96
to

> Floppies don't have cylinders. I think cylinder is another name for
track,
> but you usually see it in conncetion with a hard drive.

Not quite...

A track is a single circle around the platter of a disk... track zero is
the very outside circle, and track ??? (could be anything) is the inner
most circle...

Normally with a hard drive you have more that one platter or disk, all
stacked on top of one another....

A cylinder is the same track on all disks!

Example: if you have 3 platters (disks), each with 1000 tracks, the first
cylinder would be track zero of disk 1 + track zero of disk 2 + track zero
of disk 3.

easy enough?


MORTALIS

unread,
Sep 7, 1996, 3:00:00 AM9/7/96
to
ok, got it, I think... so, everytime i change a track, I would have to
change the cylinder, if the tracks are on the same "platter". I guess I
should go see if bios has a function that returns how many tacks, etc...
are on a disk. Wonder why they didn't make it where a cylinder is a
"platter", then you would only have to change the cylinder when you
reach the end of the tracks on the first "platter"? Thanks...

Bill Stewart

unread,
Sep 8, 1996, 3:00:00 AM9/8/96
to MORTALIS

MORTALIS wrote:
>
> can someone explain to me how these work on a floppy drive? I know
> basicly about sectors, but what are heads, Tracks, & cylinders? How do
> they all relate to each other... I think they go in the order of
> sectors, tracks, heads, cylinders... is there anyway just to use
> sectors? maybe a formula were I can just input the sectors and it will
> give me which track/head/cylinder it is on? any help would be
> appreciated.


OK, here goes ---
the hard drive is laid out in cylinders, tracks, heads and sectors. You
can visualize this situation as being similar to several records or CD's
stacked one above the other. So a hard drive has several platters, each
of which has a top and a bottom side.

The grooves of the record or CD are tracks, i.e. one revolution of data
stored on the material itself. Each of these has a top and a bottom
side, equivalent to heads. A pie slice of a track is a sector. And if
you stack several records atop one another and then look through them
all on a track you have a cylinder.

Thus, any particular address on a drive can be spoken of as being on
cylinder w, track x, head y, sector z, which narrows you down to the
cylinder of ALL platters in the drive, the groove on a particular
platter, the side of the platter, and the pie wedge within the groove.

This is how to physically locate any part of the drive, and using this
method the smallest part of a drive you can address is one sector. In
IBM type computers a sector generally holds 512 bytes, or characters.

DOS does not use this method of addressing drives. DOS instead
allocates the drive by using CLUSTERS, which are groups of sectors. The
smallest cluster that DOS uses is 2k, or 4 sectors of data. So when DOS
wants to write something to disk, it looks in the FAT for a free
cluster, translates the cluster location to the
cylinder/track/head/sector corrdinate system, and begins writing. It
then marks all 4 sectors as being used WHETHER OR NOT THE DATA FILLED
THE CLUSTER as in use. Thus 2k is the smallest part of the drive that
DOS can address, even if all you're writing is "Hi". As drive sizes get
bigger the cluster size does too, so that my 1.2 Gig hard drive uses 32k
clusters. So on my drive storing "Hi" takes 32k bytes of storage !!


Hope this helps!

--
__
_\\|//_ |_/\
(` o-o ') ,--,;\)
-------oooO-(_)-Oooo------- ,-'-..._\
Amateur Radio Station N4CRO \_...._(_)
--------------------------- |c c ) ) You mess with me,
___ /`._ / / you mess with my
-==[___]\/; \/ Illudium Pew-36
`3-'| ` ) Explosive Space
Bill Stewart <'/||\`> Modulator ....
2324 Dover Ave __|::|
Fort Myers, FL 33907 USA (__.';|
email: ste...@peganet.com (_)

ccr...@pacific.net

unread,
Sep 8, 1996, 3:00:00 AM9/8/96
to

In <50qto7$l...@hermes.louisville.edu>, gcli...@starbase.spd.louisville.edu (George C. Lindauer) writes:
MORTALIS (lo...@iamerica.net) wrote:

>Floppies don't have cylinders. I think cylinder is another name for track,
>but you usually see it in conncetion with a hard drive.

Floppies do have cylinders. A cylinder is defined as all of the tracks which
can be accessed without moving the heads. Therefore a double sided floppy
has two tracks per cylinder.

-- Chuck

Yousuf Khan

unread,
Sep 8, 1996, 3:00:00 AM9/8/96
to

On Fri, 06 Sep 1996 21:59:05 -0500, MORTALIS <lo...@iamerica.net> wrote:

>can someone explain to me how these work on a floppy drive? I know
>basicly about sectors, but what are heads, Tracks, & cylinders? How do
>they all relate to each other... I think they go in the order of
>sectors, tracks, heads, cylinders... is there anyway just to use
>sectors? maybe a formula were I can just input the sectors and it will
>give me which track/head/cylinder it is on? any help would be
>appreciated.

Well, you will also have to look at the mechanisms of hard disks to
understand how the floppy works too.

Sectors- a grouping of 512 bytes of data into one unit. This is basically
fixed, you normally can't have any other size of sectors. You probably
already know that.

Heads- the heads are the physical read/write device that traverses over the
surface of the disk's platter. You have one head on the top surface of the
disk, which writes/reads data from that surface, and you have a second head
on the bottom surface too. Each head is actuated individually, by a
separate software command; so you can't be reading or writing to both
surfaces of the disk simulataneously. In a hard disk, which has more than
two platters, you'd have several heads each reading/writing to each surface
individually.

Tracks- this is a grouping of all sectors that occupy one concentric circle
of the disk on one platter on one side only. If you have 17 sectors/track,
then that surface holds 17 sectors from the starting point to the ending
point (which really is the same point since it's a circle, obviously).

Cylinders- these are all of the tracks on all of the surfaces of a disk
that form one concentric circle. If a disk has 6 heads, then it has 6
separate surfaces, each with its own separate tracks. The 6 tracks together
make up one cylinder.

Yousuf Khan
--
Yousuf J. Khan
yk...@achilles.net
Ottawa, Ont, Canada
Nation's capital


Phlash

unread,
Sep 9, 1996, 3:00:00 AM9/9/96
to MORTALIS

MORTALIS wrote:

> ok, got it, I think... so, everytime i change a track, I would have to
> change the cylinder, if the tracks are on the same "platter".

If you wanted to read all the tracks on a single platter, yes. However,
IBM 3740 format disks (all PC disks, and most other soft sectored ones)
are like this:

Most significant Least significant
---------------- -----------------

Cylinder number Head number Sector number

So to read each sector from a disk you increment the sector number until
it wraps at the sectors/track value, incrementing the head number until
it wraps, incrementing the cylinder number.

> I guess I
> should go see if bios has a function that returns how many tacks, etc...

You can read the format of a floppy disk from the BIOS Parameter Block in
the boot sector (which is always 0/0/1 [C/H/S]). Hard disk geometry is
stored by the BIOS at INT 41h for disk 80h, INT 46h for disk 81h, in a
Disk Paramter Block (DPB). Use Ralf Browns interrupt listing to get details
of these structures (if you have't got them already).

HTH,
Phil.

Ari Lukumies

unread,
Sep 10, 1996, 3:00:00 AM9/10/96
to

MORTALIS wrote:
>
> ok, got it, I think... so, everytime i change a track, I would have to
> change the cylinder, if the tracks are on the same "platter". I guess I

> should go see if bios has a function that returns how many tacks, etc...
> are on a disk. Wonder why they didn't make it where a cylinder is a
> "platter", then you would only have to change the cylinder when you
> reach the end of the tracks on the first "platter"? Thanks...

Er... When you access consecutive sectors on a hard disk (let's assume a
hypothetical disk with 17 sectors on a track and 4 heads), you go:

track 0, head 0, sector 1 (cylinder 0)
track 0, head 0, sector 2 (cyl. 0)
...
track 0, head 0, sector 17 (cyl. 0)
track 0, head 1, sector 1 (cyl. 0)
track 0, head 1, sector 2 (cyl. 0)
...
track 0, head 3, sector 17 (cyl. 0)
track 1, head 0, sector 1 (cyl. 1)
...

So, when you change the head on the same track, you're moving within the same
cylinder. When you change the track, you're moving to another cylinder. BIOS
(and the disk controller) deals with tracks, heads and sectors. Cylinder is an
abstraction that kind of collects all heads on the same track together. If you
think of a disk with two platters (as that above, four heads, one on each side
of a platter), and one particular track on each head, you're forming a
cylinder-like object if you draw lines from head to head on the same track.

Later,
AriL
--
All my opinions are mine and mine alone.

Derek Morton

unread,
Sep 13, 1996, 3:00:00 AM9/13/96
to

A cylinder is defined as all the tracks that can be read ** without ** moving
the heads.
For a floppy a cylinder has 2 tracks.
A floppy is read like this, lets start from cyl 0
first head 0 then head 1 (it is far quicker to switch heads 100ns than to move
cylinders 10ms)

then to cyl 1, hd 0 then hd 1, to the end of the disk

hope this helps

Derek


In article <3231D1...@iamerica.net> MORTALIS <lo...@iamerica.net> writes:
>From: MORTALIS <lo...@iamerica.net>
>Subject: Re: Tracks, Sectors, Heads, cylinders, etc...
>Date: Sat, 07 Sep 1996 14:49:26 -0500

>KC wrote:
>>
>> > Floppies don't have cylinders. I think cylinder is another name for
>> track,
>> > but you usually see it in conncetion with a hard drive.
>>

>> Not quite...
>>
>> A track is a single circle around the platter of a disk... track zero is
>> the very outside circle, and track ??? (could be anything) is the inner
>> most circle...
>>
>> Normally with a hard drive you have more that one platter or disk, all
>> stacked on top of one another....
>>
>> A cylinder is the same track on all disks!
>>
>> Example: if you have 3 platters (disks), each with 1000 tracks, the first
>> cylinder would be track zero of disk 1 + track zero of disk 2 + track zero
>> of disk 3.
>>
>> easy enough?

MORTALIS

unread,
Sep 13, 1996, 3:00:00 AM9/13/96
to

I'm trying to write some code to format a floppy but I have no idea how.
I have come up with some code but it does work that good. Were is the
information at about doing this sorta stuff? can someone give me some
steps on doing this with bios? this is what i was doing...

1. reset disk
2. set dasd type to 4 (1.44)
3. set media to 79 tracks, 18 sectors
4. format track with function 5h... repeat for heads, tracks if
nessasary.

can someone explain exactly what goes on when you format a disk? I
either would like to have real huge sectors or real small. how does 2m
get the 2megs out of the disk? any translate it to english? what is the
DBT for? do I need to mess around with that? Thanks for any help....

pb1

unread,
Sep 13, 1996, 3:00:00 AM9/13/96
to

[go to end for my comments]
A few years ago Derek's comments were the physical truth. On todays
disk drives any cyl/head/sector interface is a fiction maintained for
older systems. Modern drives have a different number of sectors on
various cylinder ranges. About the same number of sectors per inch of
track is the modern norm. More sectors on the longer tracks at a longer
radius, fewer sectors on the shorter tracks with a shorter radius.

Net result: think of block number (ie SCSI) and let the drive do the rest
of the work. Your cyl/head/track interface is first changed to block
inside the drive and then to physical location.

-the disk guy

Patrick Evans

unread,
Sep 13, 1996, 3:00:00 AM9/13/96
to George C. Lindauer

On 7 Sep 1996, George C. Lindauer wrote:

> : give me which track/head/cylinder it is on? any help would be
> : appreciated.
>

> Floppies don't have cylinders. I think cylinder is another name for track,
> but you usually see it in conncetion with a hard drive.

Yes, they do. The 80 concentric circles you describe are called
the cylinders, each cylinder designating a track. Sectors are
subdivisions of these.

The word cylinder historically comes from the tube-like shape that could
be imagined passing through a given ring on the disk (floppy OR hard).

+patrick

Patrick W. Evans m_____ _____m
Computer Science (({###((#)) ( ) ((#))##}))
York University, Toronto \##`#\##\\ \)(/ //##/#`##/
)' `) `\`-\**/-'/'`(' `(
ev...@yorku.ca ` ( ``\`,,'/'' )
http://www.yucc.yorku.ca/~patrick \--/ `
m`m`


Per Danielsson

unread,
Sep 14, 1996, 3:00:00 AM9/14/96
to MORTALIS

A good book to read might be "PC System Programming". Written
by Michael Tischer. Published by Abacus.

Good Luck, Per Danielsson, Sweden

George C. Lindauer

unread,
Sep 14, 1996, 3:00:00 AM9/14/96
to

Per Danielsson (per.dan...@swipnet.se) wrote:

: MORTALIS wrote:
: >
: > I'm trying to write some code to format a floppy but I have no idea how.
: > I have come up with some code but it does work that good. Were is the
: > information at about doing this sorta stuff? can someone give me some
: > steps on doing this with bios? this is what i was doing...
: >
: > 1. reset disk
: > 2. set dasd type to 4 (1.44)
: > 3. set media to 79 tracks, 18 sectors
: > 4. format track with function 5h... repeat for heads, tracks if
: > nessasary.
: >
: > can someone explain exactly what goes on when you format a disk? I
: > either would like to have real huge sectors or real small. how does 2m
: > get the 2megs out of the disk? any translate it to english? what is the
: > DBT for? do I need to mess around with that? Thanks for any help....
:
You can easily get 1.6MB out of a standard disk with large sector sizes.
I don't know how that 2MB stuff works. Anyway when you do step four you
should have specified a table of information that specifies how the
disk should be formatted. This information is specific to the type of
disk controller used in the PC, and is passed directly to the controller
to get it to format the disk.

I don't know what a DBT is... but chances are if you are formatting the disk
to some non-standard format you will have to take over all disk operations
anyway as MSDOS won't know what to do with it.

I'm foggy on whether the BIOS will be able to read a disk that has been
formatted with non-standard sector sizes--- I used to think not but someone
told me I was wrong. You WILL need a book to understand what is going on...
This stuff is covered in BIOS and hardware programming books. I have the
undocumented PC for example.

David

Peter den Haan

unread,
Sep 17, 1996, 3:00:00 AM9/17/96
to

pb1@ writes:

>A few years ago Derek's comments were the physical truth. On todays
>disk drives any cyl/head/sector interface is a fiction maintained for
>older systems. Modern drives have a different number of sectors on
>various cylinder ranges. About the same number of sectors per inch of
>track is the modern norm. More sectors on the longer tracks at a longer
>radius, fewer sectors on the shorter tracks with a shorter radius.

I'd like to add that the difference in sectors/track and hence speed
between the outer and inner part of a drive can be as large as a factor
two.

>Net result: think of block number (ie SCSI) and let the drive do the rest

In these days of LBA, what is SCSI-specific about thinking in terms of
block numbers?

- Peter

--
pie...@sci.kun.nl http://thef-nym.sci.kun.nl/~pieterh/

Paul Schlyter

unread,
Sep 17, 1996, 3:00:00 AM9/17/96
to

In article <51cn0v$h...@worf.qntm.com>, <@> wrote:

>>In article <3231D1...@iamerica.net> MORTALIS <lo...@iamerica.net> writes:
>>>From: MORTALIS <lo...@iamerica.net>
>>>Subject: Re: Tracks, Sectors, Heads, cylinders, etc...
>>>Date: Sat, 07 Sep 1996 14:49:26 -0500
>>
>>>KC wrote:
>>>>
>>>>> Floppies don't have cylinders. I think cylinder is another name for
>>>>> track, but you usually see it in conncetion with a hard drive.
>>>>
>>>> Not quite...
>>>>
>>>> A track is a single circle around the platter of a disk... track zero is
>>>> the very outside circle, and track ??? (could be anything) is the inner
>>>> most circle...
>>>>
>>>> Normally with a hard drive you have more that one platter or disk, all
>>>> stacked on top of one another....
>>>>
>>>> A cylinder is the same track on all disks!
>>>>
>>>> Example: if you have 3 platters (disks), each with 1000 tracks, the first
>>>> cylinder would be track zero of disk 1 + track zero of disk 2 + track zero
>>>> of disk 3.

Remember that both sides of each platter usually are used. Thus if
you have three platters, you'll have six tracks per cylinder, i.e. six
"heads" reading the disks. This is valid for floppies too: floppies
have only one platter of course, but both sides are used. Thus, on a
double-sided floppy, each cylinder contains two tracks.


>>>> easy enough?
>>>ok, got it, I think... so, everytime i change a track, I would have to
>>>change the cylinder, if the tracks are on the same "platter". I guess I
>>>should go see if bios has a function that returns how many tacks, etc...
>>>are on a disk. Wonder why they didn't make it where a cylinder is a
>>>"platter", then you would only have to change the cylinder when you
>>>reach the end of the tracks on the first "platter"? Thanks...
>
> A few years ago Derek's comments were the physical truth. On todays
> disk drives any cyl/head/sector interface is a fiction maintained for
> older systems. Modern drives have a different number of sectors on
> various cylinder ranges. About the same number of sectors per inch of
> track is the modern norm. More sectors on the longer tracks at a longer
> radius, fewer sectors on the shorter tracks with a shorter radius.
>
> Net result: think of block number (ie SCSI) and let the drive do the rest
> of the work. Your cyl/head/track interface is first changed to block
> inside the drive and then to physical location.

However the cylinder/head/sector view is still the physical truth for
floppies.

--
----------------------------------------------------------------
Paul Schlyter, Swedish Amateur Astronomer's Society (SAAF)
Grev Turegatan 40, S-114 38 Stockholm, SWEDEN
e-mail: pau...@saaf.se p...@home.ausys.se

Paul Schlyter

unread,
Sep 17, 1996, 3:00:00 AM9/17/96
to

In article <Pine.SOL.3.95.960913114001.12617A-100000@blue>,

Patrick Evans <cs94...@ariel.cs.yorku.ca> wrote:

> On 7 Sep 1996, George C. Lindauer wrote:
>
>> : give me which track/head/cylinder it is on? any help would be
>> : appreciated.
>>
>> Floppies don't have cylinders. I think cylinder is another name for track,
>> but you usually see it in conncetion with a hard drive.
>
> Yes, they do. The 80 concentric circles you describe are called
> the cylinders, each cylinder designating a track.

On double-sided floppies each cylinder contains two tracks: one track on
each side of the floppy.


> Sectors are subdivisions of these.
>
> The word cylinder historically comes from the tube-like shape that could
> be imagined passing through a given ring on the disk (floppy OR hard).
0 new messages