<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 10 Oct 1988 03:11:15 GMT
From   : bywater!acheron!clarke@uunet.uu.net (Ed Clarke)
Subject: a very naive Question???

From article <6693@ut-emx.UUCP>, by kannan@ut-emx.UUCP (Natarajan Shanmugh):
> Followup-To: 
> Distribution: 
> Organization: UTexas Computation Center, Austin, Texas
> Keywords: Virtual Memory
>     I read an article in UNIX World comparing system V and AIX. It clearly
stated that System V did not have VM(Virtual Memory concept). Can someone
clear the following doubts for me through e-mail to nataraj@happy.cc.utexas.edu
>    (1) If there is no VM, how does the operating system, bring the programs
from secondary storage to main for execution.(System V )
>    (2) How does MS-Dos solve the above problem?
>    (3) I have comments like Unix needs at least 4M of main memory?

1. That's Virtual Machine not Virtual Memory.  AIX uses VRM which is a sort
of low level idealized machine that comes between AIX and the true hardware.
It complicates life quite a bit when you want to add support for non
standard devices.  I think it's supposed to disapear in the future.

2. MS-Dos has neither.  It's a program loader that runs in 8086/8088
mode (< 1 Meg).  Yeah, it'll run on 80286/80386 machines, but it doesn't
take advantage of any of the extended features.

3.) Unix always needs one more meg than you have installed, either main
memory or secondary storage but usually both. ;-)

-- 
Ed Clarke
uunet!bywater!acheron!clarke


Date: Wednesday, 12 October 1988  23:03-MDT
From: killer!chasm@EDDIE.MIT.EDU (Charles Marslett)
Subject: a very naive Question???

In article <251@acheron.UUCP>, clarke@acheron.UUCP (Ed Clarke) writes:
> 1. . . .                                       AIX uses VRM which is a sort
> of low level idealized machine that comes between AIX and the true hardware.
> It complicates life quite a bit when you want to add support for non
> standard devices.  I think it's supposed to disapear in the future.

Are you serious?  It probably has its flaws, but the idea that every copy of
the OS has to be relinked every time any hardware is changes went out of
favor everywhere but here in Unix-land years ago.  I was of the opinion, last
I read anything of the AIX docs, that the VRM/dynamic drivers system was
AIX's most useful "enhancement".  (Even Messy-DOS is simpler and more
versatile at the same time than the Unices I have looked at recently (:-).

> 2. MS-Dos has neither.  It's a program loader that runs in 8086/8088
> mode (< 1 Meg).  Yeah, it'll run on 80286/80386 machines, but it doesn't
> take advantage of any of the extended features.

Actually, to repeat myself, user loadable drivers and the much maligned
"BIOS" create a reasonable virtual machine (virtual memory, . . . lets
talk about real computers now . . .).

> Ed Clarke
> uunet!bywater!acheron!clarke

Charles Marslett
chasm@killer.dallas.tx.us   <-- apply all standard disclaimers
                             <-- since I KNOW nothing!


Date: Monday, 10 October 1988  21:42-MDT
From: amethyst!spock!chris@noao.edu (Chris Ott)
Subject: a very naive Question???

heiby@mcdchg.UUCP (Ron Heiby) writes:
> kannan@emx.UUCP or nataraj@happy.cc.utexas.edu writes:
> >     I read an article in UNIX World comparing system V and AIX. It clearly
> > stated that System V did not have VM(Virtual Memory concept).
> Well, that's your problem.  You can't believe everything you read,
> especially not in "UNIX World".  They try hard, but apparently need an
> editor who's a bit more knowledgeable and can catch goofs like this.
> I read it anyway.  I don't really know why.
>
> The actual definition of Virtual Memory involves the concept of allowing
> programs to believe that they are running at a particular address, when
> in fact they may actually be at a completely different *physical* address.

     Wrong. The actual concept of virtual memory is the ability to allow
programs to use more memory than the machine physically has by swapping
the least recently used pages to secondary storage. For instance, if your
program wants to use 50 megabytes of memory and your machine only has
4 megabytes of main memory, you need store the excess on the disk until it
is needed again by the program. If your machine can do this, it has virtual
memory. This is usually (if not always) transparent to the program. Your
definition is only a part of today's virtual memory systems.

> The definition the author of the article (and the UW editor) are mistakenly
> using involves the concept of *demand paging*.  System V has always had
> virtual memory (on real architectures).  It's just that the sharing of
> memory by more programs than would physically fit all at once was done
> by a process called "swapping".  This involved the migration of entire
> processes between main memory and "the swapper".  Since SVR2.1, about
> something like FOUR YEARS AGO, System V has supported the other popular
> method, called "demand paging".  This is where the process is broken up
> into chunks, called "pages", and the pages are moved in and out of main
> memory "on demand".

     Close, but not quite. Demand paging involves only the code portion of
the program. Instead of loading the whole program immediately when is is
executed, only the initially needed pages are loaded and new pages are
"paged in" as they are needed. This way, the program starts much faster.
What you have described here is actually the way virtual memory works. By
the way, I'm pretty sure you need a virtual memory system to be able to
implement demand paging.

>                    Anyway, even the "swapping" style of memory sharing
> uses Virtual Memory.

     Wrong. The definition swapping depends on what type of memory you
have (virtual or non-virtual). On non-virtual memory systems, swapping
occurs when a process needs to execute, but there isn't enough memory to
bring it in. Another process that is not currently executing is swapped
out (to secondary storage) to make room for the new process. Note that the
ENTIRE process is swapped out, not just pieces of it, as is true with a
virtual memory system.

     Swapping in a virtual memory system refers to the swapping of those
"chunks" or pages to and from secondary storage. Most people actually call
this "paging", since only pages of the process are swapped, rather than the
whole process. We say that a process is "swapped out" when all of its pages
have been placed on secondary storage. This usually only occurs on a heavily
loaded system.

> Using "demand paging", not all of the pages must be in memory at the same
> time, just those that are "currently" needed.  They don't have to be kept
> in contiguous physical memory.

     Again, this is the definition of virtual memory.

> Ron Heiby, heiby@mcdchg.UUCP    Moderator: comp.newprod & comp.unix

--Chris

 Chris Ott
 Computational Fluid Mechanics Lab            Just say "Whoa!!" and
 University of Arizona                          vote for Randee!!

 Internet: chris@spock.ame.arizona.edu
 UUCP: {allegra,cmcl2,hao!noao}!arizona!amethyst!spock!chris


Date: Wednesday, 12 October 1988  08:38-MDT
From: tektronix!orca!tekecs!frip!andrew@UCBVAX.BERKELEY.EDU (Andrew Klossner)
Subject: a very naive Question???

Lots of errors and inconsistencies in this discussion, mostly based on
terminology disagreement.

       "I read an article in UNIX World comparing system V and AIX. It
       clearly stated that System V did not have VM(Virtual Memory
       concept)."

As has been pointed out, the initials "VM" in the IBM mainframe world
stand for "virtual machine," a completely different animal from
"virtual memory."

               "The actual definition of Virtual Memory involves the
               concept of allowing programs to believe that they are
               running at a particular address, when in fact they may
               actually be at a completely different *physical*
               address."

       "Wrong. The actual concept of virtual memory is the ability to
       allow programs to use more memory than the machine physically
       has by swapping the least recently used pages to secondary
       storage."

The term "virtual memory" has different definitions depending on who
you talk to and when you talk to them.  You can find texts that define
VM in both of the above ways.  The original poster was not "wrong."

       "Demand paging involves only the code portion of the program."

I've never heard this before.  In my (not trivial) experience, the term
"demand paging" always refers to dynamic paging of both instructions
and data.  I'd be interested in references to articles or books that
employ this restricted definition.

  -=- Andrew Klossner   (uunet!tektronix!tekecs!frip!andrew)    [UUCP]
                        (andrew%frip.gwd.tek.com@relay.cs.net)  [ARPA]

<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>