Exercises — Von Neumann architecture — components, bottleneck
Every symbol used here was built in the parent note. As a one-line refresher:
Level 1 — Recognition
L1.1
Which single design choice defines the Von Neumann architecture, and what is the contrasting architecture?
Recall Solution
Defining choice: instructions and data live in one shared memory, reached over one shared bus. Contrast: Harvard Architecture, which gives instructions and data separate memories and separate buses, so it can fetch an instruction and access data at the same time. The distinguishing word is shared, not exists — every computer has a CPU and memory.
L1.2
Name the five classic components of a Von Neumann machine, and say which of them combine to form the CPU.
Recall Solution
Memory, Control Unit (CU), Arithmetic Logic Unit (ALU), Input/Output (I/O), Bus. The CU + ALU + registers together form the CPU. (A register is a tiny fast storage slot inside the CPU — see the definition box above and CPU Registers.) Mnemonic: My Computer Always Is Busy → M-C-A-I-B.
L1.3
In the formula , what does the "" physically represent? What would mean?
Recall Solution
The "" is the instruction fetch — the one bus trip you always make to bring the instruction into the CPU, before touching any data. (Recall from the box above that the whole denominator is , the total bus words per instruction.)
means an instruction that touches no data at all (e.g. a NOP or a register-only operation like "clear a flag"). Then , so : the bus is used only for fetching instructions and nothing slows it further.
Level 2 — Application
L2.1
A memory bus delivers words/s. Instructions average data accesses. Find .
Recall Solution
What we do: count words per instruction (), then divide the bus throughput by it. Why: 1 word to fetch the instruction + 3 words of data. (Recall GIPS = giga-instructions/sec = instructions/sec, defined in the tools box.) Even a CPU that could "think" faster is capped at 1 billion instructions/second by the bus.
L2.2
A CPU computes an instruction's logic in ns but waits ns for memory each time. Find the utilisation , and state the idle percentage.
Recall Solution
Why this formula: is useful time ÷ total time. Total time per instruction . The CPU is doing useful work only 25% of the time, so it is idle 75% of the time — waiting at the door.
L2.3
Same machine as L2.2. We add a cache: 95% of memory accesses now hit a fast cache ( ns), 5% miss to slow memory ( ns). Find the average access time.
Recall Solution
Why a weighted average: each access is either a hit or a miss; weight each time by how often it happens. We cut the effective wait from a possible 20 ns down to 1.95 ns without touching the bus — this is Memory Hierarchy and Caching hiding the bottleneck, not removing it.
Level 3 — Analysis
L3.1
Machine A: words/s, . Machine B: words/s, . Which runs more instructions per second? By what factor?
Recall Solution
Why compute both: a bigger does not automatically win — the effective divisor matters too. B wins, despite its slower bus, because its instructions are "leaner" (). B is 1.5× faster in instructions/sec. Lesson: reducing (fewer memory operands per instruction) can beat raw bus speed — this is part of why a lean Instruction Set Architecture matters.
L3.2
A program runs 60% instructions with and 40% instructions with . The bus supplies words/s. Find the effective .
The figure below shows the idea: each instruction type is drawn as a stacked bar — a yellow block for the single instruction fetch () sitting under a blue block for its data words (). The type reaches a total height of ; the type reaches . A red dashed line marks the weighted mean bar height, , which is the average bus load per instruction we then divide by.

Recall Solution
Why an average : different instructions cost different numbers of bus trips; weight each cost by how often it runs. First average : Now be careful going from to . Each instruction's cost is , so the average cost is The constant "" appears in every term, so it factors straight out of the weighted sum (the weights ): That is why — the fixed fetch cost is not being averaged, only the variable data cost is. So: The blue blocks in the figure are the data traffic; the taller the stacked bar, the more bus trips that instruction type costs. Weighting those heights by how often each type runs gives the red dashed mean, .
L3.3
A designer says: "My memory is now twice as fast, so my utilisation doubles." Given ns and originally ns, check whether exactly doubles when is halved to ns.
Recall Solution
Original: . After halving : . Doubling would predict . Actual is — not double. Why: is not linear in ; sits in the denominator too, so halving helps less than proportionally. The claim confuses "halve the wait" with "double the useful fraction."
Level 4 — Synthesis
L4.1
You must speed up a Von Neumann machine. Option (a): double the bus speed . Option (b): redesign the instruction set so average data accesses drop from to . Starting from and , express the IPS gain of each option as a multiple, and say which wins.
Recall Solution
Baseline: . Option (a) — double : Option (b) — drop to 1: Both give exactly . Why the coincidence (in words): IPS is a fraction, . There are two ways to double any fraction: double its top or halve its bottom — both land on the same value. Option (a) doubles the top (). Option (b) halves the bottom: the divisor goes from down to , which is exactly half. Since "double the top" and "halve the bottom" always produce the same doubled fraction, the two very different engineering changes must give the identical result. The design lesson: reducing memory traffic per instruction can be just as powerful as buying faster hardware — and it is often cheaper. This is the philosophy behind register-heavy Instruction Set Architecture and CPU Registers.
L4.2
Explain, using the bottleneck idea, why Harvard Architecture can in principle reach a higher instruction rate than a Von Neumann machine even with the same memory speed. Then give the two-bus throughput expression.
Recall Solution
Why Von Neumann stalls: one bus carries both the instruction fetch (1 word) and the data ( words), so they must serialize — total trips on one channel. Harvard's move: put instructions on their own bus and data on their own bus . Now the two streams flow in parallel instead of taking turns. The instruction rate is limited by whichever bus finishes last: Domain note (): the term divides by , so it is only meaningful when . If the data bus carries nothing, so it never limits anything; the rate is then set purely by the instruction bus, . (Formally, take only over the buses that are actually used.) For every problem on this page , so we use the full expression. With equal-speed buses and : , versus Von Neumann's — since , Harvard is faster. Same memory speed, higher rate — because there is no contention, purely by splitting the channel. This connects to Buses (Address, Data, Control) and the Fetch-Decode-Execute Cycle overlapping fetch with data access.
Level 5 — Mastery
L5.1
Design task. A workload has . You have a fixed budget that lets you either:
- Plan P: build a Von Neumann machine with a single bus of words/s, or
- Plan Q: build a Harvard machine with two buses, instruction bus and data bus words/s.
Compute the max instruction rate of each and recommend one. Then state one non-performance reason someone might still pick Plan P.
Recall Solution
Plan P (Von Neumann): Plan Q (Harvard), with so the full applies: Recommendation: Plan P ( GIPS GIPS). Why Q lost: with , the data bus is the bottleneck — GIPS drags the whole machine down. Splitting the channel only helps if you split the throughput sensibly for the workload; here the data-heavy program starves the narrow data bus. Non-performance reason to still favour Plan P: the Stored Program Concept — a single unified memory lets programs be treated as data (self-modifying code, JIT compilation, simple loaders, one address space). Harvard's split memories make treating instructions as writable data awkward. Simplicity and flexibility, not just speed.
L5.2
Prove algebraically that a Von Neumann machine with bus never beats a Harvard machine (buses ) on the same workload , and find the exact ratio of their max instruction rates.
Recall Solution
Domain: we assume , so that is well-defined and the data bus actually carries traffic. (The case is handled in L4.2: there Harvard while Von Neumann , a tie — so the strict inequality below needs .) Von Neumann rate: Harvard rate (equal buses ): For we have , so , which means the data bus is the slower one and Take the ratio (Harvard over Von Neumann): Conclusion: since for every , the ratio is always strictly greater than 1 — so , i.e. Von Neumann never beats Harvard here. The exact advantage is a factor . Why the advantage shrinks as grows: as instructions carry more and more data, the data bus dominates both designs, so the "free" parallel instruction bus becomes a smaller slice of total work. Check the extremes: at the ratio is (Harvard doubles the rate); at it is (only 10% faster). Harvard's edge is largest for lean, data-light instruction streams.
Active Recall
Recall One-line answers to lock it in
Why is the divisor and not ? ::: You always spend one bus trip fetching the instruction before touching any data. When can a slower bus win on IPS? ::: When its instructions are leaner (smaller ), because the effective divisor is smaller. Why doesn't halving double ? ::: also sits in the denominator, so is non-linear in . Harvard vs Von Neumann speed ratio at equal buses? ::: — always above 1, shrinking as grows. Why keep Von Neumann despite Harvard being faster? ::: The stored-program idea (code as data) needs one unified writable memory.