CSS Prepare

optional · CSS study notes

Harvard and Non-Neumann Architecture (2017)

CSS Optional — Paper-II, Section-A · Chapter 7 · 📌 Explicitly flagged in your textbook as asked in CSS 2017

The distinction is about one design decision: should instructions and data share the same memory and the same pathway to the CPU, or should they be kept separate?

⚠️ A note on the topic title. Your textbook prints "Non-Neumann," but the correct term is Von Neumann, named after mathematician John von Neumann, who described the stored-program architecture in his 1945 First Draft of a Report on the EDVAC. Use "Von Neumann" in the exam.

🗺️ Architecture Diagram — Von Neumann vs Harvard

graph TD
    subgraph VN["Von Neumann"]
        VNC["CPU"] <--> VNB["Single Shared Bus"]
        VNB <--> VNM["Unified Memory
Instructions + Data"]
    end
    subgraph HV["Harvard"]
        HVC["CPU"] <--> HIB["Instruction Bus"]
        HVC <--> HDB["Data Bus"]
        HIB <--> HIM["Instruction Memory"]
        HDB <--> HDM["Data Memory"]
    end

1. Von Neumann Architecture

Core idea — the stored-program concept: instructions and data are both stored in the same memory, in the same format, reachable over the same bus.

This was revolutionary. Earlier machines like ENIAC were rewired physically to change their program, taking days. Storing the program as data meant a machine could be reprogrammed in seconds — and, crucially, a program could treat another program as data, which makes compilers, assemblers, and operating systems possible.

Five classical components:

  1. Memory — holds both instructions and data
  2. Control Unit — fetches and decodes instructions
  3. ALU — performs computation
  4. Input — brings data in
  5. Output — sends results out

(Control Unit + ALU + registers together form the CPU.)

The Von Neumann Bottleneck ⭐

Because there is only one bus between CPU and memory, the processor cannot fetch an instruction and read/write data in the same cycle — the two operations must be serialised.

As CPU speeds grew far faster than memory speeds, this shared pathway became the dominant limit on performance. The term was coined by John Backus in his 1977 Turing Award lecture. The entire memory-hierarchy apparatus — see Cache Memory — exists largely to mitigate this bottleneck.

A second consequence worth mentioning: because instructions and data are indistinguishable in memory, a bug or attack that overwrites data can also overwrite executable code. This is the architectural root of buffer-overflow exploits — a good security-flavoured point for an essay-style answer.

2. Harvard Architecture

Core idea: instructions and data live in physically separate memories, each with its own bus.

  • The CPU can fetch the next instruction at the same time as it reads or writes data — genuine parallelism at the memory interface.
  • The two memories can have different word widths (e.g., 16-bit instructions with 8-bit data), which suits embedded designs.
  • Program memory is typically read-only in operation, giving natural protection against code corruption.

Cost: more pins, more buses, more complex hardware, and inflexible memory allocation — unused instruction memory cannot be repurposed as data memory.

Where it is used: DSPs, and microcontrollers such as the AVR (Arduino) and PIC families — see Processor Types.

3. Modified Harvard Architecture ⭐

Almost every modern general-purpose CPU uses this hybrid, and mentioning it is what distinguishes a strong answer.

  • Main memory is unified (Von Neumann style) — one address space holding both code and data.
  • The L1 cache is split into a separate I-cache (instruction cache) and D-cache (data cache), each with its own path to the core (Harvard style).

The result: the flexibility and simple programming model of Von Neumann, with the parallel-fetch performance of Harvard at the level where it matters most — closest to the CPU. Intel x86, AMD, and ARM Cortex-A processors all work this way.

4. Comparison Table (high-yield)

FeatureVon NeumannHarvard
MemorySingle, sharedTwo separate memories
BusesOne shared busSeparate instruction & data buses
Simultaneous fetch❌ Not possible✅ Possible
SpeedSlower (bottleneck)Faster
Hardware complexitySimpler, cheaperMore complex, costlier
Memory flexibilityHigh — any location holds eitherLow — fixed partition
Word sizeSame for bothCan differ
Code-corruption riskHigherLower
Typical useGeneral-purpose PCs, serversDSPs, microcontrollers
ExamplesClassic x86 modelAVR, PIC, ARM Cortex-M

🧮 Solved Numerical 1 — Quantifying the Bottleneck

Q: A processor must fetch an instruction (1 memory access) and then load a data operand (1 memory access) for each instruction. Each memory access takes 10 ns. Compare the time for 1,000 instructions on a Von Neumann versus a Harvard machine.

Von Neumann — accesses are sequential over one bus:

Tinstr=Tfetch+Tdata=10+10=20 nsTtotal=1000×20 ns=20,000 ns=20 μs\begin{aligned} T_{instr} &= T_{fetch} + T_{data} = 10 + 10 = 20\ \text{ns} \\ T_{total} &= 1000 \times 20\ \text{ns} = 20{,}000\ \text{ns} = 20\ \mu\text{s} \end{aligned}

Harvard — accesses overlap over two buses:

Tinstr=max⁡(Tfetch,Tdata)=max⁡(10,10)=10 nsTtotal=1000×10 ns=10,000 ns=10 μs\begin{aligned} T_{instr} &= \max(T_{fetch}, T_{data}) = \max(10, 10) = 10\ \text{ns} \\ T_{total} &= 1000 \times 10\ \text{ns} = 10{,}000\ \text{ns} = 10\ \mu\text{s} \end{aligned}

Speedup:

TVNTH=2010=2×\frac{T_{VN}}{T_{H}} = \frac{20}{10} = 2\times

Answer: Von Neumann 20 μs, Harvard 10 μs — a 2× speedup.

This calculation is the Von Neumann bottleneck expressed numerically, and it is the cleanest way to demonstrate the concept in an exam answer.

🧮 Solved Numerical 2 — Effective Bandwidth

Q: A Von Neumann machine has one 32-bit bus at 100 MHz. A Harvard machine has two 32-bit buses at 100 MHz. Compare peak memory bandwidth.

Bandwidth per bus:

B=328×100×106=4×100,000,000=400 MB/s\begin{aligned} B &= \frac{32}{8} \times 100 \times 10^{6} \\ &= 4 \times 100{,}000{,}000 \\ &= 400\ \text{MB/s} \end{aligned}

Total bandwidth:

BVN=1×400=400 MB/sBH=2×400=800 MB/s\begin{aligned} B_{VN} &= 1 \times 400 = 400\ \text{MB/s} \\ B_{H} &= 2 \times 400 = 800\ \text{MB/s} \end{aligned}

Answer: 400 MB/s vs 800 MB/s — Harvard doubles peak bandwidth. (Bus bandwidth formula covered in BUS.)

🧮 Solved Numerical 3 — Partial Overlap in Practice

Q: On a Harvard machine, instruction fetch takes 10 ns but a data access takes 15 ns. What is the effective time per instruction, and what speedup over Von Neumann does this give?

TH=max⁡(10,15)=15 nsTVN=10+15=25 ns\begin{aligned} T_{H} &= \max(10, 15) = 15\ \text{ns} \\ T_{VN} &= 10 + 15 = 25\ \text{ns} \end{aligned}

Speedup:

Speedup=TVNTH=2515≈1.67×\text{Speedup} = \frac{T_{VN}}{T_{H}} = \frac{25}{15} \approx 1.67\times

Answer: 1.67×. Note this is less than the 2× of Numerical 1 — overlapping only helps up to the slower of the two operations. The bottleneck moves rather than disappearing, which is a sophisticated point to make in an answer.


🎯 CSS Exam Angle

📌 Your textbook explicitly flags this as a CSS 2017 question, and it recurs regularly. It also pairs naturally with the Fundamental Concepts architecture-vs-organization distinction, so examiners sometimes combine them.

A full-marks answer contains:

  1. Both block diagrams — Von Neumann (one memory, one bus) and Harvard (two memories, two buses). Draw these; they are quick marks.
  2. The comparison table.
  3. The Von Neumann bottleneck explained, ideally with the numerical above.
  4. The Modified Harvard paragraph — this is the discriminator that lifts an answer above rote reproduction.

🔁 Repeated CSS Questions

  1. Differentiate between Von Neumann and Harvard architecture with diagrams. (Asked CSS 2017 — repeated)
  2. What is the Von Neumann bottleneck? How does Harvard architecture address it?
  3. Explain the stored-program concept and its significance.
  4. Explain Modified Harvard architecture and why modern general-purpose CPUs adopt it.
  5. Why do microcontrollers and DSPs prefer Harvard architecture while PCs use Von Neumann?
  6. List the five basic components of the Von Neumann model.

⚠️ MCQ Traps

  • Modern desktop CPUs are Modified Harvard, not pure Von Neumann. They have a unified main memory but split L1 instruction/data caches. Marking x86 as "pure Von Neumann" is the most common error here.
  • The Von Neumann bottleneck is about the shared bus/pathway, not about memory being slow in itself. Slow memory is a separate problem solved by caching.
  • Harvard is faster but less flexible — a fixed split means spare instruction memory cannot be reused for data.
  • The stored-program concept belongs to Von Neumann architecture, and it is the reason a computer can be reprogrammed without rewiring.
  • In Harvard machines the instruction and data words may be different widths — a distinguishing feature frequently tested.
  • Correct spelling is Von Neumann (a person's name), not "Non-Neumann" as printed in some local textbooks.

📜 Past-Paper Questions & MCQs (CSS 2016–2026)

2017 · Paper-I · Q2(b) · 6 marks

Q. Describe the difference between Harvard and Von Neumann architectures of computers. Also discuss their traits in the light of their capabilities.

Ans.

BasisVon NeumannHarvard
MemoryOne memory for both instructions and dataSeparate memories for instructions and data
BusesOne shared busSeparate buses for instructions and data
FetchInstruction and data cannot be fetched at the same time (the "von Neumann bottleneck")Both can be fetched at the same time
PerformanceShared instruction/data path may create a bottleneckSeparate paths allow simultaneous instruction and data access; real performance still depends on implementation
Cost and complexitySimpler and cheaperMore complex and costly
FlexibilityMemory is shared freely, and programs can modify themselvesFixed split between code and data memory
Used inGeneral-purpose systems commonly expose a unified memory address spaceEmbedded processors, DSPs; modern CPUs often use split L1 instruction/data caches with unified main memory

Six-mark example and conclusion: During an instruction fetch and data load, a simple Von Neumann machine with one shared memory path must arbitrate access, whereas a Harvard machine can use independent instruction and data paths in parallel. This improves potential throughput but increases hardware complexity and reduces flexibility in using code/data memory. In practice, modern CPUs frequently combine both approaches through a unified address space with separate L1 caches.

MCQs

2024 P-II · Q1. Which of the following are computer architectures different from the conventional von Neumann architecture?

  • (A) MIT architecture
  • (B) Harvard architecture ✅
  • (C) Turing architecture
  • (D) None of these
  • Answer: (B) Harvard architecture.
  • Why: Harvard architecture keeps instructions and data in separate memories with separate buses, unlike von Neumann's single shared memory. "MIT architecture" is not a standard computer architecture. The Turing machine is a theoretical model of computation, not a computer architecture.