Please explain Page Table protection bits and please use some real life analogy as an example.

1 Answer | Add Yours

kplhardison's profile pic

Karen P.L. Hardison | College Teacher | eNotes Employee

Posted on

There are two kinds of bits when writing Internet addresses: status bits and protection bits. Protection bits are used in both pagination tables: page directory table and page table. Both implement protection bits. The bits for both tables are similar:

Directory Table
G - Ignored
S - Page Size
A - Accessed
D - Cache Disabled
W - Write Through
U - User\Supervisor
R - Read\Write
P - Present (as in "here")

Page Table
G - Global
D - Dirty
A - Accessed
C - Cache Disabled
W - Write Through
U - User\Supervisor
R - Read\Write
P - Present (as in "here")

For the Page Table:

Global is a protection bit. It prevents updating of a cached address if the CR3 is reset. CR4 allows updating.

Accessed discloses whether a page has been read or written to. Neutral is for A bit to not be set. When a page is read or written to, A bit becomes set.

Dirty is a protection bit. D bit shows if a page has been written to.

C bit, Cache Disabled, is a protection bit. It prevents cahcing if the C bit is set. (C bit corresponds to D bit in Directory Table.)

Write-through enables write-through instead of write-back when the W bit is enabled.

User\Supervisor is a protection bit. It controls the privilege level. If the U bit is set, it allows access to all users. If not set, however, supervisors only have access.

Read\Write is a protection bit. When the R bit is set, it allows read\write access to all. When not set, write is restricted and the page is read-only.

Present (as in "here"), P bit, when not set, causes a fault page to occur if a page is called but no longer present because of being swapped out. If P bit is set, the page is present in physical memory.

Analogy

One analogy used to explain Page Table protection bits is a high quality road map. Not only do road maps provide keys and directories for finding physical address and physical locations of things and places, e.g., monuments, national parks, playgrounds, Best Buy stores, they also provide protection advisories about such things as roads under construction, i.e., dotted lines, and narrowing of highways, freeways and turnpikes into "bottle necks," i.e., changes in lanes marked.

Images

The two images attached are part of the article "Paging" available from OSDev.org.

Images:
This image has been Flagged as inappropriate Click to unflag
Image (1 of 2)
This image has been Flagged as inappropriate Click to unflag
Image (2 of 2)
Sources:

We’ve answered 318,980 questions. We can answer yours, too.

Ask a question