Example: Segmentation, partial allocation


The processes are divided into segments, each segment can be a different size. The segments are loaded into memory independently, a partition of the exact segment size is created. The division is functional and is based on the logical process structure: data, stack, code, etc ...

Not necessarily all the segments have to be loaded into memory for the program to work, while a segment is not used it can be swapped out.


Process Total
Size
Units
Segment Size
Units
Initially
allocated
P1 20 Code 2 YES
    Data 10 YES
    Stack 8 NO
P2 20 Code 5 YES
    Data 14 NO
    Stack 1 YES
P3 40 Code 10 YES
    Data 20 YES
    Stack 10 YES

Processes are allocated in the table order. Memory size is 64 units, Operating System takes 4 units

Comments: