operating-systems

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:

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

Simplifies loading and swapping as the OS only manages fixed-size blocks.