අන්තර්ගතයට යන්න
mcqdinethlive

Von Neumann architecture from stored program to bottleneck

Von Neumann architecture through the stored-program concept: the model, the fetch-execute cycle, the OS links, the bottleneck, its fixes and limits, and the Unit 13 trends.

සිංහලෙන් කියවන්න

This post explains von Neumann architecture through one idea, the stored-program concept: the program sits in the same memory as its data. The Sinhala syllabus calls it "ආචිත ක්‍රමලේඛ සංකල්පය" (විෂය නිර්දේශය 2.3, පිටුව 9). Students meet this idea in three units: the model in Unit 2, processes in Unit 5 and "beyond von Neumann" in Unit 13.

The post has five parts:

  • What the idea is and how it runs: the model, its history and the fetch-execute cycle (sections 1 to 3).
  • What it gives the operating system: processes, the PCB, interrupts and memory protection (section 4).
  • What it costs: the von Neumann bottleneck, the improvements inside the model and their limits (sections 5 to 7).
  • What comes after it: the Unit 13 technologies (section 8).
  • How the exam tests it: past paper questions by section (section 9).

1. The stored-program idea in one picture

The Teachers' Guide gives the model in three sentences. The architecture has a CPU, memory and input output devices. "The program is stored in the memory." The CPU fetches one instruction at a time from memory and executes it (Teachers' Guide 2.3, page 67) (ගුරු අත්පොත 2.3, පිටුව 73). The Sinhala Guide calls the model "වොන් නියුමාන් ආකෘතිය". It says the memory holds both "දත්ත සහ උපදෙස්" (data and instructions) (ගුරු අත්පොත 2.3, පිටුව 72), and it writes the stored-program sentence as "පරිගණක වැඩසටහන තැන්පත් වන්නේ පරිගණක මතකයෙහි ය" (ගුරු අත්පොත 2.3, පිටුව 73).

The Sinhala Guide has a misprint on page 73. It prints the CPU's name as "මධ්‍යම සැපයුම් ඒකකය". The right name is "මධ්‍යම සැකසුම් ඒකකය" (central processing unit), as page 72 prints it.

The syllabus lists the parts (Syllabus 2.3, page 8) (විෂය නිර්දේශය 2.3, පිටුව 9):

  • Control unit (CU). It controls the signals of all devices of the computer system (Teachers' Guide 2.3, page 67) (ගුරු අත්පොත 2.3, පිටුව 72). The Sinhala Guide calls it "පාලන ඒකකය".
  • Arithmetic and logic unit (ALU). It carries out mathematical and logical operations. The Sinhala Guide calls it "අංක ගණිතමය සහ තාර්කික ඒකකය".
  • Registers. Small data holding places inside the processor. A register "may hold an instruction, a storage address, or any kind of data" (Teachers' Guide 2.3, page 67) (ගුරු අත්පොත 2.3, පිටුව 72). The Sinhala Guide calls registers "මතක රෙජිස්තර".
  • Memory. It holds the program and the data.
  • Input and output devices.
  • Buses. Sets of wires that carry data and control signals between the parts.

Look at the memory box again. It does not have one part for programs and a different part for data. Instructions and data are both binary words in one memory. The CPU uses the same buses to read both. Keep this picture in mind. Every other section of this post comes from it.

The Sinhala names differ too. The Sinhala Guide calls a bus "පථය". But the 2025 Sinhala paper says "යොමු (address) බසය", "දත්ත (data) බසය" and "පාලන (control) බසය". One thing has two Sinhala names, so remember the English names.

2. Before the stored program

The stored-program idea was new because the first electronic computers did not keep their program in memory.

Programs on tape and in cables

The Harvard Mark I read its instructions from punched paper tape. Its data sat in separate counters. This design, with separate stores for instructions and data, is now called the Harvard architecture (Harvard architecture).

ENIAC was the first electronic digital computer, by John Mauchly and J. Presper Eckert (Teachers' Guide 2.1, page 56) (ගුරු අත්පොත 2.1, පිටුව 62). It was "originally programmed by electrically connecting subsystems with cables" (Stored-program computer). A new program meant new wiring.

The 1945 report

In 1945, John von Neumann wrote the First Draft of a Report on the EDVAC. It described a machine that keeps its program in its memory. The typed report is dated 30 June 1945, and only von Neumann's name is on it (First Draft of a Report on the EDVAC).

The name "von Neumann architecture" is not fully fair. The report did not name the ENIAC designers, Eckert and Mauchly. Some members of the EDVAC team said that the idea came from earlier team meetings (First Draft of a Report on the EDVAC). The idea also has a theory root: Alan Turing's 1936 universal machine, which von Neumann knew (Stored-program computer).

The first machines that worked

The two media do not agree either. The English Guide names EDVAC as the first stored-program computer. The Sinhala Guide gives that place to EDSAC and calls it "ලොව ප්‍රථම ආචයන ක්‍රමලේඛන පරිගණකය". The same Sinhala page gives Pascal's calculator as 1644. The English page says 1642.

3. The fetch-execute cycle

The CPU runs a stored program with the fetch-execute cycle. The Teachers' Guide shows three steps: fetch an instruction from memory, decode it, execute it (Teachers' Guide 2.3, page 68) (ගුරු අත්පොත 2.3, පිටුව 73). The Sinhala Guide calls the cycle "සෙවුම්- ඉෂ්ට චක්‍රය". But the Sinhala syllabus calls it "ආහරණ-ක්‍රියාකරවුම් චක්‍රය" (විෂය නිර්දේශය 2.3, පිටුව 9). One thing has two Sinhala names, so this post uses the English name.

Follow one turn of the cycle:

  1. Fetch. The program counter holds the address of the next instruction. The Sinhala Guide calls it "වැඩසටහන් ගණකය" (ගුරු අත්පොත 5.3, පිටුව 147). The CPU sends this address to memory on the address bus. The control bus carries the read signal. The instruction comes back on the data bus into a register.
  2. Decode. The control unit reads the instruction and finds what it must do.
  3. Execute. The ALU or another part does the work. This can need more memory reads or writes, for data this time.
  4. Next. The program counter moves to the next instruction, and the cycle starts again.

Now see the stored-program idea at work. In step 1, the CPU reads an instruction from memory. In step 3, it can read data from the same memory, on the same buses. The memory does not know which word is an instruction. Only the program counter decides that.

4. The stored program and the OS lesson

The operating system lesson in Unit 5 depends on the stored-program idea at every step.

A program in memory becomes a process

The Teachers' Guide says that "a process is basically a program in execution" (Teachers' Guide 5.3, page 134) (ගුරු අත්පොත 5.3, පිටුව 145). The Sinhala Guide says "ක්‍රියාකාරී තත්වයේ පවතින ක්‍රමලේඛයක්". To run a program, the OS copies it into main memory. This works only because a program is data that the OS can load. On a machine like ENIAC, "loading a program" meant wiring.

The PCB saves the fetch-execute cycle

The Process Control Block (PCB) keeps the program counter of each process. The Guide calls it "a pointer to the address of the next instruction to be executed for this process". It also keeps the CPU registers (Teachers' Guide 5.3, page 136) (ගුරු අත්පොත 5.3, පිටුව 147). The Sinhala Guide calls the PCB "ක්‍රියායන පාලන ඛණ්ඩය".

These are the same registers from section 3. During a context switch, the OS "saves the content of all processor registers" of the old process in its PCB (Teachers' Guide 5.3, page 137) (ගුරු අත්පොත 5.3, පිටුව 148). The Sinhala Guide calls a context switch "සන්දර්භ ස්විචය". Later, it puts the values back, and the fetch-execute cycle continues from the same instruction.

Interrupts change the next instruction

The Guide says an interrupt "is an event that alters the sequence of execution of process" (Teachers' Guide 5.3, page 135) (ගුරු අත්පොත 5.3, පිටුව 145). The Sinhala Guide calls it "අතුරුබිඳුම", "ක්‍රියායනයක ක්‍රියාකාරීත්ව පෙළගැස්ම වෙනස් කරන සිදුවීමක්". In von Neumann terms, an interrupt changes the program counter. The CPU then fetches instructions from a different place in memory.

One memory for many programs

In multiprogramming, many programs are in memory at the same time. Their code and data share one memory. Thus, the OS must stop one program from changing the memory of another. Virtual memory helps here: each virtual address is translated to a physical address, and this gives memory protection (Teachers' Guide 5.4, page 142). The Sinhala Guide explains the address mapping by the memory management unit (MMU) (ගුරු අත්පොත 5.4, පිටුව 152) and calls virtual memory "අතථ්‍ය මතකය" (ගුරු අත්පොත 5.4, පිටුව 153). But its pages 152 and 153 do not have the sentence about memory protection. The idea is the same.

5. The von Neumann bottleneck

The stored-program idea has a cost. The CPU and the memory talk through one path. Every instruction and every piece of data must travel on it.

In 1977, John Backus gave this problem a name in his Turing Award lecture. He described "a connecting tube that can transmit a single word between the CPU and the store". Then he wrote: "I propose to call this tube the von Neumann bottleneck" (Backus, 1978). This idea is outside the syllabus, but it explains why the syllabus has a level on "beyond von Neumann".

The problem became worse over time. Processor speed grew much faster than memory speed. In 1995, Wulf and McKee called the result the memory wall: the CPU spends more and more time waiting for memory (Wulf and McKee).

Here is an example. Think of a fast cook in a kitchen with one narrow door to the store room. The cook can work very fast. But each ingredient and each page of the recipe must come through the same door. A faster cook does not help much. A wider door, or a shelf next to the cook, helps more.

6. Improvements inside the von Neumann model

Engineers kept the model and added parts to hide the bottleneck. Two of these parts are in the syllabus. Two are not.

Cache memory (2.4)

This part is in the syllabus. A cache is a small, very fast memory near the CPU. The Teachers' Guide says it stores "program instructions that are frequently accessed" (Teachers' Guide 2.4, page 70) (ගුරු අත්පොත 2.4, පිටුව 77). The Sinhala Guide calls cache "වාරක මතකය" and says it keeps "නිතර භාවිත වන උපදෙස්". L1 cache is very fast and small, and it is usually inside the processor chip. L2 and L3 are larger and slower (Teachers' Guide 2.4, page 71) (ගුරු අත්පොත 2.4, පිටුව 77). Maurice Wilkes, the EDSAC builder, proposed this idea in 1965 under the name "slave memory" (Wilkes, 1965).

In the cook example, the cache is the shelf next to the cook. Most trips to the store room are not needed.

Split instruction and data caches

This part is outside the syllabus. Most modern processors split the L1 cache into an instruction cache and a data cache. The CPU can fetch an instruction and read data at the same time. But the program still sees one memory, so the stored-program idea stays. This design is called the modified Harvard architecture (Modified Harvard architecture).

The Teachers' Guide line on page 70 says only "program instructions" for cache. The Sinhala Guide on page 77 also says only "උපදෙස්". A cache keeps data too. In a split L1 cache, one half is for data only.

Pipelining

This part is outside the syllabus. The fetch-execute cycle has separate steps. Pipelining overlaps them. While the CPU executes instruction 1, it decodes instruction 2 and fetches instruction 3. It is "a technique for implementing instruction-level parallelism within a single processor" (Instruction pipelining). The IBM Stretch project (1956 to 1961) gave us the words Fetch, Decode and Execute (same source).

Multi-core processors (2.3)

This part is in the syllabus. A multi-core processor has two or more cores on one chip. Each core reads and executes program instructions. Thus, the processor "can run multiple instructions on separate cores at the same time" (Teachers' Guide 2.3, page 68) (ගුරු අත්පොත 2.3, පිටුව 74). The Sinhala Guide calls it "බහු-හර සකසන". The Guide gives three needs. Run parts of a program in parallel. Enable parallel programming. Get high performance from one machine (Teachers' Guide 2.3, page 68) (ගුරු අත්පොත 2.3, පිටුව 74).

7. Limits of the improvements

Each improvement helps. None of them removes the bottleneck. Some of them bring new problems.

More cores share the same memory

Each core has its own registers and L1 cache. But the cores share the main memory. When many cores need memory at once, they compete for the same path (the shared path from section 5). The bottleneck is shared, not removed. (This last point is reasoning, not a quotation.)

Heat stops the speed race

The Resource Book gives the reason that chip makers moved to many cores, in its models of computing pages (13.3). More and more transistors at higher speed make "excessive heat" (Resource Book 13.3, page 147) (Resource Book 13.3, පිටුව 165). Hennessy and Patterson describe the same turn: the end of Dennard scaling and the slowdown of Moore's law (Hennessy and Patterson, 2019).

Moving data costs more than computing

Mutlu and others write about this cost. They say "data movement is very expensive in terms of bandwidth, energy and latency, much more so than computation" (Mutlu et al., 2019). This is the von Neumann bottleneck again, measured in energy.

Guessing ahead can leak secrets

A deep pipeline guesses which instructions come next, so that it does not stop. In 2018, researchers showed Spectre. It uses this speculative execution to trick programs into leaking their secrets (Spectre). A speed improvement became a security problem. This links to security in Unit 6, but Spectre itself is outside the syllabus.

8. Beyond von Neumann in Unit 13

The syllabus asks students to predict "the technologies beyond von-Neumann computers" (Syllabus 13.3, page 49) (විෂය නිර්දේශය 13.3, පිටුව 47). The Sinhala syllabus says "වොන් නියුමාන් පරිගණකයෙන් ඔබ්බට තාක්ෂණ පුරෝකථනය". The Resource Book says that the von Neumann computer "has now been pushed to its extreme limits of capabilities" (Resource Book 13.3, page 147) (Resource Book 13.3, පිටුව 165). Sections 5 and 7 showed those limits: the bottleneck, the memory wall and heat.

The Sinhala books spell the name in two ways. The Sinhala syllabus and Teachers' Guide write "නියුමාන්". The Sinhala Resource Book's figure 5.5 writes "වොන් නියුමන් නිර්මිතය" (Resource Book 13.3, පිටුව 165). Both mean the same person. We think the spelling difference does not cost marks in the exam, but this is our guess, not an official rule.

In the syllabus

  • Quantum computing. A classical bit has two states. A quantum computer uses quantum physics and "can represent information using multiple states" (Resource Book 13.3, page 147) (Resource Book 13.3, පිටුව 165). The Sinhala Resource Book calls it "ක්වොන්ටම් පරිගණනය".
  • Nature-inspired computing. Researchers copy how ant colonies, beehives and flocks of birds process information. Examples are neural networks, swarm intelligence and evolutionary computation (Resource Book 13.3, pages 147 and 148) (Resource Book 13.3, පිටුව 166). The Sinhala Resource Book calls it "ප්‍රකෘති අනුප්‍රේරිත පරිගණන".
  • Biology-inspired computing. Examples are membrane computing, from the way living cells work, and artificial immune systems (Resource Book 13.3, page 148) (Resource Book 13.3, පිටුව 166). The Sinhala syllabus calls it "ජෛව අනුප්‍රේරිත පරිගණනය" (Syllabus 13.3, page 49) (විෂය නිර්දේශය 13.3, පිටුව 47).

Current research outside the syllabus

  • In-memory computing. Do the work inside or near the memory, so that the data does not travel to the CPU. This attacks the bottleneck directly (Mutlu et al., 2019).
  • Neuromorphic chips. In 2014, IBM described TrueNorth, a chip with one million spiking neurons. Its authors call it a "non-von Neumann architecture". It processed video while it used only 63 milliwatts (Merolla et al., 2014).

9. Past paper questions on von Neumann

The examiners test this idea from Unit 2 to Unit 13. The von Neumann architecture (2.3) appears in 7 of the 8 new-syllabus papers, with 5 MCQs and 9 Paper II marks in total. Models of computing (13.3) also appear in 7 of 8, with 7 MCQs and 5 Paper II marks. The 2023 (held 2024) paper has no official scheme, so its marks are estimates.

Students should try these questions before reading any answer. The answers are not in this post. The section in brackets shows where to check.

  • 2025 Paper I, Q6 and 2026 Paper I, Q4: which buses take part in a memory read (sections 1 and 3).
  • 2021 (held 2022) Paper I, Q4: loading a program, the program counter and the fetch-decode-execute cycle (sections 3 and 4).
  • 2026 Paper I, Q5 and 2025 Paper I, Q7: the program counter and what registers hold (section 3).
  • 2020 Paper II, A, Q3(a)(ii) and 2022 (held 2023) Paper II, A, Q4(c): the steps of the fetch-execute cycle (section 3).
  • 2024 Paper II, B, Q10(a): the CPU instructions for one Python statement (sections 1 and 3).
  • 2023 (held 2024) Paper I, Q5: context switch and interrupt change the instructions the CPU runs (section 4).
  • 2024 Paper II, B, Q10(c)(iii): the program counter in the PCB at a context switch (section 4).
  • 2021 (held 2022) Paper II, B, Q10(c)(i) and (ii): many tasks on one processor, and programs larger than physical memory (section 4).
  • 2020 Paper I, Q1 and 2021 (held 2022) Paper II, B, Q10(a)(iii): cache and volatile memory (section 6).
  • 2021 (held 2022) Paper II, B, Q10(a)(ii): the need for many processors in one computer (sections 6 and 7).
  • 2020 Paper I, Q50, 2024 Paper I, Q50, 2026 Paper I, Q49 and 2026 Paper II, B, Q7(c): quantum computing (section 8).
  • 2019 Paper I, Q33, 2020 Paper I, Q49 and 2025 Paper I, Q50: nature-inspired and biology-inspired computing (section 8).

Old syllabus, for extra practice only:

  • 2017 Paper I, Q1: who first proposed the stored-program concept. Read section 2 first. The history is less simple than one name.
  • 2011 Paper I, Q33: what held back progress beyond the von Neumann architecture (sections 5 and 7).
  • 2014 Paper II, A, Q4(a) and 2016 Paper II, A, Q4(b): address bus width and how much memory it can address (section 1).

Sources outside the syllabus

The syllabus, Teachers' Guide and Resource Book pages, English medium and Sinhala medium, are cited in the text. These are the other sources:

  • John Backus, "Can Programming Be Liberated from the von Neumann Style? A Functional Style and Its Algebra of Programs", Communications of the ACM 21(8), 1978. PDF, DOI 10.1145/359576.359579.
  • First Draft of a Report on the EDVAC (1945). Wikipedia summary.
  • Stored-program computer. Wikipedia.
  • University of Manchester, "How a 70-year-old 'Baby' changed the face of modern computing". Article.
  • Centre for Computing History, "EDSAC runs its first program". Page.
  • Centre for Computing History, "EDVAC is delivered to the Ballistics Research Laboratory". Page.
  • Harvard and modified Harvard architecture. Wikipedia.
  • Maurice Wilkes, "Slave Memories and Dynamic Storage Allocation", IEEE Transactions on Electronic Computers EC-14(2), 1965. Summary.
  • Instruction pipelining. Wikipedia.
  • Wm. A. Wulf and Sally A. McKee, "Hitting the Memory Wall: Implications of the Obvious", Computer Architecture News 23(1), 1995. Record.
  • John L. Hennessy and David A. Patterson, "A New Golden Age for Computer Architecture", Communications of the ACM, 2019. DOI 10.1145/3282307.
  • Moore's law, with Moore's 1965 and 1975 statements and the House estimate. Wikipedia.
  • Onur Mutlu, Saugata Ghose, Juan Gómez-Luna and Rachata Ausavarungnirun, "Processing Data Where It Makes Sense: Enabling In-Memory Computation", 2019. arXiv.
  • Spectre and Meltdown. Project site.
  • Scott Aaronson, "The Limits of Quantum Computers", Scientific American 298(3), 2008. Author's draft.
  • Paul A. Merolla and others, "A Million Spiking-Neuron Integrated Circuit with a Scalable Communication Network and Interface", Science 345(6197), 2014. DOI 10.1126/science.1254642.

මේ Explained එක බෙදාගන්න

A/L ICT කරන යාළුවෙකුට යවන්න.

මේ ලිපියට link කරන ලිපි

  1. English

    Fetch-execute cycle and operating system lessons in the right learning order

    The fetch-execute cycle and the OS lesson as one story. The order to learn the pieces and why, one program from double-click to exit, how the exam tests it, what is current today and where it comes back in Grade 13.

  2. English

    Von Neumann bottleneck and the stored program

    The stored-program idea is the strength of the von Neumann design and the cause of its main limit. It joins the model in Unit 2, processes in Unit 5 and beyond von Neumann in Unit 13.

තවත් Explained

  1. Layer 2 vs Layer 3 switch differences and real uses

    How a Layer 2 switch and a Layer 3 switch differ, why each exists, where networks use them now and next, and the A/L ICT past paper questions that test them, with answers.

    Englishපියවර 7ක්
  2. A/L ICT second attempt study plan for 2027 by unit weight and past papers

    A study plan for students who sit A/L ICT again in 2027. It covers the 2026 results, the units that carry most marks, a lesson method with past papers, a month by month timeline and the free papers on this site.

    Englishපියවර 7ක්
  3. Python functions with lists of tuples and sequential search in 2026 Paper II Q9

    2026 Paper II Q9 worked part by part. The fine rule and its two readings, a function with if and elif, a list of tuples built with a loop, a sequential search that returns -1, and the same skills in Paper I.

    Englishපියවර 7ක්
All Explained