Segmentation: Generalized Base/Bounds
Get introduced to the concept of segmentation which improves the utilization of the memory space.
We'll cover the following
To solve this problem, an idea was born, and it is called segmentation.
- Code
- Stack
- Heap
What segmentation allows the OS to do is to place each one of those segments in different parts of physical memory, and thus avoid filling physical memory with unused virtual address space.
Example
Let’s look at an example. Assume we want to place the address space from the figure here into physical memory. With a base and bounds pair per segment, we can place each segment independently in physical memory. For example, see the figure below; there you see a 64KB physical memory with those three segments in it (and 16KB reserved for the OS).
Get hands-on with 1400+ tech skills courses.