Xref: utzoo comp.os.misc:529 comp.os.cpm:1801 Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-lcc!ames!think!bloom-beacon!gatech!mcdchg!heiby From: heiby@mcdchg.UUCP (Ron Heiby) Newsgroups: comp.os.misc,comp.os.cpm Subject: Re: a very naive Question??? Message-ID: <13133@mcdchg.UUCP> Date: 10 Oct 88 16:09:48 GMT References: <6693@ut-emx.UUCP> Reply-To: heiby@mcdchg.UUCP (Ron Heiby) Organization: Motorola Microcomputer, Schaumburg, IL Lines: 52 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)