
CMSC 412
Spring 2007
Memory Management:
Paging and Segmentation
Announcements
• Reading:
– Chapter 8 (except 8.1.2 - 8.1.5)
– Chapter 9 (next time)
Logical vs. Physical Addresses
• The concept of a logical address space
that is bound to a separate physical
address space is central to proper
memory management.
–Logical address – generated by the CPU;
also referred to as virtual address.
–Physical address – address seen by the
memory unit.
Basic Relocation Hardware
Contiguous Allocation
• Main memory usually in two partitions:
– Resident operating system, usually held in
low memory with interrupt vector.
– User processes held in high memory.
• Single-partition allocation
– Subdivide user-space into fixed-size
chunks of memory. Each process gets a
full chunk.
• What if the process doesn’t need that much?
• What if it needs more?
Contiguous Allocation
• Multiple-partition allocation
–Hole – block of available memory; holes of
various size are scattered throughout memory.
– When a process arrives, it is allocated memory
from a hole large enough to accommodate it.
– Operating system maintains information about:
a) allocated partitions b) free partitions (hole)
OS
process 5
process 8
process 2
OS
process 5
process 2
OS
process 5
process 2
OS
process 5
process 9
process 2
process 9
process 10