Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsm!cbnewsk!ech From: ech@cbnewsk.att.com (ned.horvath) Newsgroups: comp.sys.mac.hardware Subject: Re: System 7.0 and RAM Message-ID: <1991Apr25.190940.15729@cbnewsk.att.com> Date: 25 Apr 91 19:09:40 GMT References: Distribution: usa Organization: AT&T Bell Laboratories Lines: 45 In article <1991Apr22.042204.1291@lynx.CS.ORST.EDU> hasses@prism.cs.orst.edu (Stephen Haase) writes: >One VERY annoying thing I noticed with system 7's virtual memory was that x >amount of HD space does not equal x amount of extra RAM. I got 7.0fc2 going and >then tried to add 3 megs of RAM to my 5 physical RAM. It worked all right, but >it took 8 megs of HD space to give me those extra 3 megs. Needless to say, I >removed it quickly since I only have 9 megs free anyways. From article , by aland@chaos.cs.brandeis.edu (Alan D.): > Very annoying, but quite necessary. You need to have some place to > swap OUT the memory you're replacing with the new memory... And > therefore you need as much free space on the HD as you want in virtual > memory, notwithstanding the amount of actual RAM you have. "Convenient for the Systems Programmer," perhaps. Necessary, no. The VM implementation has to track which pages are in physical memory in any case. But if you add a table of ALL pages, with either a RAM address OR a disk address for each page, then you need only allocate disk space to accommodate the difference between virtual and real, plus one "free" page to swap out to. Yes, the table itself occupies "real" RAM. But assuming a reasonable page size, say 4K or larger, the table size is negligible. You must reserve one free page frame in memory. On a fault, seek to the needed page, swap it into the reserved frame, then swap the unneeded page to the same disk page frame you just read from. This has the nice performance advantage that the paging device only seeks once per page fault. I think it's important to notice that this is the first VM implementation for the Mac, not the last. A number of us are upset that VM provides no additional protection. The official answer was that it would break "certain programs," i.e. SADE. I think Apple missed an opportunity to do it "right," but the opportunity is scarcely gone forever. It's also important to notice that the emphasis in System 7.0 has been to enable better performance by applications, working in concert, by providing a better application framework. The OS is badly in need of an overhaul, but it's a lower priority for Apple. And rightly so. I only speak for me. =Ned Horvath= ehorvath@attmail.com