Studying for the A+, Network+ or Security+ exams? Get over 2,600 pages of FREE study guides at CertiGuide.com!|
Join the PC homebuilding revolution! Read the all-new, FREE 200-page online guide: How to Build Your Own PC!
NOTE: Using robot software to mass-download the site degrades the server and is prohibited. See here for more.
Find The PC Guide helpful? Please consider a donation to The PC Guide Tip Jar. Visa/MC/Paypal accepted.
|Take a virtual vacation any time at DesktopScenes.com - view my art photos online for FREE in either Flash or HTML!|
Tired of the boss? Ever wanted to be an independent freelancer? Not sure how to get started?
The all-new Online Freelancing Guide can help. Tons of useful info, and it's free! Join the online freelancing revolution today.
Logical Block Addressing (LBA)
Regular addressing of IDE/ATA drives is done by specifying a cylinder, head and sector address where the data that is required resides. Extended CHS addressing adds a translation step that changes the way the geometry appears in order to break the 504 MiB barrier, but the addressing is still done in terms of cylinder, head and sector numbers (they are just translated one or more times before they get to the actual disk itself).
In contrast, logical block addressing or LBA involves a totally new way of addressing sectors. Instead of referring to a cylinder, head and sector number, each sector is instead assigned a unique "sector number". In essence, the sectors are numbered 0, 1, 2, etc. up to (N-1), where N is the number of sectors on the disk. An analogy would be as follows. Your address (assuming you live in the U.S. and have a regular address) is composed of a street number, street name, city name and state name. This is similar to how conventional CHS addressing works. Instead however, let's say that every house in the U.S. were given a unique identifying number. This would be more how LBA works.
In order for LBA to work, it must be supported by the BIOS and operating system, but since it is also a new way of talking to the hard disk, the disk must support it as well. All newer hard disks do in fact support LBA, and when autodetected by a BIOS supporting LBA, will be set up to use that mode.
A drive using LBA is not subject to the 504 MiB disk size barrier, however there has been a great deal of confusion regarding LBA and what it does. In particular, a lot of people think that it is the LBA addressing that "gets around the 504 MiB barrier". Strictly speaking, this is inaccurate. It isn't the LBA that is getting around the barrier, because LBA is just a different way of addressing the same geometry; if you were still limited to 1,024 cylinders, 16 heads and 63 sectors, you would still have logical sectors numbered 0, 1, 2, etc. up to 1,032,191, and you would still be stuck with 504 MiB.
The reason that setting a drive's mode to LBA will get around the 504 MiB barrier is that in virtually every case, LBA mode automatically enables geometry translation as well. This translation is still required because the software calling the BIOS Int 13h routines knows nothing about LBA. It is the translation that is what really gets around the barrier, but of course all of this happens transparently to the user.
When LBA is turned on, the BIOS will enable geometry translation. This translation may be done in the same way that it is done in Extended CHS or large mode, or it may be done using a different algorithm called LBA-assist translation. The translated geometry is still what is presented to the operating system for use in Int 13h calls. The difference between LBA and ECHS is that when using ECHS the BIOS translates the parameters used by these calls from the translated geometry to the drive's logical geometry. With LBA, it translates from the translated geometry directly into a logical block (sector) number.
LBA has in recent years become the dominant form of hard disk addressing. Since the 8.4 GB limit of the Int13h interface was reached, it became impossible to express the geometry of large hard disks using cylinder, head and sector numbers, translated or not, while remaining below the Int13h limits of 1,024 cylinders, 256 heads and 63 sectors. Therefore, modern drives are no longer specified in terms of classical geometry, but rather in terms of their total number of user data sectors and addressed using LBA. See here for more on this.