Typical page table entry

Here is a generic, typical PTE, as stored in the page table:

The bits we have seen before: the page frame number is used to actually map the page to a physical frame in memory. The present/absent bit is used to declare whether the frame number is valid (whether the page actually is in memory). We also have some permission bits, saying whether the page is readable, writable and executable. If a process attempts to write to a page which is not supposed to be writable, the MMU will cause a page fault, and the OS will step in and do something about it. (It may not seem to make much sense to make a page write-only, but there are uses for all these bits.)

There are two other bits shown, page accessed, and page dirty. A page is accessed if it has been read from or written to, and is dirty if it has been written to. (Dirty pages must be written out to disk before their frames are reused by other processes.) If the hardware does not support these two bits, they may be simulated by the OS.

Some of the fields in the PTE may be unassigned by the hardware, and are free for use by the OS. For example, if the OS is simulating the accessed and dirty bits, it may be able to use free bit fields in the PTE.

The OS may also be free to use the 'frame number' field---if the page is marked 'absent'---to remind itself where the page should be found (e.g. on disk).


last updated 24 March 1998