13

There is some information about the CHS (Cylinder/Head/Sector) addressing system and its design flaws and limits. As long as CHS was not compatible with Zone Bit Recording, which became very popular in consumer HDDs since 1990s, it was finally replaced with LBA (Logical block addressing).

But I wasn't able to find any info about the CHS early days. In fact ZBR was first used in industrial HDDs back in 1961 (Bryant Series 4000), therefore, the first collision between CHS and ZBR must have been happened much earlier.

So the question is how the blocks of data were really addressed in old HDDs? Did they make use of CHS or some other system?

13
  • It was cylinder, head and sector. I used to repair the floppy and hard disks and realign the heads as my part time job while attending university.
    – Rohit Gupta
    Dec 28, 2022 at 8:35
  • 1
    To make this worthwhile you may want to add what you consider 'old HDD' - and maybe why you assume that CHS does not go along with Zoned Recording.
    – Raffzahn
    Dec 28, 2022 at 9:20
  • 1
    @Raffzahn under 'old HDD' I generally consider industrial HDDs that were manufactured between 1956 and early 1990s. As far as I can see, CHS and ZBR may be compatible only if disk controller intentionally provides fake information about disk geometry to the operating system. It's not very convenient and I'm not ever sure if it was possible before the controllers moved from the computer's backplane into the disk itself (it looks like it happened in 1980s after ST-406). Dec 28, 2022 at 9:30
  • 3
    Why it would be the job of disk controller to fake the geometry, instead of operating system? For example C64 floppies have varying amount of sectors and the DOS in the floppy drive just handles it so C64 does not have to know about it.
    – Justme
    Dec 28, 2022 at 10:12
  • 1
    Before it? Tape. Dec 29, 2022 at 9:31

4 Answers 4

26

It seems the question is mixing up physical disk access (CHS) with a logical access scheme used at a higher level. LBA is and always has been an issue at the OS level. The fact that some disk controllers also present their storage in an abstract fashion does not change how a disk works, it only relieves the OS (or better, its low-level drivers) from handling that abstraction.


When was the CHS (cylinder - head - sector) system invented

With the very first disk and before that on drum drives (*1,2).

and what was before it?

No drive?

All disk type data storage (*3) needs to position to a cylinder and select a head to read a certain sector when it passes by. There is no other way.

As long as CHS was not compatible with Zone Bit Recording,

Err, why? CHS and ZBR go quite well together. There is no 'collision' of any kind. With or without ZBR, data on a disk is accessed by positioning to a cylinder, selecting a head and reading a certain sector when passing by.

it was finally replaced with LBA.

LBA is, on a disk still based on CHS. After all, each and every disk still has to position to a cylinder, select a head and read a certain sector passing by this head.


(From a comment)

As far as I can see, CHS and ZBR may be compatible only if the disk controller intentionally provides fake information about disk geometry to the operating system.

Not sure what fake geometry that should be. It's no dark magic for an OS to consider that tracks 1..39 have a different number of sectors than tracks 40..79, or is it?

It's not very convenient and I'm not ever sure if it was possible before the controllers moved from the computer's backplane into the disk itself

First, the controller would have to move into the computer, wouldn't it? For classic mainframes, the controller was never part of the computer but an external storage device attached via an I/O channel and addressed as controller/drive/CHS.

(it looks like it happened in 1980s after ST-406).

Not really. For one, since it's an abstraction layer it's about the OS/driver or OS/controller interface, so different driver architectures as well as different controller interfaces provided LBA addressing at different times. For example, SCSI (SASI) was LBA based from the very beginning. Much like some mainframe systems.


But the PC...

Despite asking in a generic way and for early technology, the question does seem to be more or less inspired by the IBM-PC. But that machine is an odd branch in disk development. Or more exactly, how compatibility was handled by add-on developers squeezing out more of a given interface.

The original ROM-BIOS API offers disk access via addressing of 10-8-6 bits for C/H/S. It does not feature any restriction of having the same number of sectors over all cylinders (or head for that matter), thus ZBR is quite possible with that arrangement.

Unrelated to that, disks grew bigger, eventually reaching more than 1024 cylinders (or 64 sectors) in the late 1980s. Thus a way was needed to integrate them. For DOS this was essentially a non-issue, as DOS used already its version of LBA when requesting a device driver action. It would have been up to the disk (or better controller) manufacturer to offer disk drivers that handle those disks - much like SCSI and others did.

Except disk controller manufacturers tried to outsmart DOS by lying at the BIOS API level, presenting the disk in different configurations by flunking bits around. A disk with 1200 cylinders and 4 heads was presented at the API level as one having only 600 cylinders but 8 heads instead. Doing so allowed to slip such drives below DOS without providing drivers. Quite a bad solution from an engineering point of view, but providing a plug&play feature seriously supporting sales.

Even worse, when IDE came in the mid-1980s - usually quoted as integrating the controller onto the disk - this was not just made on a BIOS API level, but on hardware, register interface, cementing it even further.

At some point, a bit of bit magic wasn't enough anymore and controller manufacturers switched to complete fantasy CHS numbers and called them LBA. The ATA standard (ca. 1994) formalized this. All still using the original 22 bits. When that no longer was sufficient (disks growing past 2 GiB), interfaces were tweaked again, but this time in conjunction with changed BIOSes and changed disk drivers.

Bottom line: CHS/LBA on the PC is kludgery very specific to the PC. It bears its very own history and is not related to any other system or historical development.


*1 - Except that drums are only a single cylinder, thus no cylinder selection is needed.

*2 - This includes of course drums used as main memory.

*3 - Let's ignore the special case of CDs and floppies like the Sony/Canon 2" VideoFloppy with their spiral tracks.

10
  • CHS tweaking was more than just for sales and PnP, it was also the only way to boot off of large non-IDE fixed disks. (Maybe that's what you meant by PnP?)
    – Jim Nelson
    Dec 28, 2022 at 17:59
  • 1
    BTW, do you have any idea why the BIOS would have ever needed to care about how many tracks/heads/sectors a drive has, or why DOS couldn't simply store that information in the first sector of the first track? Formatting a disk would require entering its size, but since in the early days it also required entering a list of bad tracks, that wouldn't have been a significant added burden.
    – supercat
    Dec 28, 2022 at 19:44
  • 1
    @supercat BIOS is part of the disk controller hardware. It wasn't intended to be long lived past its own hardware. The format is what that drives needed.
    – Raffzahn
    Dec 29, 2022 at 0:04
  • @Raffzahn: The AT BIOS needed to be told about the geometry of attached drives, and store this information in battery-backed CMOS. My question is why the information couldn't simply be stored at a location that was guaranteed to exist on all drives.
    – supercat
    Dec 29, 2022 at 1:22
  • 1
    @Raffzahn: Reading track 0 head 0 sector 1 wouldn't require knowing anything about a drive's geometry, so a controller that fetched geometry information from that location would be able to operate with any size of drive without difficulty.
    – supercat
    Dec 30, 2022 at 20:59
15

The cylinder number determines the position the read-write head write must move to, the head number determines which of the multiple read-write heads the disk drive should use, and the sector number determines when the drive can start reading or writing, after comparing the sector header information with that number.

So that is the natural scheme to address anything on a hard disk (or a floppy). It is actually compatible with zone bit recording, as long as it is known which cylinder ranges have a different angular speed and therefore a different number of sectors.

On the IBM PC, the BIOS didn't provide this information; it only provided the maximum number of sectors per cylinder; that's why on IBM PCs the CHS "adressing scheme" couldn't cope with zone bit recording.

Anything beyond using CHS requires a disk controller that is intelligent enough to do some kind of mapping. The earlier the harddrive, the more costly this kind of intelligence was, so it was avoided.

You can read up how early disk drives were used, documentation is available online. For example, the RL02 drive on the DEC PDP-11 (so we are talking roughly about 1980, before the IBM PC) shows in the manual on page 4-5 that there was a single register called disk address register which contained the difference between cylinders during a seek as well as the head number, and the sector number during a read or write.

So you can see how everything was geared toward keeping the controller simple; the OS had to keep track of the absolute cylinder number, and the OS had to load this register with the right information at the right time. So if you want, while based on CHS, it's even more primitive than CHS.

1
  • 2
    And the RL01/RL02 wasn't even an 'early' DEC disk; the multi-platter RP series devices had been used for over a decade, and the RL was a replacement for the venerable RK11/RK05. But RL is a good choice for answering the question, since relatively low cost was a design goal - as in the PC disk systems, which the OP seems mostly concerned with. Dec 29, 2022 at 10:00
6

So the question is how the blocks of data were really addressed in old HDDs? Did they make use of CHS or some other system?

They used cylinder number. Maybe also head number (i.e., disk platter number)? And then the disk controller read the disk looking for variable length records. They'd recognize the start - and maybe the end - of such records by special bit encodings.

There was frequently an "id" written to the first bytes of the record - it could have been sequential, and used as a "sector id", but it didn't have to be. It could be anything. Sometimes it was an actual "key". See for example "Count key data" and "History Of IBM CKD Controllers".

The ISAM Access Method supported by IBM OSes and programming languages was a database-precursor that directly addressed records on these disks by their key.

Well, you said really ... old HDDs.

1
  • Calling the sector address 'key' doesn't really change it :)) It may be useful that this is still possible with modern, single chip disk controllers. And if you insist, to count oddities, then there is of course also access for the whole track - with just a single "sector" per track. Also, for CKD details noone has to leave RC.SE :)) (Oh, and thanks for adding this - upvoted)
    – Raffzahn
    Dec 29, 2022 at 9:25
2

Q: When was the CHS (cylinder - head - sector) system invented . . .?

Patent 3,503,060 for a DIRECT ACCESS MAGNETIC DISC STORAGE DEVICE. Original Filed Dec. 24, 1954.

Q: . . . and what was before it?

Magnetic tape, punch cards, paper tape, etc.

About the IBM 350 Disk drive:

U.S. Patent 3,503,060 from the RAMAC program is generally considered to be the fundamental patent for disk drives. This first-ever disk drive was initially cancelled by the IBM Board of Directors because of its threat to the IBM punch card business but the IBM San Jose laboratory continued development until the project was approved by IBM's president.

From the Wikipedia article, Disk Sector:

The first disk drive, the 1957 IBM 350 disk storage, had ten 100 character sectors per track; each character was six bits and included a parity bit. The number of sectors per track was identical on all recording surfaces. There was no recorded identifier field (ID) associated with each sector.

The 1961 IBM 1301 disk storage introduced variable length sectors, termed records by IBM, and added to each record a record address field separate from the data in a record (sector). All modern disk drives have sector address fields, called ID fields, separate from the data in a sector.

5
  • You seem to miss drums here, don't you?
    – Raffzahn
    Dec 30, 2022 at 2:18
  • @Raffzahn - I had considered adding "drums", but wanted to emphasize the sequential access nature of most recording devices of the day.
    – Rick Smith
    Dec 30, 2022 at 2:24
  • @drums are as sequential as disks, aren't they? Also, the tape was only introduced after the drum.
    – Raffzahn
    Dec 30, 2022 at 3:35
  • @Raffzahn - I believe etc. covers drums and every other method of which I am not aware. The only reason I answered the Q at all was that I found the patent, which specifically answers the when part of the title Q -- something no other answer did.
    – Rick Smith
    Dec 30, 2022 at 4:09
  • All those solid-state choices. What about the unloved liquid memory?
    – HABO
    Dec 30, 2022 at 15:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .