Does it mean that the referenced page is within the logical address space of the process? I was thinking maybe also that the referenced page is memory resident?

- 328,167
- 45
- 605
- 847

- 123
- 2
- 10
-
1There's not a snowball's chance in Hades that anyone can answer that; it depends on the o/s (unstated) that you're working on. Please think carefully before asking a question — what context do those reading the question need to be able to give an answer? The answer is 'more context than is in this question (at the moment)'! – Jonathan Leffler May 02 '16 at 03:26
-
I'd make a CPU architecture where 0 means true, and thus present = 0 that the page is memory-resident. – Antti Haapala -- Слава Україні May 02 '16 at 04:32
-
Can you phrase this more directly as a programming question? It's not clear what your programming problem is. – Raymond Chen May 02 '16 at 05:09
-
Word to the wise: Don't post operating system questions using language keywords (e.g., C, C++). – user3344003 May 02 '16 at 12:32
1 Answers
Page tables are a data structure that depends on the hardware. You need to read the documentation for your CPU or MMU (if it's separate from the CPU) for what the bits mean.
On x86 (which I suspect you mean), the "present" bit means that the rest of the page table entry contains valid data that the CPU should read. If the present bit is not set, the CPU does not care about the rest of the bits so it is then up to the operating system to give them meaning. Most operating systems don't store anything relevant in the rest of the PTE, so on most operating systems when the present bit is not set the rest of the PTE is just garbage. Older operating systems stored information about which block of swap a swapped out page ended up at, but today you need more information for paging than you can fit in a PTE and we like to do it in a hardware independent code, so it is rarely done.

- 19,807
- 1
- 34
- 60