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

Offline nanopico

  • Moderator
  • Platinum Member
  • *****
  • Posts: 713
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: 2049
  • 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: 713
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

  • Administrator
  • Platinum Member
  • *****
  • Posts: 1576
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: 713
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: 2049
  • 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

  • Gold Member
  • *****
  • Posts: 366
  • 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

Offline IIO

  • Platinum Member
  • *****
  • Posts: 2013
  • new to the forums
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?
"It is true that the "pre-emptive multitasking" advantage present in OS X can be illustrated by downloading CD-ROM ISOs and rendering chaos theory formulas while simultaneously instant messaging and posting on FaceBook what you ate... but in reality, what did you create?"
- DieHard, random forum troll at macos9lives.com

Offline Daniel

  • Silver Member
  • ****
  • Posts: 186
  • 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.

Offline IIO

  • Platinum Member
  • *****
  • Posts: 2013
  • new to the forums
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?)
"It is true that the "pre-emptive multitasking" advantage present in OS X can be illustrated by downloading CD-ROM ISOs and rendering chaos theory formulas while simultaneously instant messaging and posting on FaceBook what you ate... but in reality, what did you create?"
- DieHard, random forum troll at macos9lives.com

Offline Daniel

  • Silver Member
  • ****
  • Posts: 186
  • 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.

Offline IIO

  • Platinum Member
  • *****
  • Posts: 2013
  • new to the forums
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 :)
"It is true that the "pre-emptive multitasking" advantage present in OS X can be illustrated by downloading CD-ROM ISOs and rendering chaos theory formulas while simultaneously instant messaging and posting on FaceBook what you ate... but in reality, what did you create?"
- DieHard, random forum troll at macos9lives.com

Offline Daniel

  • Silver Member
  • ****
  • Posts: 186
  • 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: 2049
  • 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

  • Silver Member
  • ****
  • Posts: 223
  • 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

  • Silver Member
  • ****
  • Posts: 186
  • 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

  • Gold Member
  • *****
  • Posts: 366
  • 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

  • Silver Member
  • ****
  • Posts: 223
  • 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

  • Silver Member
  • ****
  • Posts: 186
  • 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

  • Silver Member
  • ****
  • Posts: 223
  • 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".

Offline Daniel

  • Silver Member
  • ****
  • Posts: 186
  • Programmer, Hacker, Thinker
Re: OS 9 with 2GB of Ram.
« Reply #20 on: May 01, 2018, 05:16:00 PM »
The 'vm  ' 42 makes use of FE0D and FE0B in one function, and I have no clue what those ones do

It also uses FE05 in another function, which is _MoveToECR. It writes to emulator control registers 6, 7, 8, and 14, in that order.

Offline ELN

  • Silver Member
  • ****
  • Posts: 223
  • new to the forums
Re: OS 9 with 2GB of Ram.
« Reply #21 on: May 01, 2018, 07:15:19 PM »
Neither FE0D nor FE0B result in a PowerPC trap, at least when run from the first few bytes of ROM. Maybe they also set Emulator state?

What do they seem to be taking arguments?

Offline Daniel

  • Silver Member
  • ****
  • Posts: 186
  • Programmer, Hacker, Thinker
Re: OS 9 with 2GB of Ram.
« Reply #22 on: May 01, 2018, 07:25:24 PM »
They take a page number in A0, and 0xFFF in D0. The same page# is put in both. This function's pointer is placed at offset 0x24 of VMVectors (global variable at address 0xCF0), but only if the cpu is better than a 601 (the 601 version of this routine is just a RTS). I have no what calls this function or what its argument is.

Offline ELN

  • Silver Member
  • ****
  • Posts: 223
  • new to the forums
Re: OS 9 with 2GB of Ram.
« Reply #23 on: May 02, 2018, 12:36:29 AM »
Possibly some simple function that the Emulator accelerates using clever post-601 PPC instructions? Zero a page using DCBZs?

Offline Daniel

  • Silver Member
  • ****
  • Posts: 186
  • Programmer, Hacker, Thinker
Re: OS 9 with 2GB of Ram.
« Reply #24 on: May 02, 2018, 03:04:13 PM »
Not sure.

I have mostly finished looking through the 'vm  ' 42 resource. It looks like it is essentially a wrapper for NK VMCalls. It puts a lot of function pointers in VMVectors, and it initializes its globals, but I am not sure it does a lot of stuff itself. I don't even think that it takes over the bus error trap. It definitely doesn't read and write pages to disk. Somewhere in the vast assortment of Mac OS 9 code there is something which actually uses this API to provide VM services. My best guess for its location would be the Process Manager, Mixed Mode Manager, or the Memory control panel.

MPLibrary has a lot of functions related to the Area VM system. It might do MPTask VM itself, or it might offload it to something else. The 'ager' MPTask might be interesting to look at, because it apparently does page aging stuff.

Offline MacTron

  • Global Moderator
  • Platinum Member
  • *****
  • Posts: 2049
  • keep it simple
Re: OS 9 with 2GB of Ram.
« Reply #25 on: May 03, 2018, 08:13:38 AM »
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.
I have done this before: connecting two SSD's to a Seritek 1eVE2+2, ( a full length 64 bits SATA PCI card) in RAID mode. The maximum throughput was 190 Mb/s IIRC, I'll will seach for the post where I wrote the data.
Please don't PM about things that are not private.

Offline IIO

  • Platinum Member
  • *****
  • Posts: 2013
  • new to the forums
Re: OS 9 with 2GB of Ram.
« Reply #26 on: May 03, 2018, 01:37:40 PM »
isnt that what you would get with only one SSD, too? ;)
"It is true that the "pre-emptive multitasking" advantage present in OS X can be illustrated by downloading CD-ROM ISOs and rendering chaos theory formulas while simultaneously instant messaging and posting on FaceBook what you ate... but in reality, what did you create?"
- DieHard, random forum troll at macos9lives.com

Offline Daniel

  • Silver Member
  • ****
  • Posts: 186
  • Programmer, Hacker, Thinker
Re: OS 9 with 2GB of Ram.
« Reply #27 on: May 03, 2018, 05:25:42 PM »
By setting breakpoints in MPLibrary APIs, I believe that the 'ager' task is inside MPLibrary itself. This means that MPLibrary contains code which actively manipulates Area VM stuff.

Offline Daniel

  • Silver Member
  • ****
  • Posts: 186
  • Programmer, Hacker, Thinker
Re: OS 9 with 2GB of Ram.
« Reply #28 on: May 06, 2018, 06:52:49 PM »
I just realized I completely missed the 'ptch' 420 resource.  :(
It sets up the 'vm  ' 42 resource and uses its vectors a lot.

I guess I should start reversing that...

Offline ELN

  • Silver Member
  • ****
  • Posts: 223
  • new to the forums
Re: OS 9 with 2GB of Ram.
« Reply #29 on: May 06, 2018, 06:56:51 PM »
#blazeit

Offline darthnVader

  • Gold Member
  • *****
  • Posts: 366
  • New Member
Re: OS 9 with 2GB of Ram.
« Reply #30 on: June 03, 2018, 03:35:39 AM »

Offline ELN

  • Silver Member
  • ****
  • Posts: 223
  • new to the forums
Re: OS 9 with 2GB of Ram.
« Reply #31 on: June 03, 2018, 06:12:44 AM »
:o

Please explain.

Offline Protools5LEGuy

  • Global Moderator
  • Platinum Member
  • *****
  • Posts: 2184
Re: OS 9 with 2GB of Ram.
« Reply #32 on: June 03, 2018, 09:02:20 AM »
Looking for MacOS 9.2.4

Offline Protools5LEGuy

  • Global Moderator
  • Platinum Member
  • *****
  • Posts: 2184
Re: OS 9 with 2GB of Ram.
« Reply #33 on: June 03, 2018, 09:16:24 AM »
I am sorry Darthnvader, bit I couldnt let Elliot with the question.
Looking for MacOS 9.2.4

Offline darthnVader

  • Gold Member
  • *****
  • Posts: 366
  • New Member
Re: OS 9 with 2GB of Ram.
« Reply #34 on: June 03, 2018, 05:17:19 PM »
:o

Please explain.

Yes, it's Qemu-system-ppc, seems they did a little trickery with Book-E and some older commits from a few months ago can boot OS X with very near 4GB of Ram. For OS 9 the Mac OS ROM fails to load, but I'm sure that could be addressed if we can get around the 1.5GB limit for the OS itself.

Offline macStuff

  • Platinum Member
  • *****
  • Posts: 833
  • www.oldschooldaw.com
    • www.oldschooldaw.com
Re: OS 9 with 2GB of Ram.
« Reply #35 on: June 04, 2018, 07:26:38 AM »
i never put more than 1gb of ram into an os9 machine
no need for anymore ram than 1gb
the os simply does not use it effectively in my opinion

so theres absolutely no point in trying to get more
MY opinion
aka chrisNova777 aka superNova777 aka geforceG4 | >>> http://www.oldschooldaw.com

Offline darthnVader

  • Gold Member
  • *****
  • Posts: 366
  • New Member
Re: OS 9 with 2GB of Ram.
« Reply #36 on: June 04, 2018, 02:05:22 PM »
i never put more than 1gb of ram into an os9 machine
no need for anymore ram than 1gb
the os simply does not use it effectively in my opinion

so theres absolutely no point in trying to get more
MY opinion

We do it because it's there, and, hello pirate:-)

Offline ancient

  • Member
  • *
  • Posts: 2
  • New Member
Re: OS 9 with 2GB of Ram.
« Reply #37 on: October 09, 2018, 08:27:11 PM »
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.
Very useful to know , the limitations are not that bad then so with a seritek Sata card I can have 2tb secondary non booting drive single partition? does formatting larger drives in OS9 become an issue software wise to format them?
« Last Edit: October 10, 2018, 02:47:43 AM by MacTron »

Offline IIO

  • Platinum Member
  • *****
  • Posts: 2013
  • new to the forums
Re: OS 9 with 2GB of Ram.
« Reply #38 on: October 11, 2018, 08:43:51 AM »

Quote
Very useful to know , the limitations are not that bad then so with a seritek Sata card I can have 2tb secondary non booting drive single partition? does formatting larger drives in OS9 become an issue software wise to format them?

you can with some controllers, but it is better to make 4x500 IMO.

i use x500 partitions inside (PCI) and 1.5 tera single partitions via firewire - and only for data which do not need to be maintained by norton disk destroyer or data recovery programs (or at least not under OS9 and 10.4 PPC).
"It is true that the "pre-emptive multitasking" advantage present in OS X can be illustrated by downloading CD-ROM ISOs and rendering chaos theory formulas while simultaneously instant messaging and posting on FaceBook what you ate... but in reality, what did you create?"
- DieHard, random forum troll at macos9lives.com