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

7.5Interleaving

The idea

Interleaving spreads consecutive addresses over several banks so they can be accessed in overlapping time.

Think of it like this: Four cashiers handling a long queue in rotation instead of one.

Why it exists

A single bank can start a new access only after the last finishes; many banks give more bandwidth.

How it works

  1. Low-order interleaving: bank = address mod M.
  2. Consecutive words are in different banks, so accesses overlap.
  3. High-order: contiguous region in one bank, no overlap.
  4. Speedup approaches M for sequential access.

Worked example: 4 banks, 8 sequential words, access time 2 cycles

Low-order: 9 cycles. All in one bank: 16 cycles.

Now play with it

  • →Compare the two tabs; see that in low-order a new word starts every cycle.
123456789
Bank 0w0w0w4w4
Bank 1w1w1w5w5
Bank 2w2w2w6w6
Bank 3w3w3w7w7

Word i is in bank i mod 4. One word is issued per cycle and four accesses overlap: 8 words in 9 cycles (access time 2 cycles).

Check yourself

With 4-way low-order interleaving, which bank holds word address 13?

Remember: Low-order interleaving makes sequential accesses parallel.
Exam notes (the dense version)

Low-order: consecutive addresses in consecutive banks → sequential access overlaps (high bandwidth). High-order: bank by top bits → contiguous region per bank, no overlap.

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.