Re: Newbie question about "cons"?



Tim Bradshaw <tfb+google@xxxxxxxx> writes:

On Jul 8, 12:47 pm, Rainer Joswig <jos...@xxxxxxx> wrote:


It also improves locality. Which is very important in
a virtual memory based system with much more disk memory
than RAM. With modern processors and a hierarchy of
memory (1st-3rd level caches, RAM, disk caches, ...)
it still might have a little use. Though I haven't
seen anybody using it lately...

I don't think the idea of a VM system as being a way of using cheap,
abundant disk as a way of making it look like there's more memory than
there is is really very interesting now -

Did this ever actually work? I think the story goes
something like this:

Think of a machine with several interactive users.

If you don't have virtual memory you have to swap whole
programs in and out. Imagine you have 10MB of RAM and a
typical program takes 2MB. You can comfortably support 5
users. More than that and you use the disk and performance
goes downhill very fast.

If you do have VM and the typical program has a 1/2 MB
working set you can support 20 users. What makes this go is
that the programs remain in their working sets. The other 1 1/2
MB is barely used. If program strays outside its working set
the machine has to go to disk and takes an enourmous
performance hit.

So VM was a very important technology. It made machines 4
times as powerful but not much more expensive. However it
was mostly about not swapping totally unused stuff in and
out when you changed users. Disk was still too slow for
virtual memory to be useful with bits that you actually
used.

I think this is relevant to the history of Lisp. Purchasers
of AI workstations thought of VM as magic that let them run
a 3MB expert system written in Lisp on a 2MB work
station. The performance gap between disk and RAM is just
too big. Any program that makes non-trivial use of pages
outside the working set is just too slow, and Lisp got the
blame when the culprit was Virtual Memory Mysticism.

I never studied this stuff and I think that it was mostly
before my time, so I might be getting it horribly wrong, but
my claim is that VM worked because there was a lot of "never
used" code that real memory systems used to swap when
changing users.

Alan Crowe
Edinburgh
Scotland
.



Relevant Pages

  • Re: file access via read/write vs mmap() interface
    ... Memory] can't support any file access with mmap() whose size is more ... using any virtual memory and you are not using any RAM, ... pool is allocated and the disk page loaded into the RAM. ...
    (comp.unix.programmer)
  • Re: Madly OT: Laptop Ram question
    ... Specs are: PIII 1200, 384mb RAM, ... Disk fragmentation -- when did you last defrag the disk? ... Virtual memory -- how much have you got, is it fixed or do you let XP ... and knoppix is based on debian -- you should be able to boot ...
    (uk.rec.motorcycles)
  • Re: Garbage collection, threads and GUIs.
    ... > backing virtual RAM on disk. ... There are three kinds of resources we might be concerned with here: RAM, ... Address space refers to the number of virtual memory locations available ... because the operating system ...
    (comp.lang.java.help)
  • Re: SortMerge avoids thrashing (was: Baileys "two pass" FFT algorithm question)
    ... OK, the first question is whether you did it entire in actual RAM, ... using disk, or what? ... how much virtual memory you are allowed, and how many disk or tape ... drives you have available for merge runs. ...
    (comp.programming)
  • Re: Code density and performance?
    ... programs for better virtual memory characteristics. ... 370 was initially announced with only real storage. ... packing in small real storage configurations. ... size was more than offset by the overhead of the smaller disk transfer ...
    (comp.arch)