Content deleted Content added
Citation bot (talk | contribs) Alter: title. Add: s2cid, doi, pages, issue, volume. Formatted dashes. | Use this bot. Report bugs. | Suggested by Whoop whoop pull up | #UCB_toolbar |
Redundant reword cleanup |
||
Line 4:
Segments usually correspond to natural divisions of a program such as individual routines or data tables<ref name="holt1961"/> so segmentation is generally more visible to the programmer than [[paging]] alone.<ref name="englander"/>
Segmentation was originally invented as a method by which [[system software]] could isolate
==Hardware implementation==
Line 20:
Segmentation is one method of implementing [[memory protection]].<ref name="ostep-1">{{cite book|title=Operating Systems: Three Easy Pieces|chapter=Segmentation|chapter-url=http://pages.cs.wisc.edu/~remzi/OSTEP/vm-segmentation.pdf|publisher= Arpaci-Dusseau Books|year = 2014|first1 = Remzi H.|last1 =Arpaci-Dusseau|first2=Andrea C.|last2 = Arpaci-Dusseau}}</ref> [[Page (computer memory)|Paging]]<!-- please, do not "simplify" or "fix" the link. The [[paging]] article is about a virtual memory technique, not about memory protection --> is another, and they can be combined. The size of a memory segment is generally not fixed and may be as small as a single [[byte]].<ref>{{cite book|publisher=Intel Corporation|title=Intel® 64 and IA-32 Architectures Software Developer's Manual Volume 3 (3A, 3B & 3C): System Programming Guide|year=2012|pages=3–13|url=http://download.intel.com/products/processor/manual/325384.pdf}}</ref>
Segmentation has been implemented
===Segmentation without paging===
Line 28:
===Segmentation with paging===
Instead of
When a program references a memory ___location the offset is translated to a memory address using the page table. A segment can be extended
An implementation of [[virtual memory]] on a system using segmentation with paging usually only moves individual pages back and forth between main memory and secondary storage, similar to a paged non-segmented system. Pages of the segment can be located anywhere in main memory and need not be contiguous. This usually results in a reduced amount of input/output between primary and secondary storage and reduced memory fragmentation.
Line 88:
| publisher = IBM
}}
</ref> (DAS), which allows a program to switch between the translation tables for two
===x86 architecture===
{{Main|x86 memory segmentation}}
The memory segmentation used by early [[x86]] processors, beginning with the [[Intel 8086]], does not provide any protection. Any program running on these processors can access any segment with no restrictions. A segment is only identified by its starting ___location; there is no length checking. The segment starting address granularity is 16 bytes and the offset is 16 bits, supporting segment sizes up to 64 KiB, so segments can (and often do) overlap and each physical address can be denoted by 4096
Segmentation in the [[Intel 80286]] and later provides protection: with the introduction of the 80286, Intel retroactively named the sole operating mode of the previous x86 CPU models "[[real mode]]" and introduced a new "[[protected mode]]" with protection features. For backward compatibility, all x86 CPUs start in "real mode" with no memory protection, fixed 64 KiB segments, and only 20-bit (1024 KiB) addressing. An 80286 or later processor must be switched into another mode by software in order to use its full address space and advanced MMU features.
|