Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!samsung!uunet!sco!erics From: erics@sco.COM (eric smith) Newsgroups: comp.sys.mac.system Subject: Re: Virtual Memory Message-ID: <12383@scolex.sco.COM> Date: 1 Jun 91 17:21:18 GMT References: <1991May30.060108.5637@cs.yale.edu> Sender: news@sco.COM Distribution: usa Organization: The Santa Cruz Operation, Inc. Lines: 28 bitting-douglas@cs.yale.edu (Douglas Bitting) writes: >Virtual Memory, like many other things in an OS, can be implemented in many >ways. It all boils down to the design decision made by the OS programmers. >Basically, the trade off in implementing VM as Apple has is speed over disk >space. When the entire Virtual Memory space is mapped to a disk, the operating >system is assured that any page in memory that is clean (ie, unchanged since >read in from the disk) is on the disk somewhere. This means that when said >page is to be swapped out, it does not have to be written to the disk first. >This results in an *immense* speedup. Ah, but pages do have to be swapped out at some point if the data they contain has changed. I"m not running System 7.0 yet (soon though, I hope), so I haven't observed how Apple has implemented VM, but I assume they swap pages that have changed on some time interval and certainly when the page is swapped out. While having the entire contents of VM on disk may save some disk IO (because not every page's data changes), the savings will vary greatly depending on the type of applications running. I suspect that the main reason to have the entire VM on disk is to greatly simplify the page management algorithm and eliminate fragmentation of memory contents on disk. -------------------------------------------------------------------------- | Eric Steven Smith \ / How did the programmer die in | | Usenet: erics@sco.com \ / the shower? | | erics@netcom.com \ / By reading the instructions: | | CompuServe: 70262,3610 \ / Lather. Rinse. Repeat. | --------------------------------------------------------------------------