Segmentation Flashcards
What is segmentation?
Memory management scheme that supports user view of memory, ie (filename.txt)
How does segmentation work?
Logical address space is collection of segments, contains associated data.
Addresses are 2D
Segments addressed by some fixed id numbe
What constructs segmentation?
The compiler
How is addressing implemented in segmentation?
Logical addresses are 2-dimensional, physical are 1.
Address mapping via segment table, which is a per-process table.
How are the address translated?
Segment number is an index into segment table. Offset is then checked against the limit.
Add offset to base to get physical address
How is fragmentation affected by this?
Contiguous allocation of physical memory means external fragmentation may occur.
Compaction can be done at any time, but is expensive.
What is the solution to the fragmentation issues?
Page the segments
How does segmentation affect protection?
Advantageous, represent semantically defined portions of the program. Likely that all data in a segment will be used in the same way.
Can have protection levels per segment.
How is paged segmentation done?
Each segment is a paged address space, segment number indexes segment table - base address and offset combined.
Page table for segment used as normal.