Author Topic: OS 9 with 2GB of Ram.  (Read 25439 times)

Offline nanopico

  • Moderator
  • Platinum Member
  • *****
  • Posts: 767
OS 9 with 2GB of Ram.
« on: August 29, 2015, 09:49:23 AM »
So here is one that i find odd, maybe someone else can provide insight to this.
I inherited an G4 400 Gigabit.   The cpu was upgraded with a gigadesigns 800mhz g4 and an Nvidia Gforce MX4 from a dual 876MHZ G4.
So here is where the odd part comes in.  In every other Mac (g3 or g4) I own I can put 2 GB of ram in it and it is recognized in OS X, but OS 9 only sees 1.5 GB.  This I believe is fairly common knowledge and what I expected of this machine, but when I got OS 9 installed it sees and reports all 2GB of ram and appears to be using it.  Has any one else seen this before?
If it ain't broke, don't fix it, or break it so you can fix it!

Offline MacTron

  • Global Moderator
  • Platinum Member
  • *****
  • Posts: 2116
  • keep it simple
Re: OS 9 with 2GB of Ram.
« Reply #1 on: August 29, 2015, 10:37:39 AM »
... but when I got OS 9 installed it sees and reports all 2GB of ram and appears to be using it.  Has any one else seen this before?
Can you please attach a screenshot of "About this Computer" window from this machine?
Please don't PM about things that are not private.

Offline nanopico

  • Moderator
  • Platinum Member
  • *****
  • Posts: 767
Re: OS 9 with 2GB of Ram.
« Reply #2 on: August 29, 2015, 12:13:45 PM »
Here's the about this mac and the system profiler.
Interestingly mac os takes up 542 mb.
If it ain't broke, don't fix it, or break it so you can fix it!

Offline DieHard

  • Global Moderator
  • Platinum Member
  • *****
  • Posts: 2368
Re: OS 9 with 2GB of Ram.
« Reply #3 on: August 29, 2015, 12:24:37 PM »
You have totally normal behavior... you are still limited to 1.5/1.6 GB

This is taken from:
Mac OS 9.2.2 Maximum RAM and Real world observations

Quote
Finder shows Memory used per application and the System itself using 564.9 MB (What the F%$k), Also the largest unused Block (of available memory) is 1.42 GB.... wait a minute we add 512MB and we only get .01 GB more in available memory (from 1.41 to 1.42) and the OS itself is now bloated from 68.1MB to 564.9 MB (496.8 MB increase) ??!!

We can theorize that the ceiling is actually 1.5 GB (or maybe 1.6 GB since we now have 1.42 GB unused) and we can assume that it does not know what to do with the extra 512MB so it adds it to the Mac OS category as used by the system itself and it like a dead fish or more like a wasted layer of resources that we cannot get to :(

To read all the details...
http://macos9lives.com/smforum/index.php?topic=2101.msg10905#msg10905

Offline nanopico

  • Moderator
  • Platinum Member
  • *****
  • Posts: 767
Re: OS 9 with 2GB of Ram.
« Reply #4 on: August 29, 2015, 12:31:33 PM »
Good to know.  I've just not seen this behavior before with 2gb installed.
If it ain't broke, don't fix it, or break it so you can fix it!

Offline MacTron

  • Global Moderator
  • Platinum Member
  • *****
  • Posts: 2116
  • keep it simple
Re: OS 9 with 2GB of Ram.
« Reply #5 on: August 29, 2015, 12:49:08 PM »
Yes, it is as usual.
I always ask myself, what's doing the system with this 512Mb that "eat" by itself. ie: is it addressed as ROM? or mapped to other things ...
Maybe some day we'll find the way to make this 512Mb useful somehow...
Please don't PM about things that are not private.

Offline darthnVader

  • Platinum Member
  • *****
  • Posts: 679
  • New Member
Re: OS 9 with 2GB of Ram.
« Reply #6 on: April 29, 2018, 05:41:20 AM »
The highest priority to OS 9 FOREVER, would be to fix the fact that OS 9 can't address virtual memory beyond to 2 GB limit.

We can put the virtual Memory on a SSD controller on a 64bit PCI card. That would give us a throughtput of 266Mb/s with some CPU overhead. It wouldn't be that hard to design a 64bit PCI SSD controller.


Even given OS 9's partition limit of 128Gb, that's a lot of virtual memory.

Likely this would have to be addressed in the NanoKernel.

CPU's are good enough, tho one day we may want to look at what NXP chips are pin compatible with 74xx, I don't think we'd ever get 64bit mode working in OS 9, unless there is a source code leak. :P

We could offload most things to the GPU if we had drivers, and that really comes down to porting a modern C compiler to OS 9.

But, one thing at a time, lets get virtual memory fixed. ;D

Online IIO

  • Platinum Member
  • *****
  • Posts: 4440
  • just a number
Re: OS 9 with 2GB of Ram.
« Reply #7 on: April 29, 2018, 06:40:32 AM »
Even given OS 9's partition limit of 128Gb, that's a lot of virtual memory.

hm, i use some 30+ partitions with OS9 which are bigger than that.

from the standpoint of inside an audio guy´s filter bubble (pun intended) i wonder who would neeed so much virtual memory.

for video and audio work using virtual memory to "preload" streams is technically an option which is worse than a proper, intelligent disk streaming such as DAWs, after effects, quicktime, or sampler plug-ins are coming with.

i remember that i once tried to use it with photoshop and somehow it did not make the workflow faster than controlling the number of documents open at the same time manually.

what application will benefit from unlimited virtual memory?
insert arbitrary signature here

Offline Daniel

  • Gold Member
  • *****
  • Posts: 300
  • Programmer, Hacker, Thinker
Re: OS 9 with 2GB of Ram.
« Reply #8 on: April 29, 2018, 06:55:04 AM »
Even given OS 9's partition limit of 128Gb, that's a lot of virtual memory.

hm, i use some 30+ partitions with OS9 which are bigger than that.

from the standpoint of inside an audio guy´s filter bubble (pun intended) i wonder who would neeed so much virtual memory.

for video and audio work using virtual memory to "preload" streams is technically an option which is worse than a proper, intelligent disk streaming such as DAWs, after effects, quicktime, or sampler plug-ins are coming with.

i remember that i once tried to use it with photoshop and somehow it did not make the workflow faster than controlling the number of documents open at the same time manually.

what application will benefit from unlimited virtual memory?
None. Mac OS 9 does not have the capabilities to do that on a pretty fundamental level. Even if you create a process in its own address space and fill it entirely with virtual memory (which, while not impossible, is very very hard and would require a ton of code changes all over the place), you only get 4GB to play with. That is a limit of the processor itself. You could work out some sort of API to do this (where you call a function to access an enourmous pretend memory space), but you would probably be better off just having the API just use normal file access routines.

I suppose that if we ever got protected memory working, we could give each individual process 4GB of memory. We would still not be able to give a process more than 4GB.

Online IIO

  • Platinum Member
  • *****
  • Posts: 4440
  • just a number
Re: OS 9 with 2GB of Ram.
« Reply #9 on: April 29, 2018, 07:01:51 AM »

None. Mac OS 9 does not have the capabilities to do that on a pretty fundamental level. Even if you create a process in its own address space and fill it entirely with virtual memory (which, while not impossible, is very very hard and would require a ton of code changes all over the place), you only get 4GB to play with.

okay, but they still have the valid argument on their side that 1,5 + 4,0 is still a bit more than only 1,5. :)

so besidee the fact that it probably will never work, i still wonder what applications can make good use of VM.

(yeah, i know, you can open two 300 mb files on a machine with only 512 physical memory, but else?)
insert arbitrary signature here

Offline Daniel

  • Gold Member
  • *****
  • Posts: 300
  • Programmer, Hacker, Thinker
Re: OS 9 with 2GB of Ram.
« Reply #10 on: April 29, 2018, 07:06:41 AM »

None. Mac OS 9 does not have the capabilities to do that on a pretty fundamental level. Even if you create a process in its own address space and fill it entirely with virtual memory (which, while not impossible, is very very hard and would require a ton of code changes all over the place), you only get 4GB to play with.

okay, but they still have the valid argument on their side that 1,5 + 4,0 is still a bit more than only 1,5. :)

so besidee the fact that it probably will never work, i still wonder what applications can make good use of VM.

(yeah, i know, you can open two 300 mb files on a machine with only 512 physical memory, but else?)
Probably just apps that have inefficient memory usage. VM makes it not matter that much. VM essentially is just a tool to make things much easier for the programmers. For pretty much every program that can use VM, you could get a better result if you optimized it so it doesn't need to. VM just happens to be ok at most things and be easy to do.

Online IIO

  • Platinum Member
  • *****
  • Posts: 4440
  • just a number
Re: OS 9 with 2GB of Ram.
« Reply #11 on: April 29, 2018, 07:21:22 AM »
like i guessed. but if we needed to, how would you toggle VM to be active on a G4 with max RAM installed? the controlpanel does not allow it :)
insert arbitrary signature here

Offline Daniel

  • Gold Member
  • *****
  • Posts: 300
  • Programmer, Hacker, Thinker
Re: OS 9 with 2GB of Ram.
« Reply #12 on: April 29, 2018, 07:29:36 AM »
Way back in the 68k days, it was documented that VM only supports up to 1GB of memory. I guess they never changed it. The system doesn't let you turn on VM if ram is that big.

Offline MacTron

  • Global Moderator
  • Platinum Member
  • *****
  • Posts: 2116
  • keep it simple
Re: OS 9 with 2GB of Ram.
« Reply #13 on: April 29, 2018, 08:11:29 AM »
Even given OS 9's partition limit of 128Gb, that's a lot of virtual memory.

hm, i use some 30+ partitions with OS9 which are bigger than that.


The 128Gb limit (actually 190Gb) is only for the startup partition.
Please don't PM about things that are not private.

Offline ELN

  • Gold Member
  • *****
  • Posts: 295
  • new to the forums
Re: OS 9 with 2GB of Ram.
« Reply #14 on: April 29, 2018, 08:27:34 AM »
I reckon that the 9.2.2 legacy VM Manager owes a lot to 68k implementation in System 7, just with shims added to get page fault notifications from the NanoKernel. After all, it really hammers the FE0A trap!

VMInit always instructs the NK to resize the Area underlying the Primary Address Range to just shy of 1 GB. Then MemTop gets pointed to whatever you set in the Memory control panel. Below it, you have a file-mapped Primary Address Range containing all the usual Mac stuff, not least the Process Manager heap containing application partitions. Above it are more memory-mapped files, mostly Code Fragments (I think 9.1 introduced an API to map your own files).

Offline Daniel

  • Gold Member
  • *****
  • Posts: 300
  • Programmer, Hacker, Thinker
Re: OS 9 with 2GB of Ram.
« Reply #15 on: April 29, 2018, 09:43:51 AM »
The 'vm  ' 42 resource I am looking at uses FE06 a whole lot, but there is no use of FE0A. Any clue what FE06 means?

Offline darthnVader

  • Platinum Member
  • *****
  • Posts: 679
  • New Member
Re: OS 9 with 2GB of Ram.
« Reply #16 on: April 29, 2018, 03:56:31 PM »
280    Safari   jam   21.0   22   494.08 MB   1.35 GB   PowerPC   

Offline ELN

  • Gold Member
  • *****
  • Posts: 295
  • new to the forums
Re: OS 9 with 2GB of Ram.
« Reply #17 on: April 29, 2018, 06:33:15 PM »
My mistake! I just looked into it, and FE06 maps to PowerPC trap 3, just like FE0A does. Odd, that!

Daniel, remind me what your thoughts are about the "alternate" VMDispatch table? I'm seeing these VMMaxVirtualPages == 0 conditionals everywhere I look. Are they there to support some never-released rewrite of the VM Manager?

Offline Daniel

  • Gold Member
  • *****
  • Posts: 300
  • Programmer, Hacker, Thinker
Re: OS 9 with 2GB of Ram.
« Reply #18 on: April 29, 2018, 06:52:18 PM »
I think so.

A lot of the VMCalls use major_0x08d88 instead of GetPARPageInfo when VMMaxVirtualPages is 0.

I know that MPCall_95 will set VMMaxVirtualPages to 0 when it is called with r3 and r4 both 0. It logs "Areas capability probe detected" as it does so. Maybe they were partly done with this stuff, and wanted a mechanism to test how close they were?

I do remember building a NK with that value hardcoded to 0. Things crash and burn very early in the boot process. I am not sure if the NK is ready for this stuff, but userspace certainly isn't.

Now that I know what FE06 does, I can reverse the VM code more. We might want to try writing a new VM version eventually.

Offline ELN

  • Gold Member
  • *****
  • Posts: 295
  • new to the forums
Re: OS 9 with 2GB of Ram.
« Reply #19 on: April 30, 2018, 04:08:06 AM »
In my latest commit to powermac-rom (cleverly titled "Lots of work on Address Spaces") I gave names to all the MPCalls in NKAddressSpaces.s (which I renamed, by the way). MPCall 95 is now "MPFindVictimPage".