Date: Tue, 21 Oct 2003 04:03:11 +0000 From: "Matt Hanson" <[EMAIL PROTECTED]> Subject: RE: [LIB] How to calculate cylinder#s from sector#s?
Guess I'll cross-post to the list in case it's of any use to someone else down the line. Reply from the list message if you can.
[EMAIL PROTECTED]
^ ?? Que pasa aqui? 2 'i's?
Barnacle wrote:
Hanson wrote:
I'm having a hard time getting a definition for a 'cylinder'.
So you have - um - imagine an onion. Slice it through the equator. Lots of circles, right? Each ring of the onion is a track; slice the onion and you have platters. But the platters, in their unsliced state :) are the cylinders...
So you have the same number of cylinders as you have tracks, but the amount >of data depends on number of platters (and therefore tracks) there are.
Okay... that's what I'd come up with. If the width of the wall of an empty can was the width of a track, the can, without top or bottom, is a bit like a cylinder on a HDD, except that the cylinder on a HDD is sliced into platters.
Which means you can address every sector individually by >cylinder+head+sector (CHS addressing). Snag is, the original bios runs out of space for this at 504MB - 63 sectors, 1024 cylinders, 16 heads. 16 heads because that's all the technology at the time could handle... but there were enough bits in the system to handle 255 heads. And that would give 8.4GB...
"..enough bits in the system.."? By 'the system', are you referring to the OS? I'm a bit fuzzy on just what the system is, and how it's capable of handling 255 heads. Do you mean the 'system' of physical parts inside a HDD?
So, they invented LBA addressing - logical block addressing. Each sector has its own address, as above, and it's still related to its position on the disc(s) but now there's a logical translation built into the system. The bios assumes that the disk has the full 255 heads, because that's what the disc tells it at boot time.
So since a single platter can hold far more data that it could 5-10 years ago, LBA is probably dividing the platter into areas, and calling them head 1, head 2, head 3... etc.. Yes?
The disc lies in its teeth. It's probably only got two or four heads. It possibly (probably) has different numbers of sectors in tracks at the outside of the disk from the centre (where the data is packed tighter). It doesn't matter. The disc electronics know how to translate the LBA that the bios has asked for into the physical position of the sector on the disc.
Is that 'space' in BIOS, or on a HDD? It seems it's a limitation of the 'space' BIOS has allotted to deal with HDD design.
Yup. The disc can report that it has (say) 5000 of these logical 255 head >deep cylinders, but the bios call can't ask for more than 1023 of them.
Okay... so now we're talking about LBA here, and its being limited to being able to deal with a 8.4GB HDD. Yes?
So 1st there was a limitation of 16 heads to begin with for the original CHS system, then a limitation of 1023 cylinders.
What then is the current mode of recognizing the architecture of current > 8.4MB HDDs referred to as?
Bugger. Once you've booted into your OS, you can tell the disc to understand any sort of data that you throw at it; but until you do something like that, you can only ask for cylinders up to 1023.
>I wonder if PM has used *actual* cylinders instead of logical. >If it's mapped with logical cylinders, the the boundary will be at 1024 > and each cylinder will have 8.4GB/1024 = approx 8MB each; the total > number of cylinders will be about 5000.
You're saying there an 'actual' physical number of cylinders, and a
different value for 'logical' (read: not 'actual) cylinders? PM actualy
marks the 8.4MB barrier on its GUI, and reports that spot as cylinder 1024.
So PM is returning the logical address using 255 head cylinders. Physically, the sector could be anywhere; it doesn't matter. The beast is translating things under the hood. But there are probably thousands and thousands of physical cylinders, and about five thousand logical cylinders.
Thousands because of just how tiny the width of the tracks on a platter has become I guess.
Have I made sense?
Yeah... pretty much. I'm still a bit fuzzy on the 'system' thing above.
But I'm still wondering whether or not it would be possible to calculate exactly which cylinder a specific sector resides on.
You said above that for the LBA system, "Each sector has its own address, as above, and it's still related to its position on the disc(s)" If so, it would seem that if the number of the sector is known, then the cylinder number and head number where that sector exists should be able to be determined.
Well... you guys have always been paying more for gas than us guzzling
Americans... so prices are probably an even bigger deal there. Did you say you had a motorcycle at one point?
Nah, considered it, but never got around to doing it. Gas prices here, adjusting for size of gallon, are about five and a half dollars a gallon...
Aacckk... That's about the same ration as what I saw in Holland a number of year back. For around town, I'm seriously thinking of getting a little 50cc bike like the 1st one I ever owned. It got 150 MPG!
Matt
_________________________________________________________________
Fretting that your Hotmail account may expire because you forgot to sign in enough? Get Hotmail Extra Storage today! http://join.msn.com/?PAGE=features/es
************************************************************** http://libretto.basiclink.com - Libretto mailing list http://www.silverace.com/libretto/ - Archives
-------TO UNSUBSCRIBE-------
Reply to any of the list messages. The reply mail should be
addressed to: [EMAIL PROTECTED] - Then replace any text
on the message's subject line: cmd:unsubscribe
--------TO UNSUBSCRIBE DIGEST------
Do above but with this on subject line: cmd:unsubscribe digest
**************************************************************