1.

Solve : Understanding Virtual Memory?

Answer»

I think I may be misunderstanding the concept of virtual memory and page faults. For sundry reasons, I turned off virtual memory and ran my system purely on RAM. Next, I checked Task Manager and noticed that all of my programs were still recording page faults. My LIMITED understanding caused me to think that since the term page fault is defined as: "A virtual memory interrupt that signals that the next instruction or item of data is not in physical memory and must be swapped back in from the disk," that, naturally, turning VM off would lead to zero page faults. Not so. Why?

Thanks in advance.


--OoberWindows is Built on the Concept of VM, if you turn it off windows will overide your setting and make a Emergency VM file

VM is like a ram over Flow on your HDD
Its there to keep the data of Big slow programs access able wit out haveing to query the source files again and again.

Your Ram is for the data that Changes Quickly , EG the Graphics in a Game,
Where the VM keeps all The images tha the game will use as textures , but arent Needed right now, then when there needed it calls them to ram

So if you Trun off VM your Stoping your computer from Loading thing properly

This is not the Best Explenation youll get , you should Google for some better info
Hmm...  Not quite.

I think you might be confusing Windows' page file with Windows' virtual memory system.  Whilst you can turn off the page/swap file (which as panboy says is to be AVOIDED really), you cannot turn off the virtual memory system.  This is the memory architecture upon which Windows is built.  "Virtual memory" is the way that Windows views all memory, whether it be RAM or held on a hard drive swap file.

A page fault can occur either where a piece of memory that has been swapped out can't be swapped back in again, or where a program tries to access memory that it does not own.  A system riddled with page faults suggests either hardware problems or systemic software problems caused by e.g. viral activity or hard drive corruption.  A less likely cause in your case would simply be bad programming, but in that case the errors would probably be limited to just the one program that was badly written.oh thats right VM is all the memory after the Frist meg Of Protected System memory, were you need to use memory managers like Himem.sys for Anything after 1mb

I dont know if computers still have the one meg of memory limet. it was part of the 386 architecture, they are realy still 386s only they have more Transisters now. or have they MADE a major change?Er... you're thinking of the bad old DOS days.  Memory management is rather different under Win2k/XP, fortunately.Ummm, where can I go to see my jolly good page fault list/report/log? Quote

Hmm...  Not quite.

I think you might be confusing Windows' page file with Windows' virtual memory system.
INDEED I was. My formative computing years were spent with 68k Macs back in the good ol' days of dual double density disk drives, system 6.0.1, and multi-finder (actually, 7.6.1 is still the best version, IMO ). In the Mac world of computing, virtual memory was approached a bit differently (unless I was misunderstanding that too... a very real possibility). You had physical memory and if you so chose you could turn on virtual memory to utilize your hard disk if your RAM was running low. That was it. The VM system was either completely on or completely off. If you ran out of memory it was rather unpleasant.

Fast forward about a decade or more and now I'm using Windoze. I'm still trying to separate the concept of a page file from virtual memory. I think I'm coming along. I'll have to Google this subject a bit more though.

Quote
A system riddled with page faults suggests either hardware problems or systemic software problems caused by e.g. viral activity or hard drive corruption.  A less likely cause in your case would simply be bad programming, but in that case the errors would probably be limited to just the one program that was badly written.

Hardware problems are unlikely and viral activity is even less likely. My HD seems fine so far, but you never can tell for sure with those wily things... All of my proggys seem to be recording normal levels of page faults for a 512 MB RAM system, except, that is, for FireFox 1.5.0.4. After an evening of browsing I'm up around 2.5 million page faults. Does anyone else have the same experience with FF? That was the original reason for my disabling of the page file. I wanted to see what would happen if FF couldn't use the HD to write information to.

Soybean said:
[highlight]"Ummm, where can I go to see my jolly good page fault list/report/log?"[/highlight]

I'm simply using the Task Manager's process tab, but if you use run>>perfmon you can view some basic page file information. For even more info, right click the graph, select 'add counter', select 'memory' from the performance object list, and then add the desired counters. You can see heaps (pun intended) of information about your memory.

So, a page file is simply the allotted space for page faults, but if no page file exists Windows will go ahead and use a portion of the HD anyway for necessary faulting, but not as much as if you had specified the recommended 150% or so of your HD?

Computers. Argh.


--Oober

P.S. I do like to turn my page file off and then restart before running a defrag. Quote
In the Mac world of computing, virtual memory was approached a bit differently
I'm sure that's right; Mac OSes had a different memory model to Windows - probably more Unix-like.  Nowadays though I suspect we will see a convergence, as more people want to run Windows on Mac hardware.  Not sure that's a great idea.  It's not as if the Windows memory management system is bulletproof.  I'd like to say that Linux does a good job in this area, but it's all to easy for rogue or incompetent programmers (like me!!!) to create buffer overflows.

Quote
Hardware problems are unlikely and viral activity is even less likely.
Do you see this level of page faults with a fresh install?  I must admit it's not something I have ever investigated, or indeed cared about.  These days, as long as things are working, I spend very little time looking "under the hood"!  

You're seeing the problem with Firefox, so maybe it's worth a Bugzilla report?  That said, I doubt that this is a unique problem.  I am aware that memory usage is something the dev team are wrangling with (have been since pre-version 1).  Probably for most users the advantages of Firefox outweigh this (virtually invisible) disadvantage.  It doesn't half chew through memory though!

Quote
So, a page file is simply the allotted space for page faults, but if no page file exists Windows will go ahead and use a portion of the HD anyway for necessary faulting, but not as much as if you had specified the recommended 150% or so of your HD?
No - it's more like Windows basically sees a monolithic section of memory which may or may not be composed of physical + hard drive memory.  A page fault can occur anywhere within that memory; just for disk memory, there's an additional cause of page faults.

That's my understanding, anyway.  

Quote
Computers. Argh.
Yup.

Quote
P.S. I do like to turn my page file off and then restart before running a defrag.
Whatever floats your boat!


Discussion

No Comment Found