Difference between revisions of "Segment"
m (Jnc moved page Segment to Segmentation: Writeup makes this the main term) |
(Expand discussion on uses) |
||
Line 1: | Line 1: | ||
− | '''Segmentation''' (using '''segments''') is an enhancement to the | + | '''Segmentation''' (using '''segments''') is an enhancement to the memory naming semantics of some [[Central Processing Unit|CPU]] [[architecture]]s. Segments are blocks of memory identified by a '''segment number'''. |
− | Most CPUs support a linear (single axis) [[address space]]; memory locations are defined by a single number, the address. With segmentation, the CPU's address space | + | Most CPUs support a linear (single axis) [[address space]]; memory locations are defined by a single number, the address. With segmentation, the CPU's address space can best be seen as a two-axis matrix: the segment number on one axis, and then the offset [[byte]]/[[word]] within the segment on the other; memory locations are named by a tuple (segment and offset). |
− | + | ==Uses== | |
− | Segmentation is also used in building [[single-level store]] systems. | + | Segmentation has been used to expand the amount of main memory accessible to a given CPU architecture (as in the [[Intel x86]] architecture]]), but this usage is often somewhat of a kludge, a way to expand the amount of memory accessible to an existing CPU architecture later in its life. |
+ | |||
+ | Generally the preferred approach is to simply give a CPU a larger linear address space; this generally means making word, and [[instruction]], sizes larger, which was not always an economically viable option when [[main memory]] was much smaller, and much more expensive. (For example, in the [[PDP-8]].) | ||
+ | |||
+ | Segmentation is also used in building [[single-level store]] systems, where it is a much more natural tool. It ''is'' however ''possible'' to build such systems with CPUs which support only a very large 'flat' address space, mapping the segments into blocks of that address space. | ||
{{stub}} | {{stub}} |
Revision as of 16:39, 16 April 2018
Segmentation (using segments) is an enhancement to the memory naming semantics of some CPU architectures. Segments are blocks of memory identified by a segment number.
Most CPUs support a linear (single axis) address space; memory locations are defined by a single number, the address. With segmentation, the CPU's address space can best be seen as a two-axis matrix: the segment number on one axis, and then the offset byte/word within the segment on the other; memory locations are named by a tuple (segment and offset).
Uses
Segmentation has been used to expand the amount of main memory accessible to a given CPU architecture (as in the Intel x86 architecture]]), but this usage is often somewhat of a kludge, a way to expand the amount of memory accessible to an existing CPU architecture later in its life.
Generally the preferred approach is to simply give a CPU a larger linear address space; this generally means making word, and instruction, sizes larger, which was not always an economically viable option when main memory was much smaller, and much more expensive. (For example, in the PDP-8.)
Segmentation is also used in building single-level store systems, where it is a much more natural tool. It is however possible to build such systems with CPUs which support only a very large 'flat' address space, mapping the segments into blocks of that address space.