- Understand why main memory is needed while a computer is running
- Compare RAM, ROM and cache using their purpose and characteristics
- Explain volatility, capacity and the use of virtual memory
- I can state that RAM stores programs and data currently in use
- I can describe ROM as non-volatile memory that stores start-up instructions
- I can explain why cache improves processor performance
- I can describe virtual memory as part of backing storage used as if it were RAM
Answer before the lesson begins. These check prior knowledge — it's fine if you're unsure.
1. What does the processor do with instructions stored in memory?
2. Which statement best describes backing storage?
3. What does volatile mean when describing memory?
Key vocabulary
Memory
Why memory is needed
A computer cannot process a program directly from long-term storage all the time. Storage devices such as SSDs and hard disk drives are useful because they keep files when the power is off, but they are much slower than the processor. When a program is opened, the operating system loads the program instructions and the data being used into main memory. The processor can then fetch instructions and data quickly enough to keep the computer responsive.
Main memory sits between the processor and backing storage in the memory hierarchy. The closer memory is to the processor, the faster it tends to be, but it is also usually smaller and more expensive per byte. This is why a computer might have a large SSD, a smaller amount of RAM, and a very small amount of cache.
RAM
RAM stands for Random Access Memory. It stores the operating system, currently running programs and the data those programs are using. For example, when a pupil opens a web browser, the browser program and active web pages are loaded into RAM. When they edit an image, the image data being changed is also held in RAM.
RAM is read/write, meaning the processor can read data from it and write new data to it. RAM is also volatile. If the power is switched off, the contents of RAM are lost. This is why unsaved work can disappear after a crash. Saving a file writes it from RAM to non-volatile backing storage.
ROM
ROM stands for Read Only Memory. It stores instructions that are needed when the computer starts up, such as firmware or boot instructions. ROM is non-volatile, so it keeps its contents when the computer is switched off. This matters because the computer needs start-up instructions before the operating system has been loaded from storage.
At National 5, describe ROM as memory that is normally read from rather than written to by the user. It is not used for open documents or current program data. A common exam contrast is: RAM is volatile and holds programs/data currently in use; ROM is non-volatile and holds start-up instructions.
Cache memory
Cache is very fast memory close to, or built into, the processor. It stores instructions and data that the processor is likely to need again soon. Accessing cache is faster than accessing RAM, so using cache can improve performance because the processor spends less time waiting for data.
Cache has a much smaller capacity than RAM. It is not where user files are saved, and pupils do not choose what to put in cache. The computer system manages it automatically. In an exam, a strong answer links cache to performance: frequently used data can be accessed more quickly than if it had to be fetched from RAM each time.
Virtual memory
If RAM becomes full, the operating system may use virtual memory. Virtual memory uses part of backing storage as if it were RAM. This can allow more programs to remain open, but it is slower than real RAM because backing storage is slower than main memory.
Virtual memory is useful, but it is not a perfect replacement for RAM. If a computer relies heavily on virtual memory, it may slow down because data has to be moved between RAM and backing storage. This is why adding more RAM can improve performance when a computer often runs out of memory.
| Memory type | Volatile? | Main purpose | Typical exam phrase |
|---|---|---|---|
| RAM | Yes | Programs and data currently in use | read/write; contents lost when power is off |
| ROM | No | Start-up instructions/firmware | non-volatile; read-only in normal use |
| Cache | Usually yes | Frequently used data and instructions | very fast; improves processor performance |
| Virtual memory | Uses storage | Extra space when RAM is full | slower than RAM; uses backing storage |
Worked examples
A question asks which memory stores the instructions needed when a computer is first switched on.
A computer repeatedly uses the same instructions while running a game. Explain how cache can improve performance.
A laptop becomes slow after many applications are opened at once. Explain why virtual memory might be involved.
A pupil opens a browser, a word processor and an image editor. The computer starts to slow down and the operating system begins using virtual memory.
Answer the following:
- Which memory stores the open programs and current data?
- Why does virtual memory allow the computer to keep working?
- Why can using virtual memory make the computer slower?
- RAM stores the programs and data currently in use.
- Virtual memory uses part of backing storage as if it were RAM when RAM is full.
- Backing storage is slower than RAM, so fetching data from virtual memory takes longer.
When comparing memory types, use paired facts. For example: RAM is volatile and stores programs/data currently in use; ROM is non-volatile and stores start-up instructions. For cache questions, do not just write "it is faster". Link the speed to the processor accessing frequently used instructions or data more quickly.
Questions 1-5 are auto-checked. Questions 6-9 are self-marked — write your answer, then reveal the model answer to check your work.
1. Which memory stores programs and data currently in use? TYPE 1
2. Which statement about ROM is correct? TYPE 1
3. Why can cache improve performance? TYPE 1
4. What is virtual memory? TYPE 1
5. Which option lists memory from fastest/smallest to slowest/largest in the usual hierarchy? TYPE 1
6. Describe two differences between RAM and ROM. TYPE 2
7. Explain how cache memory can improve processor performance. TYPE 2
8. A computer has many applications open and RAM becomes full. Explain what virtual memory does and why the computer may slow down. TYPE 3
9. A pupil loses unsaved work when a desktop computer loses power, but the computer can still start up again. Use RAM and ROM to explain both parts of this situation. TYPE 3
Suggested timing: 60 minutes. Warm up 6 min; vocabulary 6 min; notes and diagram 20 min; worked examples 10 min; now you try 5 min; task set 13 min.
Key misconception to address: Pupils often say RAM is storage because it stores data. Keep separating temporary memory from long-term backing storage.
Live demo suggestion: Open several browser tabs or applications and show memory usage in Activity Monitor/Task Manager if available. Link the behaviour to RAM pressure and virtual memory.
Extension question: Why does more RAM not always make a computer faster? Steer towards bottlenecks: if RAM is not full, CPU, storage or network may be the limiting factor.
SQA command words covered: "state", "describe", "compare", "explain".