1.2.1 Primary storage (memory) · Paper 1
Memory: RAM, ROM and virtual memory
Each section has pictures and things to try, then its key points and key words. Exam practice is at the end of the page.
You need to know
- Why computers need primary storage (memory)
- The difference between RAM and ROM, and what each is for
- Why virtual memory may be needed, and how it works
- What cache is
You don't need to know
- OCR doesn't rule anything out here.
Why computers need memory
The CPU can only work on programs and data that are in primary storage. It is much faster to reach than a hard drive or SSD.
When you open a program, it is copied from secondary storage into RAM so the CPU can run it.
Key points
Why computers need memory
Before this: 1.1.1What the CPU does
- Primary storage is memory the CPU can access directly: RAM, ROM and cache.
- The CPU can only run programs and use data that are in primary storage.
- When you open a program, it is copied from secondary storage (like an SSD) into RAM.
- Primary storage is much faster than secondary storage, so the CPU spends less time waiting.
Key words
Say what each one means, then tap to check.
RAM and ROM
| RAM (random access memory) | ROM (read only memory) | |
|---|---|---|
| Purpose | Holds programs and data currently in use, including the operating system | Holds the boot-up instructions (BIOS) that start the computer |
| Can it be changed? | Yes, read and write | No, read only |
| Power off? | Contents are lost (volatile) | Contents are kept (non-volatile) |
| Size | Large, e.g. 8 to 32 GB | Small |
Try it
Is it RAM or ROM?
- Holds the program you're using right now
- Holds the start-up (boot) instructions
- Loses its contents when the power goes off
- Can only be read, not changed
- Usually 8 to 32 GB in a laptop
Key points
RAM and ROM
Before this: Why computers need memory
- RAM holds the operating system, programs and data currently in use. It can be read from and written to.
- RAM is volatile: everything in it is lost when the power is turned off.
- ROM holds the instructions needed to start the computer (the BIOS / boot program).
- ROM is non-volatile and read only: it keeps its contents without power and normally can't be changed.
- RAM is usually much larger than ROM, e.g. 16 GB.
Key words
Say what each one means, then tap to check.
Cache
Cache is a small amount of very fast memory on or next to the CPU. It keeps copies of data and instructions the CPU uses often, so it doesn't have to wait for RAM.
Key points
Cache
Taught in more depth on: 1.1.1The CPU: how a computer runs instructions
- Cache is a small amount of very fast memory inside or very close to the CPU.
- It stores copies of frequently used data and instructions, so the CPU doesn't have to wait for slower RAM.
- Cache is faster than RAM but much smaller and more expensive.
- A bigger cache usually means better performance, because more data can be kept close to the CPU.
- Cache is often split into levels (L1, L2, L3). L1 is the smallest and fastest.
Key words
Say what each one means, then tap to check.
Virtual memory
When RAM is full, part of secondary storage is used as extra memory. This is virtual memory.
Watch out: Secondary storage is much slower than RAM, so using lots of virtual memory makes the computer slow down. Adding more RAM fixes this.
Try it
Open apps until RAM fills up. Then switch back to an app that was moved out. Try it again with 16 GB of RAM.
Key points
Virtual memory
Before this: RAM and ROM1.2.2Why we need secondary storage
- Virtual memory is part of secondary storage used as extra RAM when RAM is full.
- Data that isn't being used right now is moved from RAM to virtual memory, freeing space.
- When that data is needed again, it is swapped back into RAM.
- Secondary storage is much slower than RAM, so lots of swapping makes the computer slow.
- The fix is to add more RAM.
Key words
Say what each one means, then tap to check.
Also useful: Cache
Exam practice
13 questions in the style of the OCR exam, 26 marks in total. Try each one, then check the mark scheme.
Why computers need memory
Hint
Where must a program be before the CPU can run it? And why does speed matter?
Explain means say what happens and why. Words like “because” and “so” help.
2 marks: aim for 2 things said, such as a point and then the reason for it.
Show mark scheme
- The CPU can only directly access data / instructions in primary storage.
- It is fast, so the CPU isn't kept waiting.
Don't accept: "To store files permanently". That is what secondary storage is for.
1 mark for each point.
Hint
Think of the memory types on this page, including the one inside the CPU.
Give means give a short, clear answer. You don't need to explain it.
1 mark: one answer is enough.
Show mark scheme
- RAM / ROM / cache.
Don't accept: Hard drive, SSD or USB stick. These are secondary storage.
RAM and ROM
Hint
Think about what happens when the power goes off, whether it can be changed, what each one holds, and how big each one is.
State means give a short, clear answer. You don't need to explain it.
2 marks: make 2 separate points.
Show mark scheme
- RAM is volatile, ROM is non-volatile.
- RAM can be written to, ROM is read only.
- RAM holds programs/data in use, ROM holds boot instructions.
- RAM is larger.
Don't accept: "RAM is volatile" and "ROM is non-volatile" as two separate answers. That is one difference, so 1 mark.
1 mark each, max 2
Hint
What would happen when you switched the computer on, if the start-up instructions had been lost?
Explain means say what happens and why. Words like “because” and “so” help.
1 mark: one point, with the reason.
Show mark scheme
- It must keep the start-up instructions when the power is off, so the computer can boot.
Hint
Think about what happens to RAM when you switch the computer off.
State means give a short, clear answer. You don't need to explain it.
1 mark: one answer is enough.
Show mark scheme
- Memory that loses its contents when the power is turned off.
Virtual memory
Hint
It isn't real RAM. It borrows space from somewhere else.
State means give a short, clear answer. You don't need to explain it.
1 mark: one answer is enough.
Show mark scheme
- On secondary storage, e.g. hard drive / SSD.
Don't accept: In RAM, in cache or in the CPU.
Hint
Three steps: when is it used, what gets moved and where to, and what happens when that data is needed again?
Describe means say what it is like or what happens. Make each point a separate fact.
3 marks: make 3 separate points.
Show mark scheme
- When RAM is full…
- …data not currently needed is moved to virtual memory on secondary storage.
- It is moved back into RAM when it is needed.
Don't accept: "Virtual memory is extra RAM". It is part of secondary storage used as if it were RAM.
Don't accept: "It makes the computer faster". Virtual memory is slower than RAM.
1 mark for each point.
Hint
Compare the speed of secondary storage with RAM, and think about all the moving back and forth.
Explain means say what happens and why. Words like “because” and “so” help.
2 marks: aim for 2 things said, such as a point and then the reason for it.
Show mark scheme
- Secondary storage is slower to access than RAM.
- Time is spent swapping data in and out.
Don't accept: "Virtual memory is slow" with no reason. Say it is on secondary storage, which is slower than RAM.
1 mark for each point.
Mixed questions on the whole page
Hint
Think about everything you have open right now, plus the software that runs the computer itself.
Describe means say what it is like or what happens. Make each point a separate fact.
2 marks: make 2 separate points.
Show mark scheme
- The operating system.
- Programs / applications that are currently running.
- Data / files that are currently in use.
Don't accept: "All the files on the computer". Only what is in use is in RAM.
1 mark each, max 2
Hint
What does a computer need to do the moment it is switched on, before anything has been loaded into RAM?
Describe means say what it is like or what happens. Make each point a separate fact.
2 marks: make 2 separate points.
Show mark scheme
- Stores the start-up (boot) instructions / BIOS.
- Non-volatile, so the instructions are kept when the power is off.
- Read only, so the instructions cannot be changed.
Don't accept: "ROM stores the programs that are running". That is RAM.
1 mark each, max 2
- Its contents are lost when the power is turned off.
- It stores the start-up (boot) instructions.
- It holds the programs that are running right now.
- Its contents normally can't be changed.
Hint
Look back at the RAM and ROM table. Which one is volatile? Which one is read only?
State means give a short, clear answer. You don't need to explain it.
4 marks: make 4 separate points.
Show mark scheme
- a) RAM
- b) ROM
- c) RAM
- d) ROM
1 mark for each.
Hint
Where might the browser's data be now? What has to happen before the CPU can use it again, and why is that slow?
Explain means say what happens and why. Words like “because” and “so” help.
3 marks: aim for 3 things said, such as a point and then the reason for it.
Show mark scheme
- The browser's data may have been moved to virtual memory on secondary storage.
- It has to be swapped back into RAM before the CPU can use it…
- …and other data may be moved out to virtual memory to make space.
- This takes time because secondary storage is slower than RAM, so there may be a delay.
Also accept: The computer slows down / lags, as long as it says why (secondary storage is slower than RAM).
Don't accept: "The computer crashes". Virtual memory is used so this does not happen.
Don't accept: "The browser closes". Its data is moved to virtual memory, not deleted.
1 mark for each point, up to 3.
Hint
If more fits in RAM, how much moving back and forth to virtual memory is needed?
Explain means say what happens and why. Words like “because” and “so” help.
2 marks: aim for 2 things said, such as a point and then the reason for it.
Show mark scheme
- More programs and data can be held in RAM at once.
- Less virtual memory is needed.
- So less time is spent swapping data with slower secondary storage.
Don't accept: "More RAM makes the CPU faster". The CPU is the same; it just waits less.
1 mark each, max 2