Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!bagate!cbmvax!cbmehq!cbmger!amiux!holgerl From: holgerl@amiux.UUCP (Holger Lubitz) Newsgroups: comp.sys.amiga.programmer Subject: Re: Virtual memory for Amiga! Message-ID: Date: 31 Mar 91 18:53:09 GMT References: Organization: Teuwag Lines: 52 In article sbeagle@kennels.actrix.gen.nz (Sleeping Beagle) writes: >Why shouldn't virtual RAM work on the Amiga? It works on the PC >and Macintosh.... Neither the PC nor the Macintosh multitask like the Amiga does. Banking the virtual memory works just fine on a PC, since there is only one program running in the machine, and the processor has no need to wildly jump back and forth while switching between tasks. But did you ever see Windows 3.0 on a 386 with not so much memory (the one I used had "only" 2 MB) trying to get two programs running ? The harddisk runs and runs and runs and runs all the time, and system performance degrades noticeably. Just because the system has to load from the harddisk most of the time. And even Windows is not the type of multitasking the Amiga has. No nifty messages flowing through your system, no inter-task communication (as far as I heard from a PC programmer). Merely some kind of very comfortable task switching. And regarding the Mac: Virtual Memory is *announced*, but System 7 is not released yet, and regarding what I have heard from beta testers, it is not as nicely done as they expected it to be. Virtual Memory is nice with fast harddisks, and enough REAL memory to run your programs in. But remember: You always have to GIVE UP some of your real memory to allow virtual memory. You cannot access some sector on your harddisk directly with the processor. You can only use some clever software using the MMU to determine if the processor tries to access a segment of virtual memory, then to check if the correct contents are already in your reserved segment of real memory, to copy the right contents from the harddisk into the reserved segment if they are not, then redirecting the access there. Tricky. And if you ever run out of real memory so that the OS starts placing YOUR PROGRAMS in virtual memory, be prepared for a severe performance loss. You still need some clever caching techniques to prevent your software to reload data areas every now and then if two different programs run in multitasking keep accessing two different data areas in virtual memory, far enough from each other that each one resides in different segments. Virtual memory is good for keeping megabytes of data, ok. But then you could also keep them in a file. Of course it would be nice to have VM in the OS, but don't expect that you can simply add your harddisks capacity to your main memory with it. Best regards, Holger -- Holger Lubitz | holgerl@amiux.uucp Kl. Drakenburger Str. 24 | holgerl@amiux.han.de D-W-3070 Nienburg | cbmvax.commodore.com!cbmehq!cbmger!amiux!holgerl