Search This Blog

Thursday, October 29, 2009

What is a page in computer memory?

Think of a page as a logical address space.

The program think each page is real memory (RAM).
But the actual stuff in page can be stored in RAM, or Disk, or someplace else.
If a program tries to access/need/save the stuff in certain page, but the stuff in page is not in the main memory. The "page-fault" is generated. The OS might increase virtual memory (space in disk) for that page. Now the page can be swapped into RAM (main memory) as requested, or swapped out to DISK (virtual memory) when we want more space in RAM (main memory).

Page fault is common. Just try not to trashing (constant swapping memory between disk and the ram because no more ram or super slow disk).

No comments: