Paging Can Do It All

If segmentation is eliminated and Paging is used, the Paging Unit can provide complete protection, as well as the paging capability described in the previous chapter. The Paging Unit provides the following checks on each memory access attempt:

  • A privilege check using the PTE's U/S bit.

  • Read/write permission checking using the PTE's R/W bit.

When a memory access is attempted, the Paging Unit deals with one of three cases:

  1. The target page is currently in memory (P = 1 in the PTE). Assuming that the currently executing program has sufficient privilege to access the page and that it's not attempting to write to a read-only page, the access is permitted.

  2. The target page isn't in memory (P = 0 in the PTE). This results in a Page Fault exception. The Page Fault handler examines the 32-bit linear address and determines whether or not the target page belongs to the currently executing program. If it does, the page is read into memory and the PTE is updated with the page location and the P bit is set to one. The access that caused the fault is then restarted and completes successfully.

  3. The target page isn't in memory (P = 0 in the PTE). This results in a Page Fault exception. The Page Fault handler examines the 32-bit linear address and determines whether or not the target page belongs to the currently executing program. If the page doesn't belong to the program, the OS alerts the end user that the program has attempted an unauthorized memory access and shuts the offending program down.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.177.85