Jump to content

Segmented memory

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Guy Harris (talk | contribs) at 04:04, 13 November 2007 (We need non-x86-specific articles about segmentation; memory segment is the x86-specific article. Point to it, rather than giving a tiny bit about x86 segmentation here.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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.

See also