written 5.7 years ago by | • modified 5.7 years ago |
In segmentation a program data and instruction are divided into block called segments, A segment is a logical entity in a program.
Programmer's view of segment is as follow:
Physical view:
It consist of non-adjacent of memory allocated to segments.
All segments size may or may not be equal and segment can be implemented with or without paging.
Collection of segment is called as logical addr space.
Each segment is identified by its name.
Processor generates logical address, these addresses consist of segment number and an effect in the segment and segment number is used as index to segment page table.
- Operating system maintain a segment table for each process. it is usually stored in main memory as a segment that in net to be loaded as long as the process can run.
Each entry in the segment table has a segment base and segment limit.
the base contains the segment relocation register for the target segment.
The segment limit field contains the length of the segment.
Segment table contains the physical address of the start of segment then add the offset to the base and generates the physical address.