General Protection Fault - Memory Errors

Memory Errors

In memory errors, the faulting program accesses memory that it should not access. Examples include:

  • Attempting to write to a read-only portion of memory
  • Attempting to execute bytes in memory which are not designated as instructions
  • Attempting to read as data bytes in memory which are designated as instructions
  • Other miscellaneous conflicts between the designation of a part of memory and its use

However, many modern operating systems implement their memory access-control schemes via paging instead of segmentation, so it is often the case that invalid memory references in operating systems such as Windows are reported via page faults instead of general protection faults. Operating systems typically provide an abstraction layer (such as exception handling or signals) that hides whatever internal processor mechanism was used to raise a memory access error from a program, for the purposes of providing a standard interface for handling many different types of processor-generated error conditions.

In terms of the x86 architecture, general protection faults are specific to segmentation-based protection when it comes to memory accesses. However, general protection faults are still used to report other protection violations (aside from memory access violations) when paging is used, such as the use of instructions not accessible from the current privilege level.

While it is theoretically possible for an operating system to utilize both paging and segmentation, for the most part, common operating systems typically rely on paging for the bulk of their memory access control needs.

Read more about this topic:  General Protection Fault

Famous quotes containing the words memory and/or errors:

    The secret of success in society, is a certain heartiness and sympathy. A man who is not happy in the company, cannot find any word in his memory that will fit the occasion. All his information is a little impertinent. A man who is happy there, finds in every turn of the conversation equally lucky occasions for the introduction of that which he has to say.
    Ralph Waldo Emerson (1803–1882)

    When a Man is in a serious Mood, and ponders upon his own Make, with a Retrospect to the Actions of his Life, and the many fatal Miscarriages in it, which he owes to ungoverned Passions, he is then apt to say to himself, That Experience has guarded him against such Errors for the future: But Nature often recurs in Spite of his best Resolutions, and it is to the very End of our Days a Struggle between our Reason and our Temper, which shall have the Empire over us.
    Richard Steele (1672–1729)