Computer Organisation and Architecture · Memory Interfacing
Concept of Memory Interleaving Across Modules
Overview
Memory interleaving distributes the words of memory across several independent memory modules instead of storing them consecutively in one module, so that consecutive words can be accessed in parallel.
It matters because programs typically request blocks of consecutive words, and interleaving reduces the time for such a block from one access per word to a single access time.
Key concepts
- Memory interleaving: a technique in which the words of memory are distributed across several independent memory modules rather than stored consecutively in a single module; the modules can be accessed in parallel, so a request for several consecutive words is served in the time of one access instead of one access per word.
- Motivation: a program rarely reads just one word; it typically requests consecutive words (for example 4 words or 10 words).
If those words all lie in one module they must be read one after another; if they lie in different modules that can be accessed in parallel, they are read together. - Round-robin distribution: consecutive words are placed in successive modules — word 1 in module 1, word 2 in module 2, word 3 in module 3, word 4 in module 4, then word 5 in module 1, word 6 in module 2, word 7 in module 3, word 8 in module 4, and so on.
- Hard disk application: the same idea can be applied to a hard disk by distributing words across platters/surfaces, each with its own read/write head; the detailed disk case is a separate topic.
How it works
- The request: the processor asks for a block of consecutive words — word 1, word 2, word 3, word 4.
- Non-interleaved (single-module) arrangement: all four words are placed in one memory module and must be read sequentially — word 1, then word 2, then word 3, then word 4, one after the other.
The total time is the sum of four access times, so the program runs slower. - Interleaved arrangement: the words are distributed over four different modules — module 1 holds word 1, module 2 holds word 2, module 3 holds word 3, module 4 holds word 4.
The next group repeats the pattern: word 5 in module 1, word 6 in module 2, word 7 in module 3, word 8 in module 4, and so on. - Parallel access: because words 1–4 sit in four distinct modules, all four are fetched simultaneously in one memory access time. Operating the modules in parallel is exactly what gives the efficiency.
Formulas
-
— time for consecutive words without interleaving, where is the number of consecutive words requested and is the access time of one memory module.
-
— time for words with interleaving (one word per module, all accessed in parallel); valid when the number of modules is at least and all modules can be driven simultaneously.
-
— speedup from interleaving.
Worked examples
4 consecutive words, access time = 100 ns.
Non-interleaved case (all 4 words in one module):
| Word | Module | Time spent |
|---|---|---|
| word 1 | module 1 | 100 ns |
| word 2 | module 1 | 100 ns |
| word 3 | module 1 | 100 ns |
| word 4 | module 1 | 100 ns |
| Total | 100 + 100 + 100 + 100 = 400 ns |
Interleaved case (words spread over four modules):
| Word | Module | Time spent |
|---|---|---|
| word 1 | module 1 | 100 ns (parallel) |
| word 2 | module 2 | 100 ns (parallel) |
| word 3 | module 3 | 100 ns (parallel) |
| word 4 | module 4 | 100 ns (parallel) |
| Total | 100 ns (all four fetched in parallel) |
The pattern continues: word 5 → module 1, word 6 → module 2, word 7 → module 3, word 8 → module 4, and so on.
Result: 400 ns → 100 ns, a speedup of 4 for words.
Comparison
| Aspect | Words in a single module (no interleaving) | Words distributed over modules (interleaving) |
|---|---|---|
| Access of consecutive words | Sequential, one after another | Parallel, all at once |
| Time for 4 words at 100 ns | 400 ns | 100 ns |
| Speed | Slower | Faster (speedup ≈ number of modules used) |
| Requirement | One module | Multiple independent modules that can be accessed in parallel |
Revision summary
- Programs request blocks of consecutive words ( words, e.g. 4 or 10), not single words — this is why interleaving helps.
- Memory interleaving means multiple memory modules with the words distributed among them so that consecutive words fall in different modules.
- Consecutive words go round-robin: word 1 → module 1, word 2 → module 2, word 3 → module 3, word 4 → module 4, word 5 → module 1, and so on.
- With words in modules accessed in parallel, time is one access time instead of access times; speedup is .
- Numerical anchor: 4 words at 100 ns access time → 400 ns without interleaving, 100 ns with interleaving.
- The parallel-time formula holds only when the number of modules is at least and all modules can be driven simultaneously.
- The same interleaving idea applies to hard disks (distribution across platters/surfaces with separate read/write heads).
Previous-year exam insights
- In low-order (address) interleaving, consecutive addresses go to consecutive banks (address mod m selects the bank); in high-order interleaving, each bank holds a contiguous block of addresses, so consecutive words fall in the same bank and cannot be fetched in parallel.
Asked inGATE 2006UGC NET 2022 - With m banks and a block of k consecutive words, the number of parallel rounds is ⌈k/m⌉;
accesses to the same bank must be serialized, so total time = ⌈k/m⌉·(bank cycle time) + (k−1)·(bus transfer time).
Asked inGATE 2006 - Interleaved memory average access time per word: if successive requests go to different banks (for example consecutive addresses, address spacing 1 with n banks), the average time per word approaches T/n (T = bank cycle time);
if successive requests all fall in the same bank (spacing a multiple of n), the average time is T.
Asked inUGC NET 2022 - Cached memory best suits small loops (high temporal locality, small working set); interleaved memory best suits large sequential code (streaming consecutive words).
Asked inUGC NET 2012 - Organizing memory into two banks so that 8-bit and 16-bit data operations are both possible is called two-way memory interleaving (bank switching is a different concept).
Asked inISRO 2009 - Interleaving increases effective bandwidth (words per unit time) by overlapping bank accesses; it does not reduce the access time of a single isolated word, which is still one bank cycle time.