Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL

Part Four > Disk Swapper's ElbowJanuary 1984 - Pg. 211

Disk Swapper's Elbow January 1984 A last-minute bug causes some problems One of the more common afflictions of early Macintosh users was the dreaded "Disk Swapper's Elbow," which was caused by a disk-copying operation run amok. Disk swapping was a necessary evil caused by having 400 KB floppy disks, 128 KB of RAM, and a single floppy drive. If a user wanted to make a backup of a disk, she had to eject the source disk, insert a blank one, format it, and then drag the source disk over the new disk. The Finder would then copy data piece by piece with the necessary swapping. A typical application on a 128K Mac had about 85K of memory available; the rest was used by the system, mostly for the bitmap display. A simple calculation shows that copying a 400K disk should have involved about 5 or 6 swaps. Five disk swaps was barely tolerable. However, as early Finder users will remember, it would occasionally take well over 20 disk swaps. You'd start a disk copy and hold your breath during the fifth, and hopefully, final swap. If the Mac dutifully disgorged the floppy the sixth time, you'd convince yourself you miscounted, cross your fingers, and hope for the best. By the seventh swap you started cursing because you knew you were trapped and you started wondering about investing in an external drive. Even though the whole Finder was only 46K of code and had about 10K of overhead, the remaining 30K of memory space was too small for practical copying. So, I had to break up the code into two chunks: the bare minimum for copying and all the rest. Then, I had to carefully flush out all data that was cached in memory, preload the small disk- copying chunk of code, and coalesce the balance of RAM. Usually, the Finder ended up with 75K of free memory and things worked as planned. But, sometimes the system would mysteriously reload the larger chunk of the Finder code, fragment the free memory, and cause another case of Disk Swapper's Elbow. It took me a long time to figure out what happened because we had rarely seen this in testing. There were a few bug reports of this problem that were never reproducible. The bug reports went like this: "Copied a disk, it took 20+ swaps! Tried a second time, it was fine." The reason this was not reproducible was because we were all expert mouse users and usually skipped the crucial misstep. When anybody first starts using a mouse, dragging is one of the more difficult things to do. It's actually quite awkward to click down, move the mouse while holding down the button, and then release. Beginners very contributed by Steve Capps Part4 1983 to 1984 211