Paging: Difference between revisions

259 bytes added ,  11 years ago
Added to explanation of the user bit.
[unchecked revision][unchecked revision]
mNo edit summary
(Added to explanation of the user bit.)
Line 29:
* D, is the 'Cache '''D'''isable' bit. If the bit is set, the page will not be cached. Otherwise, it will be.
* W, the controls ''''W'''rite-Through' abilities of the page. If the bit is set, write-through caching is enabled. If not, then write-back is enabled instead.
* U, the ''''U'''ser\Supervisor' bit, controls access to the page based on privilege level. If the bit is set, then the page may be accessed by all; if the bit is not set, however, only the supervisor can access it. For a page directory entry, the user bit controls access to all the pages referenced by the page directory entry. Therefore if you wish to make a page a user page, you must set the user bit in the relevant page directory entry as well as the page table entry.
* R, the ''''R'''ead/Write' permissions flag. If the bit is set, the page is read/write. Otherwise when it is not set, the page is read-only. The WP bit in CR0 determines if this is only applied to userland, always giving the kernel write access (the default) or both userland and the kernel (see Intel Manuals 3A 2-20).
* P, or ''''P'''resent'. If the bit is set, the page is actually in physical memory at the moment. For example, when a page is swapped out, it is not in physical memory and therefore not 'Present'. If a page is called, but not present, a page fault will occur, and the OS should handle it. (See below.)
Anonymous user