Segmentation is a memory-management scheme that supports
programer view of memory. A logical address space is a
collection of segments.
OR
Non contiguous approach in every part of a memory is known as
segmentation
What is the programmer view of memory? Does the programmer
think of memory as a linear array of bytes, some containing data,
or some other preferred memory view ? There is general
agreement that the programmer of a system does not think of
memory as a linear array of bytes.
Each segment has a name and a length. The address specify both the
segment name and the offset(displacement) within the segment.
For simplicity of implementation, segments are referred by a
segment number, rather than by a segment name. Thus, a logical
address consists of a two tuple:
<segment-number , offset>
Normally, the user program is compiled, and the compiler
automatically constructs segments reflecting the input
program.
A ‘C’ compiler might create separate segments for the
following:
• Data
• Stack
• Heap
• Code
these all are linked in during compile time might be assigned
separate segments. The loader would take all these segments
and assign them segment numbers.
We define an implementation to map two dimentional user-define
address into one-dimentional physical address.
This mapping is affected by a segment table. Each entry in the
segment table has a segment base and a segment limit.
The segment base contain the starting physical address where the
segment resides in memory, whereas the segment limit specifies
the length of the segment.
In the next example, consider the situation . We have five segments
numbered from 0 to 4. the segments are stored in physical memory
as shown you in the segment table.
The segment table has a separate entry for each segment, giving the
beginning address of the segment in physical memory (base) and the
length of the segment(limit).
It has no internal fragmentation
May save memory if segments are very small and should not be
combined into one page
It has external fragmentation
Segments of unequal size not suited as well for
swapping
THANK YOU

ppt on Segmentation in operationg system

  • 1.
    Segmentation is amemory-management scheme that supports programer view of memory. A logical address space is a collection of segments. OR Non contiguous approach in every part of a memory is known as segmentation
  • 2.
    What is theprogrammer view of memory? Does the programmer think of memory as a linear array of bytes, some containing data, or some other preferred memory view ? There is general agreement that the programmer of a system does not think of memory as a linear array of bytes.
  • 3.
    Each segment hasa name and a length. The address specify both the segment name and the offset(displacement) within the segment. For simplicity of implementation, segments are referred by a segment number, rather than by a segment name. Thus, a logical address consists of a two tuple: <segment-number , offset>
  • 4.
    Normally, the userprogram is compiled, and the compiler automatically constructs segments reflecting the input program. A ‘C’ compiler might create separate segments for the following: • Data • Stack • Heap • Code these all are linked in during compile time might be assigned separate segments. The loader would take all these segments and assign them segment numbers.
  • 5.
    We define animplementation to map two dimentional user-define address into one-dimentional physical address. This mapping is affected by a segment table. Each entry in the segment table has a segment base and a segment limit. The segment base contain the starting physical address where the segment resides in memory, whereas the segment limit specifies the length of the segment.
  • 7.
    In the nextexample, consider the situation . We have five segments numbered from 0 to 4. the segments are stored in physical memory as shown you in the segment table. The segment table has a separate entry for each segment, giving the beginning address of the segment in physical memory (base) and the length of the segment(limit).
  • 9.
    It has nointernal fragmentation May save memory if segments are very small and should not be combined into one page
  • 10.
    It has externalfragmentation Segments of unequal size not suited as well for swapping
  • 11.