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: 3, Informative) by DannyB on Monday September 30 2019, @03:30PM

    by DannyB (5839) Subscriber Badge on Monday September 30 2019, @03:30PM (#900817) Journal

    A bit more about MPW.

    On a command line you could of course use file names, much like you would in Bash on Linux.

    Text files in MPW would remember their "selection". That is, if you selected a range of text, then saved the file; when you re-opened that file later, it would still have that range of text selected.

    Now, on a command, if you referred to a named pathname of a file, and suffixed that with .S (eg, dot S), but the S wasn't really the letter S, but some other squiggly unicode character. (But before unicode) This syntax didn't refer to the text within the named file, but rather to the selected text within the file. So, suppose I used I/O redirection to redirect Std In, Std Out or Std Err to/from some file name with the ".S" suffix, it redirected into our out of the selected text. When writing to the selected text, the text selection range would collapse into zero characters, and then expand with the written characters replacing what was the selection. This inserted what was written into the space occupied by the selection. I hope that made sense. It was very cool.

    Example: I have a large file of text. I select one line (or indeed only one character, such as a space). Save the file. Now use a command like:

    foobar > myfile.S

    Then the single line or space selected in myfile expands and grows to however much text the foobar command generates. Got that? When I later open 'myfile', that single selected space character is now a large amount of selected text, but all other text within the file, both before and after the selection remains fully intact.

    And remember a C or Pascal program would just read/write to Std IO/Err. No magic within your program. MPW trapped the I/O operations of command programs and implemented this magic.

    It was also handy to write MPW commands in source code comments. You could be reading a Pascal program, then within a comment, select an MPW command and hit Ctrl-Enter to execute it. It's StdOut would be written right into the comment of your code, after the command you had selected. This is very different than using a "terminal" type interface. But you could just type commands and hit Ctrl-Enter like using a TTY. Thing is, since it's all in a text file, you just hit File->Save to save your "history". In fact, you could have as many text files as you want with commands or templates of commands. So to use the "command line" you simply open (or create a new scratch) text file and start typing, using Ctrl-Enter to execute.

    And of course you could write powerful scripts in MPW's bash-like sorta language. With utilities like compilers, make, link, rez, and generate an application.

    --
    The anti vax hysteria didn't stop, it just died down.
    Starting Score:    1  point
    Moderation   +1  
       Informative=1, Total=1
    Extra 'Informative' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   3