← 🏛️ Memory Hierarchy & Main Memory
Subtopic 7 of 7

7.7Page table size

The idea

Page-table size follows from how many virtual pages exist: one entry per page.

Think of it like this: A phone book with one line per person: more people, bigger book.

Why it exists

It shows why big address spaces need multi-level page tables.

How it works

  1. offset bits = log2(page size).
  2. VPN bits = virtual address bits − offset bits.
  3. entries = 2VPN bits.
  4. Table size = entries × entry size.

Worked example: 32-bit VA, 4 KB pages, 4 B entries

Offset 12, VPN 20, entries 220, size = 4 MB.

Now play with it

  • →Change the page size and see how the table shrinks as pages grow.
Offset bits12
VPN bits20
Virtual pages10,48,576
Frames2,62,144
Frame number bits18
Page table size4.00 MB

Page table size = (number of virtual pages) × (PTE size).

Check yourself

32-bit virtual addresses, 4 KB pages, 4-byte entries. Page table size?

Remember: Table size = (2^VPN bits) × entry size.
Exam notes (the dense version)

Number of entries = virtual pages. Multi-level reduces memory for sparse use. Inverted page table: one entry per physical frame.

Previous year questions: Memory Hierarchy & Main Memory (16)

PYQs are grouped by topic, so this is the full set for Memory Hierarchy & Main Memory; try the ones that match this subtopic. Open all 16 on the topic page.