Content deleted Content added
No edit summary |
Guy Harris (talk | contribs) Give more details on segmentation, which lets us get rid of segmented memory and just redirect it here; the rest of the stuff in segmented memory is a bit dubious |
||
Line 1:
{{Unreferenced|date=July 2007}}
'''Segmentation''' is one of the most common ways to achieve [[memory protection]]; another common one is [[paging]].
In addition to the set of permissions and length, a segment also has associated with it information indicating where the segment is located in memory. It may also have a flag indicating whether the segment is present in main memory or not; if the segment is not present in main memory, an exception is delivered, and the [[operating system]] will read the segment into memory from secondary storage. The information indicating where the segment is located in memory might be the address of the first ___location in the segment, or might be the address of a [[page table]] for the segment. In the first case, if a reference to a ___location within a segment is made, the offset within the segment will be added to address of the first ___location in the segment to give the address in memory of the referred-to item; in the second case, the offset of the segment is translated to a memory address using the page table.
In most systems in which a segment doesn't have a page table associated with it, the address of the first ___location in the segment is an address in main memory; in those systems, no [[paging]] is done. In the [[Intel 80386]] and later, that address can either be an address in main memory, if paging is not enabled, or an address in a paged "linear" address space, if paging is enabled.
For details of [[x86]]'s implementation of segmentation in both 16-bit and 32-bit mode, please see the article on [[memory segment]]s.▼
This usage should not be confused with that of the [[memory segment]]s used by early [[x86]] processors such as the [[Intel 8086]] and [[Intel 8088]], as they did not provide any protection; segmentation in the [[Intel 80286]] and later provided protection.
▲For details of [[x86]]'s implementation of segmentation in both 16-bit and 32-bit mode, please see the article on [[memory segment]]s.
== See also ==
* [[Virtual memory]]
* [[Text segment]]
|