kannan@ut-emx.UUCP (Natarajan Shanmugh) (10/08/88)
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? Is it for all the daemons to run? Thank you nataraj@happy.cc.utexas.edu
clarke@acheron.UUCP (Ed Clarke) (10/10/88)
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
heiby@mcdchg.UUCP (Ron Heiby) (10/10/88)
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. 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". Anyway, even the "swapping" style of memory sharing uses Virtual Memory. The process may be loaded onto an entirely different memory card from one second to the next. The program doesn't even know. 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. > (1) If there is no VM, how does the operating system, bring the programs > from secondary storage to main for execution.(System V ) This question really has little or nothing to do with VM. One can very easily accomplish the simple loading of programs in the same way that something like MS-DOS does. > (2) How does MS-Dos solve the above problem? It knows where it has some memory not currently in use and causes disk reads to bring the code from disk into that "free" memory, marking the memory as no longer free. When the program exits, MS-DOS (normally) marks the memory as free once again. > (3) I have comments like Unix needs at least 4M of main memory? > Is it for all the daemons to run? That really depends on the version of UNIX, the system (hardware) involved, and the demands placed on it. For example, the Motorola Delta systems require that you have 4Meg for the current version of SVR3. The reason is that the installation procedure boots from tape into a ~2Meg RAM Disk. After installation, unless you are running Remote File Sharing, and with a bit of tuning, you can run quite comfortably in 2Meg. It does depend, of course, on what you are trying to do. If you want to run GNU Emacs or something else huge, you'd better get more memory than you can afford. :-) -- Ron Heiby, heiby@mcdchg.UUCP Moderator: comp.newprod & comp.unix "Failure is one of the basic Freedoms!" The Doctor (in Robots of Death)
ron@ron.rutgers.edu (Ron Natalie) (10/11/88)
The article is inaccurate. System V has virtual memory of almost any definition. Originally System V had problems with virtual memory. There are two differing definitions of Virtual Memory. The more liberal definition says that Virtual Memory provides for swap extension of real memory and some sort of address translation. UNIX has always done this. The more restrictive definition is that some mechanism such as paging or segmented swapping exists as well. The difference is summarized in the following. Suppose you have 1 M of real memory and you want to run a 2 M process. Prior to recent system V versions, you were out of luck. It always expected to load a whole process as a unit. On paging systems, it only needed to bring in the parts needed for the execution of the current instruction. The virtual memory argument was best summarized by Bruce Crabill of the University of Maryland. "It ain't virtual unless it's not all there." This means that the liberal definition is kind of weak if you have to have real memory to back your virtual memory for any give process. -Ron Of course, they may have meant VM as Virtual Machine. It is doubtful that anything other than AIX/370 is going to support that.
chris@spock (Chris Ott) (10/11/88)
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 -------------------------------------------------------------------------------
pjh@mccc.UUCP (Pete Holsberg) (10/12/88)
In article <13133@mcdchg.UUCP> 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). Why is this VM stuff on comp.os.CPM???? -- Pete Holsberg UUCP: {...!rutgers!}princeton!mccc!pjh Mercer College CompuServe: 70240,334 1200 Old Trenton Road GEnie: PJHOLSBERG Trenton, NJ 08690 Voice: 1-609-586-4800
andrew@frip.gwd.tek.com (Andrew Klossner) (10/12/88)
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]
chasm@killer.DALLAS.TX.US (Charles Marslett) (10/13/88)
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!
mlelstv@faui44.informatik.uni-erlangen.de (Michael van Elst ) (10/17/88)
In article <6693@ut-emx.UUCP> 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). Of course, System V _uses_ virtual memory. > > (1) If there is no VM, how does the operating system, bring the programs > from secondary storage to main for execution.(System V ) I don't see the point. VM is used to run large (or multiple) programs in a limited real memory. The secondary storage is problem of the file system. You load programs from a code-file, that contains the code and data segments and some other useful information like stacksize. > > (2) How does MS-Dos solve the above problem? MS-DOS has no VM. It runs all programs in a single address space for there is only one process. Loading of programs is ... (see answer to 1) > > (3) I have comments like Unix needs at least 4M of main memory? > Is it for all the daemons to run? No. UNIX is rather large operating system. The kernel is some 100kbytes large and you need buffer space to speed up disk i/o. You need approx. 1.5M to 2M for a single user workstation and 1M for each other user. So 4M is an average size for an UNIX machine but not required. The deamons are programs that handle regular system activities like printer spooling. For UNIX handles virtual memory, those processes are swapped out on disk and don't need real memory unless they really DO anything useful. Michael van Elst E-mail: UUCP: ...uunet!unido!fauern!faui44!mlelstv