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 15Later on, ProDOS arranged sectors in this order:
0 8 1 9 2 10 3 11 4 12 5 13 6 14 7 15When 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:
“They say all lovers swear more performance than they are able, and yet reserve an ability that they never perform; vowing more than the perfection of ten, and discharging less than the tenth part of one.”
—William Shakespeare (15641616)
“... these great improvements of modern times are blessings or curses on us, just in the same ratio as the mental, moral, and religious rule over the animal; or the animal propensities of our nature predominate over the intellectual and moral. The spider elaborates poison from the same flower, in which the bee finds materials out of which she manufactures honey.”
—Harriot K. Hunt (18051875)
“The assumption must be that those who can see value only in tradition, or versions of it, deny mans ability to adapt to changing circumstances.”
—Stephen Bayley (b. 1951)