Segmented memory: Difference between revisions
m +pt:iw |
No edit summary |
||
Line 5: | Line 5: | ||
Segmentation has often been used as a technique for overcoming [[address space]] limitations of computer hardware. As computer memory systems transitioned from [[core memory]] to semiconductor memory, and as [[DRAM]] has continued to grow denser, quite a number of older computer architectures simply did not have the ability to address memory. Rather than force their user community to switch to a different vendors hardware, computer manufacturers would implement a segmentation capability to allow programs written for an older architecture to continue to operate. A program could 'switch' the segment that it was using, perhaps by setting a value in a register or via a [[system call]], in order to use an alternate memory space in a different segment. |
Segmentation has often been used as a technique for overcoming [[address space]] limitations of computer hardware. As computer memory systems transitioned from [[core memory]] to semiconductor memory, and as [[DRAM]] has continued to grow denser, quite a number of older computer architectures simply did not have the ability to address memory. Rather than force their user community to switch to a different vendors hardware, computer manufacturers would implement a segmentation capability to allow programs written for an older architecture to continue to operate. A program could 'switch' the segment that it was using, perhaps by setting a value in a register or via a [[system call]], in order to use an alternate memory space in a different segment. |
||
Segmentation has also been used as a technique to share common instructions and data between processes. The [[Multics]] system was a key early example of using segmentation. Under Multics, even data files were treated as segments and mapped into the programs address |
Segmentation has also been used as a technique to share common instructions and data between processes. The [[Multics]] system was a key early example of using segmentation. Under Multics, even data files were treated as segments and mapped into the programs address spaced. |
||
=== 808x Memory Segments === |
=== 808x Memory Segments === |
Revision as of 19:09, 28 March 2007
Segmented memory is a technique used in computer hardware to divide memory up into smaller, more manageable units. Memory segments are managed by a memory management unit (MMU), under operating system control. Segmented memory capabilities have been available in a variety of computer systems since the earliest days of computing. Memory segments are distinct from memory pages in that segments are usually much larger than a page, and can often be of variable size.
An advantage of using segments is that segments, like pages, do not need to be physically contiguous with each other in memory. The MMU is responsible for translating addresses generated by a program into physical addresses in physical memory. Since there are relatively few segments, compared to the number of pages, faster address translation may be possible.
Segmentation has often been used as a technique for overcoming address space limitations of computer hardware. As computer memory systems transitioned from core memory to semiconductor memory, and as DRAM has continued to grow denser, quite a number of older computer architectures simply did not have the ability to address memory. Rather than force their user community to switch to a different vendors hardware, computer manufacturers would implement a segmentation capability to allow programs written for an older architecture to continue to operate. A program could 'switch' the segment that it was using, perhaps by setting a value in a register or via a system call, in order to use an alternate memory space in a different segment.
Segmentation has also been used as a technique to share common instructions and data between processes. The Multics system was a key early example of using segmentation. Under Multics, even data files were treated as segments and mapped into the programs address spaced.
808x Memory Segments
Segmented memory originated with the 8080 processor which used 16-bit addressing and thus had an address space of 64KB. The 8086 processor incorporated the 64KB segment so that 8080 code could easily translate to run on the 8086. There are three types of segments, code for instructions, data for operands, and stack for parameters and temporary values. The 8086 processor allowed for six active memory segments using six registers each of which held the beginning address of the active segment. Addressing in segmented mode was accomplished by a selector:offset pair. The 16-bit selector value is loaded into one of the registers. The contents of the 16-bit register are then multiplied by 16 to give a 20-bit address space. (The contents of the register were left shifted four bits.) The offset is then added to the result giving a linear memory address. The total address space realized was 1MB (1024K).