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: 2) by FatPhil on Wednesday September 25 2019, @10:58AM (14 children)

    by FatPhil (863) <{pc-soylent} {at} {asdf.fi}> on Wednesday September 25 2019, @10:58AM (#898439) Homepage
    "You could open the drive door and yank the floppy disk at any time."

    *If* there was no sensor on the drive's door or lever, then why would you even close the drive door or turn the lever for either the first or second disks? I'm pretty sure I could yank out and replace a floppy, not bothering with the lever at all, in under half a second. Are MS employees all suffering from some debilitating palsy, or something?

    And what was the "drive not ready" error message all about, if there was no sensor on the door/lever? I'm pretty sure failure to close same was one of the descriptions of the error message.

    This sounds like ill-remembered memories or hearsay to me.

    You'll be telling me Captain Billopp raced around Staten Island in less than 24 hours to secure it for New York in a dispute with New Jersey next.
    --
    Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves
    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 2) by SomeGuy on Wednesday September 25 2019, @11:46AM (9 children)

    by SomeGuy (5632) on Wednesday September 25 2019, @11:46AM (#898449)

    I'm pretty sure I could yank out and replace a floppy, not bothering with the lever at all, in under half a second.

    Try that with a full height Tandon drive, like most people had in the DOS 1 and early DOS 2 days, and see how fast you break the door latch off.

    If PC drives had an auto lock back then, people would have been bitching they could not remove the disks when the DOS software crashed or took control away from the system (like many games).

    • (Score: 2) by FatPhil on Wednesday September 25 2019, @12:02PM (8 children)

      by FatPhil (863) <{pc-soylent} {at} {asdf.fi}> on Wednesday September 25 2019, @12:02PM (#898453) Homepage
      Why would I even touch the door latch?
      --
      Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves
      • (Score: 5, Insightful) by RS3 on Wednesday September 25 2019, @01:52PM (7 children)

        by RS3 (6367) on Wednesday September 25 2019, @01:52PM (#898483)

        I think you're completely missing the point: the original floppies being referred to were 5.25", and you must close the latch, on every 5.25" floppy drive I've ever seen, to 1) engage the hub motor so that the motor can turn the disk, and 2) engage the heads with the disk so that you can read / write data.

        Newer 3.5" floppies have a spring-loaded mechanism that does those 2 functions when you push the disk all the way in. But 3.5" floppies didn't exist (that I know of) when the IBM PC was being developed in the late 70s into early 80s. Nor did a similar auto-engage mechanism for 5.25", but might have in later drives.

        • (Score: 3, Funny) by All Your Lawn Are Belong To Us on Wednesday September 25 2019, @02:07PM (6 children)

          by All Your Lawn Are Belong To Us (6553) on Wednesday September 25 2019, @02:07PM (#898494) Journal

          And with the advent of the 3.5" 'hard floppy' thusly, "where the hell Clippy's corpse so I can force-eject that disk?" was born.

          --
          This sig for rent.
          • (Score: 2) by RS3 on Wednesday September 25 2019, @02:27PM (5 children)

            by RS3 (6367) on Wednesday September 25 2019, @02:27PM (#898507)

            That and little punches to make a 720K into a 1.44M. I would always run extensive media tests before trusting them, but it always worked. Marketing people...

            • (Score: 2) by All Your Lawn Are Belong To Us on Wednesday September 25 2019, @04:46PM (4 children)

              by All Your Lawn Are Belong To Us (6553) on Wednesday September 25 2019, @04:46PM (#898613) Journal

              Oh yeah! I remember the doing similar to single sided 5 1/4" disks (Verbatims maybe or I could be misremembering) to use with the TRS-80 Model III - one could then flip them and have two disks for one. I think I took a hole punch to the opposite side of the sync holes (top and bottom) and snipped a write-protect on the side. Had to be careful bowing out the centers to both not cause kinks in the surface and not touch the disc surface with the punch.

              --
              This sig for rent.
              • (Score: 3, Interesting) by RS3 on Thursday September 26 2019, @02:38AM (2 children)

                by RS3 (6367) on Thursday September 26 2019, @02:38AM (#898908)

                Good for you! And you're bringing back very dusty memories. I probably used some single-sided floppies in the '80s, but I never owned one. First one was DSDD, then I jumped into 1.44M, bypassing 1.2M 5.25". But I ended up having to buy a 5.25" HD drive because I had Xenix on 5.25" floppy. I'm pretty sure I copied them to 3.5" right away, but Linux came along, and CDROM, and that was that.

                • (Score: 3, Interesting) by All Your Lawn Are Belong To Us on Thursday September 26 2019, @02:29PM (1 child)

                  by All Your Lawn Are Belong To Us (6553) on Thursday September 26 2019, @02:29PM (#899111) Journal

                  Actually I started out on cassette tape, then upgraded to drives within a year or so and IIRC they were around 100K per disk. Then Seagate drives (darn if I remember the spec, though... could they have been DS?) IIRC our family's first IBM compatible (Commodore Colt) was also 5 1/4 drives-only. I had a Model 100 TRS-80 and later a 1400FD laptop that were on 3.5" (the 100 was a plug in accessory drive that used 4 AA's). Then I bought my first IBM laptop which both had color and a hard drive, on Windows 3.1 - think that was around 1994?

                  --
                  This sig for rent.
                  • (Score: 2) by RS3 on Friday September 27 2019, @01:35AM

                    by RS3 (6367) on Friday September 27 2019, @01:35AM (#899371)

                    Computer history museum embodied you are!

                    Technically I used cassette tape first too- on a Kim-1, but I rarely messed with that.

                    Early 80s I had a job where they had 2 CPM machines- an Osborne 1 with dual floppies, which I loved, and some other machine that was much cooler- big screen, dual Z80s, I think it had dual floppies, or maybe a 5.25 and an 8". IIRC I mostly used it for RS232 stuff and wrote simple BASIC (to do RS232 stuff.) Wish I could remember the name. Molded fiberglass housing, very 2001 Space Odyssey looking thing. I think I had figured it out once and bookmarked it... somewhere...

                    I never had a TRS-80. Somewhere I have a Commodore 64 and floppy drive (iirc...) but never used it- had PCs by the time I got that.

                    I never heard of a Commodore Colt. Sad what happened to Commodore. They coulda been a contender. That's it- the Commodore Contender! That would have sold millions.

              • (Score: 3, Interesting) by dry on Thursday September 26 2019, @05:13AM

                by dry (223) on Thursday September 26 2019, @05:13AM (#898950) Journal

                Used to do similar with Apple II floppies except it was only the write protect hole that needed punching. You could pick up a plastic punch pretty cheap to make the square hole or carefully use a regular punch.

  • (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!
    • (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
  • (Score: 3, Informative) by hwertz on Wednesday September 25 2019, @04:54PM

    by hwertz (8141) on Wednesday September 25 2019, @04:54PM (#898618)

    "*If* there was no sensor on the drive's door or lever, then why would you even close the drive door or turn the lever for either the first or second disks?"

    Don't know if you're joking or not.. so, 3.5" floppies have a rigid outer shell, then a magnetic disk inside the shell. The 5.25" (and 8", which I never used) use a floppy outside shell (thus the term floppy) and the magnetic disk inside that. If you put a 5.25" disk inside the drive, it's just kind of sitting in there, the motor that spins up the disk and read/write head aren't "clamped" onto the disk until you turn that lever. Since the outside of the disk is not particularly solid, you would not be able to use a spring loaded mechanism like 3.5" floppy drives do.