Page frame number vs. Page table entry
Asked Answered
A

2

6

So what exactly are the difference between page frame number and page table entry?

which one of the following is true:

physical_address = PTE * page_size + offset
physical_address = PFN * page_size + offset
Affective answered 13/11, 2015 at 5:10 Comment(1)
Read this: https://mcmap.net/q/13918/-how-does-x86-paging-work/…Forcier
D
9
physical_address = PFN * page_size + offset

is correct.

The page frames are contiugous page_size-aligned and page_size big chunks of memory, which fill the whole virtually addressable memory.

The page table entries are contained in virtual addresses. In turn, the entries contain page frame numbers, so that the nth entry selects the mth page frame. You can view it like that:

virtual -> physical
    PTE -> PFN

After all you can say that page table entries point to page frames.

Dupont answered 13/11, 2015 at 6:14 Comment(7)
so is the PFN is referencing the virtual address, and PTE is referencing the physical address?Affective
@Affective Oh, crap, no. Confused "virtual" and "physical."Dupont
@Affective Which part specifically? What in particular don't you understand?Dupont
ohhh, wait, you edited your answer. So is it that PTE references virtual and PFN references physical?Affective
@Affective In a way. A virtual address references a PTE, which points to a PFN, which gets translated, in addition with the offset, to a physical address.Dupont
Thanks!! I'm taking an OS course rn, and am getting really confused.Affective
Hi! Wouldn't all page frame numbers just be next to each other, i.e. wouldn't the difference between two consecutive PFNs in a page table be 1 for the same process?Officer
C
2

Technically, there are no PAGES in physical memory. A logical memory PAGE is mapped to a physical memory PAGE FRAME by a page table entry.

Chromophore answered 13/11, 2015 at 12:46 Comment(2)
Shouldn't this be a comment? And just out of interest, which line is this referring to?Dupont
Q: "So what exactly are the difference between page frame number and page table entry?" A: Given above.Chromophore

© 2022 - 2024 — McMap. All rights reserved.