Observations and Questions about RAM usage

Discuss anything related to portable freeware here.
Message
Author
lyx
Posts: 84
Joined: Mon Feb 15, 2010 1:23 am

Re: Observations and Questions about RAM usage

#16 Post by lyx »

W-what wait a minute o.O This is very interesting to me, since i'm working on a lowlevel database for which this VM stuff is very important. I and another dev have read through countless articles and docs over the last years, trying to get info on how this stuff really works lowlevel (instead of how its conceptually presented on midlevel C).

I was under the impression that a 32bit machine has only a 32bit addressrange of virtual memory which ALL processes share - but then via one memory address translation table per process, the process' "offset" in that vmem addressspace is stored, so that each process can act *as if* it has its own vmem?

I mean - how else can this work? If each process actually had its own 32bit vmem addresspace, then how would the kernel avoid collisions when assigning memory to processes? I mean, it someway needs to know which proc has which memory mapped, and surely it doesn't want to parse all processes address-translation tables? I dont understand anything anymore - please enlighten me :)

P.S.: Okay, after clearing my confused mind a bit, i think i can express my question more cleanly. Assuming that each proc has its own vmem, its address translation table would map ressources - also RAM - in that table. When applications request memory, they need to ask the kernel for it. However, regarding RAM-backed vmem pages, the kernel may not give two processes the same physical ram. But when the kernel is asked for mem, how does he know which ram-pages are used by which process? It cannot parse the vmem address translation tables of every process for every ram allocation - that would be too slow. So how does the kernel know? Does it keep its own central list of which procs use which ram pages?

I got some other questions, but the above one is the major missing puzzle piece to me.

User avatar
SYSTEM
Posts: 2043
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

Re: Observations and Questions about RAM usage

#17 Post by SYSTEM »

Maybe this article will explain something.

http://www.geoffchappell.com/viewer.htm ... memory.htm
My YouTube channel | Release date of my 13th playlist: August 24, 2020

Ruby
Posts: 324
Joined: Sat Sep 05, 2009 6:35 pm

Re: Observations and Questions about RAM usage

#18 Post by Ruby »

SYSTEM wrote:Maybe this article will explain something.

http://www.geoffchappell.com/viewer.htm ... memory.htm
Thanks for that link SYSTEM that's a good read! :wink:

User avatar
grannyGeek
Posts: 218
Joined: Mon Mar 26, 2007 10:54 pm

Re: Observations and Questions about RAM usage

#19 Post by grannyGeek »

Well! I had no idea my little question would spark so much discussion!
Thank you guys, for all your input, and thank you for the links. I'm a bit more educated about memory usage now.
(I must read the Geoff Chappell page again, absolutely shocking.
Bill Gates: for 30 years, ensuring your computing experience will always require upgrades. )

Further comment from a total non-techie:
I'm running XP with only 1 gb ram, 1.5 gb swap file. I do see that even when "mem" usage drops from minimizing/restoring or from user-switching, the "Vmem" usage ("allocated" memory?) stays high.
So I guess I should assume that those original high memory readings are the reading I should consider as "real".

User avatar
Midas
Posts: 6726
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Observations and Questions about RAM usage

#20 Post by Midas »

Andrew Lee wrote: Actually, that's not true. On a 32-bit machine, the total amount of physical memory/virtual memory _can_ exceed 4GB. What _cannot_ exceed 4GB is the physical address space of each _process_ on the system.

For example, I am running a modified kernel on a 32-bit Win7 machine at work. It has 8GB physical memory, and I see total 8GB physical memory in task manager. Also, I can run a couple of 1.5GB virtual machines without any slowdown in speed. Without the mod kernel, I can only see 3GB physical RAM, and can't start more than 1 VM.

Very old topic update: just came across an universal patch to do precisely this in various 32-bit Windows, which I think it's worth noting here...
Up to 128gb of ram usable on 32-bit Windows

User avatar
Andrew Lee
Posts: 3063
Joined: Sat Feb 04, 2006 9:19 am
Contact:

Re: Observations and Questions about RAM usage

#21 Post by Andrew Lee »

Wow! I wrote that 12y ago, and I can't believe someone is still patching 32-bit Windows in 2019!

Can't remember when I left the 32-bit world behind, but it seems like forever now..

Post Reply