OCR J277 GCSE Computer Science · 1.2 Memory and Storage
Stretch tasks Primary Storage: RAM, ROM and Virtual Memory
Quiz Challenge
A quiz game against four computer players, then short and long written answers.
- Quiz Blitz12 questions against the clock
- Quick Fire4 short answers
- Big Think2 long answers
About 20 minutes
This or That
Pixel the cat asks 8 questions. Each has two answers: pick the right one.
- Two answers to every question
- A fish treat for every right answer
- Streaks win Pixel shades, then a party hat
About 4 minutes
Memory Match
Flip the cards two at a time to match each term card to its meaning card.
- 12 cards: each term has a meaning
- One peek at every card
- Combo points for pairs found in a row
6 pairs, about 4 minutes
Sort It
Sort each statement into the right box, like the tick-box tables in the exam.
- 10 cards to sort into 3 boxes
- Drag a card, tap a box or press its number
- Combo points for cards sorted in a row
10 cards, about 4 minutes
The games need JavaScript. Every question is below, with the answers at the end.
Read the lesson: Primary Storage: RAM, ROM and Virtual Memory
Primary Storage: RAM, ROM and Virtual Memory: the questions
Quiz Challenge, round 1: Quiz Blitz
What does volatile mean?
- Contents are lost when the power is removed
- Contents can be changed at any time
- Contents are unreliable
- Contents are stored on a disk
ROM holds the operating system.
- True
- False
What is held in RAM while a computer is running?
- The boot program only
- Only files that have been saved
- Nothing until a file is opened
- The operating system, open programs and their data
Put the boot process in order.
Number these 1 to 5.
- The hardware is checked
- The operating system is copied into RAM
- Control passes to the operating system
- The computer is switched on
- The CPU fetches the boot program from ROM
Which TWO are true of ROM?
Tick 2.
- It is used as virtual memory
- It is non-volatile
- It holds the boot program
- It is volatile
- It holds open programs
What is virtual memory?
- Memory stored online
- Part of secondary storage used as extra RAM when RAM is full
- Extra RAM chips added to the computer
- Memory inside the CPU
Using virtual memory makes a computer slower.
- True
- False
What name is given to constant swapping between RAM and virtual memory?
Why can the boot program not be held in RAM?
- RAM is read only
- RAM is too small
- RAM is empty when the computer is switched on
- RAM is too slow
Order these from fastest to slowest.
Number these 1 to 4.
- RAM
- Secondary storage
- Registers
- Cache
A computer keeps using virtual memory. What is the best fix?
- Add more ROM
- Use a bigger monitor
- Delete the swap file
- Add more RAM
The CPU can read instructions directly from a hard disk.
- True
- False
Quiz Challenge, round 2: Quick Fire
Explain why a computer needs ROM. [2 marks]
State three things held in RAM while a computer is running. [3 marks]
Describe how virtual memory works. [3 marks]
Explain why using virtual memory slows a computer down. [2 marks]
Quiz Challenge, round 3: Big Think
Explain why a computer needs both RAM and ROM. [4 marks]
A student's laptop has 4 GB of RAM and becomes very slow when many programs are open. Explain why this happens and how it could be fixed. [6 marks]
This or That: tick the right answer
Which memory keeps its contents when the power is off?
- RAM
- ROM
Where does the operating system live while the computer is switched off?
- Secondary storage
- ROM
What happens to unsaved work in RAM during a power cut?
- It is kept until power returns
- It is lost
Does virtual memory add more RAM to a computer?
- Yes: it adds extra memory chips
- No: it borrows secondary storage
Which is usually bigger in a laptop?
- RAM
- ROM
Which program is stored in ROM?
- The web browser
- The bootstrap
What happens first when a computer is switched on?
- The CPU runs the boot program in ROM
- The OS is loaded from RAM
Which memory can the CPU access directly?
- Primary storage
- Secondary storage
Memory Match: match each term to its meaning
| Term | Meaning |
|---|---|
| A RAM | 1 Loses its contents when power is removed |
| B ROM | 2 Constant swapping that makes a computer crawl |
| C Volatile | 3 Secondary storage used as extra RAM |
| D Virtual memory | 4 Where data moved out of RAM is kept |
| E Swap file | 5 Non-volatile memory holding the boot program |
| F Disk thrashing | 6 Volatile main memory for programs in use |
Sort It: tick one box in each row
RAM, ROM or virtual memory?
| Statement | RAM | ROM | Virtual memory |
|---|---|---|---|
| The CPU fetches its very first instructions from here at switch on | |||
| Non-volatile and read only in normal use | |||
| Holds the boot program | |||
| Is wiped when the computer is switched off | |||
| Typically 8 to 32 GB in a laptop | |||
| Data is moved here from RAM into a swap file | |||
| Relying on it too much causes disk thrashing | |||
| Holds the operating system while the computer is running | |||
| Usually only a few megabytes in size | |||
| Part of secondary storage used when RAM is full |
Answers
Round 1: Quiz Blitz
- Contents are lost when the power is removed Volatile is about power, not reliability: switch off and the contents vanish.
- False ROM holds only the small boot program. The operating system lives in secondary storage and is copied into RAM.
- The operating system, open programs and their data RAM is main memory: it holds whatever is in use right now.
- The computer is switched on → The CPU fetches the boot program from ROM → The hardware is checked → The operating system is copied into RAM → Control passes to the operating system ROM first, because RAM is empty at switch on. The boot program then loads the OS into RAM.
- It is non-volatile; It holds the boot program ROM keeps its contents without power, which is why it holds the start up instructions.
- Part of secondary storage used as extra RAM when RAM is full Virtual memory does not add RAM. It borrows slower secondary storage.
- True Secondary storage is far slower than RAM, so every swap costs time.
- disk thrashing In disk thrashing the computer spends more time moving data than doing useful work.
- RAM is empty when the computer is switched on RAM is volatile, so it holds nothing at switch on. ROM still has the boot program.
- Registers → Cache → RAM → Secondary storage The closer to the CPU, the faster, smaller and more expensive the memory.
- Add more RAM With enough RAM, virtual memory is rarely needed, so the swapping stops.
- False The CPU only works from primary memory. Programs are copied into RAM first.
Round 2: Quick Fire
- ROM is non-volatile, so it keeps its contents when the power is off
- It holds the boot program the computer needs at switch on
Model answerROM is non-volatile, so it keeps its contents when the power is off. It holds the boot program, which the computer needs as soon as it is switched on.
- The operating system
- The programs currently in use
- The data those programs are using
Model answerThe operating system, the programs that are open, and the data those programs are using.
- It is used when RAM is full
- Data not used recently is moved out of RAM
- To an area of secondary storage
- It is moved back into RAM when it is needed again
Model answerWhen RAM is full, data that has not been used recently is moved out to a swap file on secondary storage, freeing RAM for the new program. When that data is needed again it is swapped back into RAM.
- Secondary storage is much slower than RAM
- Time is spent swapping data back and forth
Model answerSecondary storage is much slower than RAM, and time is wasted swapping data back and forth between them instead of doing useful work.
Round 3: Big Think
- RAM is volatile, so it is empty when the computer is switched on
- ROM keeps the boot program, so the computer can start
- ROM cannot be written to in normal use
- Running programs need to write data, which RAM allows
- RAM holds the operating system and the programs in use
Model answerRAM is volatile, so when the computer is switched on it is empty and cannot hold the start up instructions. ROM is non-volatile, so it still holds the boot program, which loads the operating system into RAM. But ROM alone is not enough: it is read only in normal use, and running programs constantly need to write data, so RAM holds the operating system, the open programs and the data in use.
- The RAM fills up
- The operating system starts using virtual memory
- Data is moved out to secondary storage
- Secondary storage is much slower than RAM
- Data is swapped back and forth, or the laptop thrashes
- Fix: add more RAM
- Or close programs that are not in use
Model answerWith many programs open, the 4 GB of RAM fills up. The operating system then uses virtual memory: data that has not been used recently is moved out to a swap file on secondary storage to free up RAM, and moved back when it is needed again. Secondary storage is much slower than RAM, so all this swapping takes time, and if it happens constantly the laptop spends more time moving data than working, which is disk thrashing. The fix is to add more RAM, for example upgrading to 16 GB, so virtual memory is rarely needed. Closing programs that are not in use would also help.
This or That
- ROM ROM is non-volatile. RAM is volatile, so it is wiped when the power goes.
- Secondary storage ROM only holds the small boot program. The OS sits on the SSD or hard drive and is copied into RAM at boot.
- It is lost RAM is volatile, so its contents disappear the moment the power is removed.
- No: it borrows secondary storage Virtual memory uses slower secondary storage as a stand-in for RAM.
- RAM A laptop has 8 to 32 GB of RAM, but only a few megabytes of ROM for the boot program.
- The bootstrap The bootstrap is the start up program. A browser is installed on secondary storage and loaded into RAM.
- The CPU runs the boot program in ROM RAM is empty at switch on, so the CPU starts with the boot program in ROM.
- Primary storage The CPU only fetches from primary memory, which is why programs are copied into RAM first.
Memory Match
- A 6 RAM: Volatile main memory for programs in use
- B 5 ROM: Non-volatile memory holding the boot program
- C 1 Volatile: Loses its contents when power is removed
- D 3 Virtual memory: Secondary storage used as extra RAM
- E 4 Swap file: Where data moved out of RAM is kept
- F 2 Disk thrashing: Constant swapping that makes a computer crawl
Sort It
- ROM The CPU fetches its very first instructions from here at switch on RAM is empty at switch on, so the first instructions come from ROM.
- ROM Non-volatile and read only in normal use That is what ROM stands for: read only memory, which keeps its contents without power.
- ROM Holds the boot program The boot program must be there at switch on, so it is kept in non-volatile ROM.
- RAM Is wiped when the computer is switched off RAM is volatile, so its contents are lost when the power goes.
- RAM Typically 8 to 32 GB in a laptop Main memory is measured in gigabytes. ROM is only a few megabytes.
- Virtual memory Data is moved here from RAM into a swap file Data that has not been used recently is swapped out to make room.
- Virtual memory Relying on it too much causes disk thrashing Constant swapping between RAM and virtual memory makes the computer crawl.
- RAM Holds the operating system while the computer is running The OS is copied from secondary storage into RAM at boot, and runs from there.
- ROM Usually only a few megabytes in size ROM only needs to hold the small start up program.
- Virtual memory Part of secondary storage used when RAM is full Virtual memory borrows space on the hard drive or SSD.