Got email a few days ago from Eric Smith who was trying to find something out about the old Western Digital Microengine. My first job out of college was working at WD on the Microengine (1981-1982).
One of my tasks while there was to write software for the new hard disk controller for the Microengine. The hard disk controller used the WD1000 chipset (the first ancestor to today’s IDE/ATA interfaces).
When I first got the driver working, my manager got excited and we marched around the building announcing this fact to lots of people I didn’t know. At the time I had no idea why he did this. This was my first job out of college. On reflection, this might have been one of the first proofs that the WD1000 chipset really worked.
I spent considerable time optimizing the code. The numbers are still burned into my brain:
- 3200 rpm disk rotation, or 53.3 per second
- 16 sectors per track (actually 17, one spare to allow for bad blocks).
- 512 bytes per sector (optimal combination for the then-current disks).
This meant there was 16*512*53.3 = 436906 bytes passing under the head every second. Once the hard disk controller had read a single sector into it’s buffer, the buffer had to be emptied before the next sector could be read. The time needed by the DMA controller was equivalent to just over 2 sectors passing under the head. Once DMA finished the software needed to reprogram both the hard disk and DMA controllers for the next sector. With all that I was pretty happy to get the interleave down to 5:1 (stable), and 4:1 (marginal). At the 4:1 interleave any sort of interruption would cause us to miss the sector and have to catch it on the next revolution, so we backed to 5:1 for consistent performance.
To get this level of performance I used a bit of a trick. While one sector was being read by the hardware, the software precomputed all the controller parameters for the next sector, and assembled the results into a record that could be block-assigned into the controller registers.
At 5:1 we are talking about ~87KB read/write per second. As long as the disk didn’t have to seek, we could swap half the 128KB memory to disk in less than a second. This lead to musing about swapping entire running applications to disk (~3 seconds to swap the entire memory).
When the hard disk controller came out for the IBM XT, it used a later WD chipset. By my standards (at the time) this was dream hardware. The controller did multi-sector IO! The DMA and CPU were faster! With that hardware I figured they might easily get a 2:1 or 3:1 interleave! I was shocked to find that the IBM XT shipped with a far worse interleave (9:1?) than I got with less capable hardware.
Right. Not that any of this is remotely relevant any more…