Memory protection in a paged environment is accomplished by protection bits that are associated with each frame.
The one bit
Normally, these bits are kept in the page table. One bit can define a page to be read-write or read-only.
The protection bits can be checked to verify that no writes are being made to a read-only page. An attempt to write to a read-only page causes a hardware trap to the operating system (or memory-protection violation)
Expand one bit
Providing a finer level of protection. We can create hardware to provide read-only, read-write, or execute-only protection. Or, by providing separate protection bits for each kind of access, we can allow any combination of these access; illegal attempts will be trapped to operating system.
One more bits
One more bits is generally attached to each entry in the page table: a valid-invalid bit.
When this bit is set to “valid”, this value indicates that the associated page is in the process’ logical-address space, and is thus a legal (or valid) page.
If the bit is set to “invalid”, this value indicates that the page is not in the process’s logical-address space. Illegal address are trapped by using the valid-invalid bit.
The operating system sets this bit for each page to allow or disallow accesses to that page.
page-table length register
Raely does a process use all its address range. In fact, many processes use only a small faction of the address space available to them. It would be wasteful in these causes to create a page with entries for every page in the address range. Most of this table would be unused, but would take up valuable memory space.
Some system provide hardware, in the form of a page-table length register (PTLR), to indicate the size of the page table. This value is checked against every logical address to verify that the address is in the valid range for the process. Failure of this test causes an error trap to the operating system.
Operating System – Page II
yinquanProtection
Memory protection in a paged environment is accomplished by protection bits that are associated with each frame.
The one bit
Normally, these bits are kept in the page table. One bit can define a page to be read-write or read-only.
The protection bits can be checked to verify that no writes are being made to a read-only page. An attempt to write to a read-only page causes a hardware trap to the operating system (or memory-protection violation)
Expand one bit
Providing a finer level of protection. We can create hardware to provide read-only, read-write, or execute-only protection. Or, by providing separate protection bits for each kind of access, we can allow any combination of these access; illegal attempts will be trapped to operating system.
One more bits
One more bits is generally attached to each entry in the page table: a valid-invalid bit.
When this bit is set to “valid”, this value indicates that the associated page is in the process’ logical-address space, and is thus a legal (or valid) page.
If the bit is set to “invalid”, this value indicates that the page is not in the process’s logical-address space. Illegal address are trapped by using the valid-invalid bit.
page-table length register
Raely does a process use all its address range. In fact, many processes use only a small faction of the address space available to them. It would be wasteful in these causes to create a page with entries for every page in the address range. Most of this table would be unused, but would take up valuable memory space.
Some system provide hardware, in the form of a page-table length register (PTLR), to indicate the size of the page table. This value is checked against every logical address to verify that the address is in the valid range for the process. Failure of this test causes an error trap to the operating system.
You might also like
Operating System – Page III
Structure of the Page Table The most common techniques for structuring the page table Hierarchical Paging...
Operating System – Page I
The memory-management scheme that permits the physical-address space of a process to be noncontiguous....
Operating System MM IV
In the contiguous memory allocation,each process is contained in a single continuous section of memory....