Definition
Paging
Paging is a memory management technique eliminating the need for contiguous physical memory allocation. It divides logical address space into fixed-size pages and physical memory into same-sized frames.
A logical address is divided into a page number and page offset. The page table translates page number to frame number:
- Page size: Power of two (e.g., 4KB) for simple bit-wise translation
- Physical Address: Binary concatenation of frame number and offset (no addition needed)
Analogy
Carpet Tiles
Paging is like covering a floor with fixed-size carpet tiles:
- Most tiles fit perfectly; only the last page may need trimming (minimal internal fragmentation)
- More efficient than a “large carpet” (segmentation) requiring custom cutting and creating unusable scraps (external fragmentation)
Properties
No External Fragmentation
Any free frame can be assigned to any page.
Minimal Internal Fragmentation
Limited to the last page of a process (if size is not a multiple of page size).
Simplified Management