From: bloc1469@ee.ee.uwm.edu (Gregory R Block)
Newsgroups: comp.sys.amiga.advocacy
Subject: Re: To VM or not to VM?
Date: 7 Jan 1993 21:22:38 GMT
Organization: Electrical Engineering Dept. University of Wisconsin - Milwaukee
NNTP-Posting-Host: 129.89.2.33

In article <C0H2x1.Hw8@rice.edu> abuhr@owlnet.rice.edu (Aaron M. Buhr) writes:
>     I had the impression from previous articles you had posted that you
>would prefer no VM whatsoever to having VM.  I would assert that GigaMem is

On my amiga, yes.  For those that want it, solutions exist.

>indeed VM, and according to your previous statements ("VM has no place in a
>real-time operating system") that any system using GigaMem would no longer
>be a real-time system.  Would you then agree that in some cases virtual
>memory is a more useful system function than real-time response (such as my
>previous example), given that (according to you) the two are mutually
>exclusive?  Would you also be willing to grant then that for many people,

ABSOLUTELY.  I'd be dumb, dumb, dumb to say that VM has no use.  I'd
change my name to Marc Barrett before I'd say that.  :)

>virtual memory would be useful more often than real-time response?

Well, see, I'm not sure on that one.  I'd say that yes, there are many
who care more about VM than they do getting things done in some
semblance of a snappy response, yes.  However, I believe that a good
operating system follows a philosophy.  VM and real-time really are on
opposite ends of the spectrum.

>     I submit my previous example as a case in which I would have gained no
>practical performance advantage, and certainly no productivity advantage,
>from having faster response from my telecommunications program.  If I had
>real-time performance in the telecomm package but was not able to decompress
>images in the background, I would have realized a performance penalty and
>a productivity penalty (performance measured in seconds to both job 
>completions, in that I would have had to have run them sequentially, rather
>than the decompression using processor cycles unused by the telecomm
>program).

Well, besides the fact that having more memory can never hurt... :)

Yes, yours would have beena productive use for VM, PERHAPS.  It may
have been a larger performance difference than you're willing to put
up with.  Let's say you want to decompress images in the background as
an example.  If the mere EXISTENCE of VM slows down your
telecommunication program (and we COULD be talking about a lot more
than a few seconds difference, depending on how many swaps were taking
place) to the point where IT is unusable, that is totally
unsatisfactory, and I would be more productive getting the job done
and over with quickly and getting back to work online.

Remember, while you're swapping, I'm pretty sure you can't process
interrupts.  :)  Time to drop characters, methinks, and that is ALSO
unacceptable, especially in downloads/uploads.  It's also unacceptable
all the way around for me.  I don't like the idea of having to hit
ctrl-l just to see the other half of the text.  :)

Again, this whole thing depends on just how much you're depending on
VM to let you get it done.  My argument still stands--theoretically,
you should have enough ram for your "working set".  I've got three meg
in the 2000 now, and more in the development system.  I use the 2000
for my telecommunications (mostly because I won't run Term on the
3000, but also because it's kind of nice this way--I'd like to just
ether the two together and use the 2000 as a workstation, but...), and
very rarely do I find I ever need to go to the 3000 to get things
done.  Though having VM would have been useful in the rare
circumstance on the 2000, it is NOT something I would wish to be
saddled with in those circumstances.  My 3000 needs it even less.

Again, we come across that "working set" theory.

>     For me, at least, the gains realized in such examples far outweigh
>any performance or productivity gains I would realize by having a window
>open 1/2 second faster, or by having an unused program become active
>2 seconds faster.  VM is consistently more useful and more productive
>for me than real-time response.  Given that (as far as I can tell from
>your arguments) VM and real-time response are mutually exclusive, I'll
>take VM.

I won't.  The idea of having the systems performace HALT for multiple
short periods of time which rises exponentially as the use of VM grows
doesn't crank my chain.  Perhaps it's impatience, but why buy
high-speed processors if you're going to have your productivity
flipped on and off like a directional?  I prefer to just get more
memory, and make more efficient use of the little processing power I
have.  After all, no matter how much processing power you have, it's
never enough.  Testimony to the Alpha.  :)

>     In cases where VM is not necessary, performance should be approximately
>the same whether VM is available or not.  In cases where VM is necessary, it

Not negligible, but very small.

>doesn't seem to me that the user will necessarily be able to predict memory
>usage patterns (as he would have to under GigaMem, i.e. "do I lock 600K for
>program A and give the rest to program B for swapping, or should I lock 400K
>for program A give that extra 200K to program B for swapping?") better than
>an automatic swapper.  For those that know memory usage patterns for their
>programs well enough, user-definable VM would be best.  However, I would

Well, that's NOT how it works.  As in all real-time OSes, or operating
systems that allow real-time tasks, you don't give your real-time
tasks VM.  With GigaMem, rather than defining your task as real-time,
you define it as non-real-time and give it VM.

>contend that those cases are the exception, and that for most people an
>automatic swapper would predict memory usage better than they could.  Thus,
>in most cases the automatic swapper would be a superior solution to the
>problem.

You simply set aside a (say) 10MB area as a swap area, and you tell
GigaMem which programs can use VM.  You don't say "Well, I think I'll
need 1.3M of mem for this operation, so I'll have GigaMem give it 1.4.
:)

Note:  I don't own GigaMem.

Greg


--
(: (: (: (: Have you overdosed on smileys today?  Why NOT!?! :) :) :) :)
(: "Our father, who art in Iowa, Hollow be thy head, Thy ideas run    :)
(:  Thy will be done, At Commodore as it is at Apple"  -Dan Barrett   :)
(: (: (: (: (: (: (: (: (: (: (: (: () :) :) :) Wubba, the Dark Angel :)
Newsgroups: comp.sys.amiga.advocacy