8 Memory Management
8 Memory Management
8 Memory Management
Background
Major part of swap time is transfer time; total transfer time is directly
proportional to the amount of memory swapped
p d
m-n n
Shared code
One copy of read-only (reentrant) code shared
among processes (i.e., text editors, compilers,
window systems).
Shared code must appear in same location in
the logical address space of all processes
4
1
3 2
4
Protection
With each entry in segment table associate:
validation bit = 0 illegal segment
read/write/execute privileges
Protection bits associated with segments; code
sharing occurs at segment level
Since segments vary in length, memory
allocation is a dynamic storage-allocation
problem
A segmentation example is shown in the
following diagram
Segmentation Hardware
Example of Segmentation