Professional Documents
Culture Documents
Abstract—this term paper gives an introduction to segmented Third, "demand paging" permits advantage to be taken of any
virtual memory. What is segmented virtual memory? When it area of reference irregular to a program by moving to core
was first implemented. What are the purposes for using only those pages of segments which are currently needed.
segmented virtual memory? How it works. The architecture of
x86 processor will be discussed.
Any additional overheads associated with demand paging
should of course be evaluated against the alternative
Keywords— Virtual memory, Segmented virtual memory, uselessness associated with dedicating core to entire segments
History, Hardware Implementation, x86 Architecture, Object
which must be swapped into core but which may be only
Files and Conclusion
partly referenced.
I. VIRTUAL MEMORY
Virtual memory is the memory which is allocated to a process Finally, demand paging allows the user a greater degree of
when the primary memory is full for a certain process. There machine freedom in that a large program designed to run well
are two types of virtual memories. in a large core memory configuration will continue to run at
• Paged Virtual Memory reduced performance on smaller configurations.
• Segmented Virtual Memory
C. HARDWARE IMPLEMENTATION In a
segmented virtual memory the blocks to be replaced in main
Segmentation is a memory management system. A logical
memory are potentially of unequal length and correspond to
address space is a collection of segments. Each segment has a
program and data segments. A data segment might be a data
name and a length. The addresses specify both the segment
structure or an array. In both cases, segments correspond to
name and offset within the segment. Therefore, the user has to
logical blocks of code or data. Segments, then, are atomic, in
specify each address by segment name and an offset. For
the sense that either the whole segment should be in main
simplicity of implementation, segments are numbered and are
memory, or none of the segment should be there. The
referred by a segment number than a segment name thus a
segments may be placed anywhere in main memory, but the
logical address consists of two tuples (segment-number,
instructions or data in one segment should be contiguous as
offset). Normally the user program is compiled and the
shown in figure below,
compiler automatically constructs the segments. A ‘C’
compiler might create segments for the code, global variables,
the heap (from which memory is allocated), the stacks used by
SEGMENT 1
each thread and the standard C library. Segments that are
linked in during compile time might be assigned separate Size of this segment(0-150)
segments. The loader will take all these segments and assign
them segment numbers. A logical address consists of two SEGMENT 5
parts, a segment number s and an offset into that segment, d.
Size of this segment(0-130)
The segment number is used as an index to the segment table.
The offset d of the logical address must between 0 and
segment length. When the offset is legal, it is added to the SEGMENT 7
segment base to produce the address in physical memory of Size of this segment(0-100)
the desired byte. The segments are stored in physical memory.
The segment table has a separate entry for each segment, SEGMENT 9
giving the beginning address of the segment in the physical
Size of this segment(0-70)
memory and the length of that segment. Each segment has no
fixed size. If the length of one segment starts from 0 and ends
SEGMENT 2
at 200 then the second one does not start from 200 to 210 it
will start from 0 to 10. Size of this segment(0-50)
SEGMENT 4
VI. CONCLUSIONS
Segmented Virtual Memory allows for the protection and
relocation of processes, memory segments as well as the
sharing of libraries between processes.