Stories
Slash Boxes
Comments

SoylentNews is people

posted by Fnord666 on Wednesday September 25 2019, @10:02AM   Printer-friendly
from the MS-what? dept.

Submitted via IRC for Bytram

How did MS-DOS decide that two seconds was the amount of time to keep the floppy disk cache valid?

MS-DOS 2.0 contained a disk read cache, but not a disk write cache. Disk read caches are important because they avoid having to re-read data from the disk. And you can invalidate the read cache when the volume is unmounted.

But wait, you don't unmount floppy drives. You just take them out.

IBM PC floppy disk drives of this era did not have lockable doors. You could open the drive door and yank the floppy disk at any time. The specification had provisions for reporting whether the floppy drive door was open, but IBM didn't implement that part of the specification because it saved them a NAND gate. Hardware vendors will do anything to save a penny.

[...] Mark Zbikowski led the MS-DOS 2.0 project, and he sat down with a stopwatch while Aaron Reynolds and Chris Peters tried to swap floppy disks on an IBM PC as fast as they could.

They couldn't do it under two seconds.

So the MS-DOS cache validity was set to two seconds. If two disk accesses occurred within two seconds of each other, the second one would assume that the cached values were still good.

I don't know if the modern two-second cache flush policy is a direct descendant of this original office competition, but I like to think there's some connection.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 5, Informative) by zocalo on Wednesday September 25 2019, @12:16PM (2 children)

    by zocalo (302) on Wednesday September 25 2019, @12:16PM (#898460)
    It's been a while, but my recollection is that the lever was also the mechanical means to bring the drive's stepper motor into contact with the disk and, in some cases, lower the drive heads close enough to the disk to actually read it (more advanced drives did this electro-mechanically), but either way if you didn't close the lever, then the disk physically could not be spun and the disk could not be read. The drive's state was determined by the completion of an electronic circuit when the heads were engaged (e.g. a pin going high on a given chip/relay), but not a sensor on the lever itself - "Drive not ready", because the *drive* heads were not in the correct position, not because of anything to do with the state of the disk. IIRC, if you closed the lever on an empty drive and tried to read the non-existent disk you'd get the "General Failure (Abort, Retry, Fail?)" message, unless some wag had taken a hex editor to the OS binaries, in which case you'd probably get some variation on "Abhor, Retch, Fuck?".
    --
    UNIX? They're not even circumcised! Savages!
    Starting Score:    1  point
    Moderation   +3  
       Interesting=1, Informative=2, Total=3
    Extra 'Informative' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   5  
  • (Score: 3, Interesting) by Rupert Pupnick on Wednesday September 25 2019, @01:09PM

    by Rupert Pupnick (7277) on Wednesday September 25 2019, @01:09PM (#898472) Journal

    This is my recollection, too. Closing the latch caused a spindle to push through a hole in the center of the floppy, probably along with some other mechanical stuff.

  • (Score: 2) by FatPhil on Wednesday September 25 2019, @03:38PM

    by FatPhil (863) <{pc-soylent} {at} {asdf.fi}> on Wednesday September 25 2019, @03:38PM (#898565) Homepage
    The mechanical answer makes sense. However, the difference in error messages would imply that there is a mechanism to detect between the lever being open and closed. It's just not asynchronous, so the OS can't know about it when it happens.

    To save costs, it could arguable that it might not be latched in the drive itself. So the article might be telling the truth about the lack of information flow about disk change to the OS, but for the wrong reason. Or it might still making a bit of a whiff - what do you make of INT13h AH=16h http://www.p-dd.com/chapter8-page36.html - that can't be done without both detecting and latching? Function 16h is one of DOS's low level disk I/O BIOS interrupt, that must have been there all the way back in the days of DOS 2.0.

    So the article is saying they didn't implement part of their own BIOS?

    It's still whiffing.
    --
    Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves