Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!ucbvax!agate!bionet!csd4.milw.wisc.edu!mailrus!cornell!uw-beaver!fluke!ssc-vax!cxsea!blm From: blm@cxsea.UUCP (Brian Matthews) Newsgroups: comp.sys.mac Subject: Re: Virtual Memory INIT Message-ID: <2598@cxsea.UUCP> Date: 19 Jan 89 22:08:27 GMT References: <8901151644.AA17944@Portia.stanford.edu> <870@mailrus.cc.umich.edu> Reply-To: blm@cxsea.UUCP (Brian Matthews) Organization: Computer X Inc. Lines: 40 Shane Looker (shane@chablis.cc.umich.edu) writes: |In article <8901151644.AA17944@Portia.stanford.edu> name@PORTIA.STANFORD.EDU (tony cooper) writes: |> What would you do with all that |>much memory? I guess you could use it as a RAM disk!?! | |I sure hope you are joking about this... I don't know if Tony was joking or not, but I would certainly consider using the extra memory as a RAM disk. In fact, I have a paged RAM disk on my Unix machine. Why is this not as silly as it sounds? Because an application usually doesn't use all of your physical memory, you generally only use a small part of the RAM disk (within a small amount of time, you may fill the thing up eventually), and even if the application is using all of physical memory (or more), it isn't touching all of those pages very often. Say that you have 2 Meg of physical memory, and the application you happen to be running only uses 1.5 Meg. Then you've got .5 Meg for the RAM disk to be paged into, even if the application is touching all of its memory. Maybe 1 Meg of the applications memory can be paged out. Unless you're dealing with some large files, chances are your data will fit in the 1.5 Meg, and run at RAM disk speed. If the application snarfs some more memory, the least recently used pages of the RAM disk will get paged out. In the worst case, when the application grows larger than physical memory, the RAM disk will work like a normal drive. But even in this case, the chances are pretty high that some pages owned by the application aren't being touched, and will get paged out for the RAM disk. Basically the RAM disk gives you a cache that uses whatever unused memory is available, and in the worst case acts like a normal disk drive. And consider that this worst case only happens when the application owns more memory than is available in physical memory, and is touching all of these pages fairly often. A paged RAM disk can be a smart way to go. -- Brian L. Matthews blm@cxsea.UUCP ...{mnetor,uw-beaver!ssc-vax}!cxsea!blm +1 206 251 6811 Computer X Inc. - a division of Motorola New Enterprises