Definition
Memory Partitioning
Memory partitioning divides main memory into sections (partitions) to store multiple processes simultaneously.
Strategies
Fixed Partitioning
Main memory divided into a static set of non-overlapping partitions.
- Equal sizes: Simple but causes high internal fragmentation
- Unequal sizes: Better fit for processes of different sizes
Dynamic Partitioning
Partitions of variable length and number created as processes are loaded.
Problem: Terminated processes leave “holes”, causing external fragmentation.
Solution: Compaction shifts active partitions to consolidate holes.
Buddy System
Compromise between fixed and dynamic partitioning using power-of-two block sizes. See Buddy System.
Placement Strategies
First Fit
Allocate the first block large enough. Fastest and often most efficient.
Best Fit
Choose the smallest block that is large enough. Minimises leftover hole size but creates many tiny unusable holes.
Next Fit
Like first fit, but starts search from the location of the last allocation.
Historical Techniques
Overlays
If a program exceeded partition size, programmers divided it into independent modules loaded into the same memory space at different times. Required manual management. Rendered obsolete by Virtual Memory.