Apple DOS - Performance Improvements and Other Versions

Performance Improvements and Other Versions

DOS's RWTS could read or write a track in two revolutions with proper interleaving. A sector of the spinning disk would pass by under the read/write head while RWTS was decoding the just-read sector (or encoding the next one to be written), and if this missed sector was the next one needed, DOS would need to wait nearly an entire revolution of the disk for the sector to come around again. This was called "blowing a rev" and was a well-understood performance bottleneck in disk systems. To avoid this, the sectors on a DOS disk were arranged on the disk in this order:

0 7 14 6 13 5 12 4 11 3 10 2 9 1 8 15

Later on, ProDOS arranged sectors in this order:

0 8 1 9 2 10 3 11 4 12 5 13 6 14 7 15

When reading and decoding sector 0, then, sector 8 would pass by, so that sector 1, the next sector likely to be needed, would be available without waiting. When reading sector 7, two unneeded sectors, sectors 15 and 0, would pass by before sector 8 was available, and when reading sector 15, the drive would always have to wait a revolution for sector 0 on the same track. However, the sector 0 actually needed in most cases would be on the next higher track, and that track could be arranged relative to the last one to allow the needed time to decode the just-read sector and move the head before sector 0 came around. On average, a full track could be read in two revolutions of the disk.

Unfortunately, the DOS file manager ruined this efficiency by copying bytes read from or written to a file one at a time between the RWTS buffer and main memory, requiring more time and resulting in DOS constantly blowing revs when reading or writing files. Programs became available early on to format disks with modified interleaves; these disks gave DOS more time between sectors to copy the data, ameliorating the problem. Later, programmers rewrote the file manager routines to avoid making the extra copy for most sectors of a file; RWTS was instructed to read or write sectors directly to or from main memory rather than a buffer when at least a full sector was to be transferred. Speedups in the LOAD command of three to five times were typical.

This functionality soon appeared in commercial products, such as Pronto-DOS, Diversi-DOS, and David-DOS, along with additional features, but was never used in an official Apple DOS release. Similar functionality was, however, employed by Apple's successor operating system, ProDOS. The Apple IIGS operating system, GS/OS, would eventually employ an even more efficient "scatter read" technique that would read any sector that happened to be passing under the read head if it was needed for the file being read.

Read more about this topic:  Apple DOS

Famous quotes containing the words performance, improvements and/or versions:

    The audience is the most revered member of the theater. Without an audience there is no theater. Every technique learned by the actor, every curtain, every flat on the stage, every careful analysis by the director, every coordinated scene, is for the enjoyment of the audience. They are our guests, our evaluators, and the last spoke in the wheel which can then begin to roll. They make the performance meaningful.
    Viola Spolin (b. 1911)

    I was interested to see how a pioneer lived on this side of the country. His life is in some respects more adventurous than that of his brother in the West; for he contends with winter as well as the wilderness, and there is a greater interval of time at least between him and the army which is to follow. Here immigration is a tide which may ebb when it has swept away the pines; there it is not a tide, but an inundation, and roads and other improvements come steadily rushing after.
    Henry David Thoreau (1817–1862)

    The assumption must be that those who can see value only in tradition, or versions of it, deny man’s ability to adapt to changing circumstances.
    Stephen Bayley (b. 1951)