• ↑↓ pour naviguer
  • pour ouvrir
  • pour sélectionner
  • ⌘ ⌥ ↵ pour ouvrir dans un panneau
  • ←→ pour naviguer
  • esc pour rejeter
⌘ '
raccourcis clavier

The Problem

Contiguous memory allocation requires a process to be loaded in one continuous block of RAM, causing external fragmentation (wasted gaps between processes). We need non-contiguous allocation.

Core Idea

Paging divides processes into fixed-size pages and RAM into page frames, allowing non-contiguous allocation and eliminating external fragmentation.

How It Works

  1. Process is divided into pages (e.g., 4KB each)
  2. RAM is divided into page frames of same size
  3. Page table maps each page to a frame in RAM
  4. CPU generates logical address = page number + offset
  5. MMU uses page table to translate to physical address = frame number + offset
paging cluster_proc Process (Virtual Memory) cluster_ram RAM (Physical Memory) P0 Page 0 PT Page Table maps pages to frames P0->PT Page 0 → P1 Page 1 P1->PT Page 1 → P2 Page 2 P2->PT Page 2 → F5 Frame 5 PT->F5 F2 Frame 2 PT->F2 F7 Frame 7 PT->F7

Key Properties

  • Eliminates external fragmentation (pages can be anywhere)
  • Fixed-size pages simplify allocation
  • Page table overhead per process
  • Internal fragmentation within pages (last page may not be full)

Connections

Edge Cases & Gotchas

  • Internal fragmentation: last page partially filled wastes space
  • Page table size grows with process size (use multi-level page tables)
  • Every memory access needs page table lookup (slow → use TLB)