Page vs. Frame?

mikeshn

Senior member
Oct 9, 2001
367
0
0
I read some tutorial for Operating System. I really don?t understand the difference between page and frame. I think that page is frame. Correct? for virtual memory

Thanks in advance
 

Colt45

Lifer
Apr 18, 2001
19,720
1
0
hmm..

<< "page"..."frame"..."virtual memory" >>




pagefile?

I really couldnt understand that :p:D
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
To steal the explanation for any anyone interested from here



<<

Memory in a virtual memory environment is managed in terms of discrete chunks called "pages". In the x86 architecture pages are usually 4Kbytes (just to be complete I'll mention that there is provision for a "large page", 4Mbytes, but never mind that).

Pages in virtual address space (which is what all code running under a virtual memory OS deals with) are called simply pages, or virtual pages.

Pages in physical memory (RAM) are called physical memory, or physical pages, or... "page frames". They are referred to by page frame number (PFN), aka the physical page number. The PFN is simply the high-order bits of the physical address of any byte within its page. How many bits? Enough to get pass the "byte within page" portion of the address. With 4K pages, it takes 12 bits to address the byte within each page, so with 32-bit addresses, the PFN is 20 bits wide.

The term "page frame" therefore simply means "a page of physical memory". It's important to understand that it NEVER refers to a page of virtual memory... even though the physical page (page frame) might be realizing one, or even several, pages of virtual memory at the time.

>>

 

PrincessGuard

Golden Member
Feb 5, 2001
1,435
0
0
Basically:

Frame = chunk of physical memory
Page = chunk of virtual memory

One (physical) frame can have many (virtual) pages swapped in and out of it by the OS.