GCSE Revision Aid: This resource is designed to support your revision and may contain errors. If you find a discrepancy with your class teaching, your teacher is correct — please let us know at gcserevise@scott.scottrix.co.uk.
CS28: Memory & Storage
FoundationHigherAQAEdexcelOCREduqasCCEAComputer Systems
Definition: Primary memory is the memory that is directly accessible by the CPU. It holds the data and instructions that the CPU is currently using or will need soon. Primary memory includes RAM and ROM.
Primary memory is located close to the CPU and can be accessed much faster than secondary storage. Without primary memory, the CPU would have to fetch every instruction and piece of data from slow secondary storage, making the computer extremely slow.
💾 RAM (Random Access Memory)
Definition: RAM is volatile memory that stores the data and programs currently in use. It is called "random access" because any location can be accessed in the same amount of time. RAM loses its contents when power is turned off.
Volatile: contents are lost when power is switched off
Read and write: the CPU can both read from and write to RAM
Stores the operating system, running programs, and current data
Contents change constantly as programs run and data is processed
More RAM = more programs/data can be held simultaneously = better multitasking
Larger RAM reduces the need for virtual memory (which is slow)
Example
When you open a word processor, the program code is loaded from the hard drive into RAM. When you type, your text is stored in RAM. If the power cuts out before you save, the text in RAM is lost. Saving writes the data from RAM to the hard drive (non-volatile storage).
🔒 ROM (Read Only Memory)
Definition: ROM is non-volatile memory that stores permanent instructions. Its contents cannot be changed (or are very difficult to change). ROM retains its data even when power is switched off.
Non-volatile: contents are preserved when power is switched off
Read only: the CPU can read from ROM but cannot write to it
Stores the BIOS/boot program that starts the computer
Contains startup instructions that load the OS into RAM
Contents are set during manufacture and typically never change
Example
When you turn on your computer, the CPU reads the boot instructions from ROM. These instructions tell the computer to perform a power-on self-test (POST) and then load the operating system from the hard drive into RAM. Only then can the computer be used.
Property
RAM
ROM
Volatility
Volatile (lost without power)
Non-volatile (retained without power)
Read/Write
Read and write
Read only
Contents
Running programs and current data
Permanent boot/startup instructions
Changeable
Yes - constantly changing
No - set at manufacture
Capacity
Large (typically 4-32 GB)
Small (typically a few MB)
⚡ Cache Memory
Definition: Cache is a small, very fast memory located between the CPU and RAM. It stores frequently accessed data and instructions to reduce the time the CPU spends waiting for data from slower RAM.
Much faster than RAM but slower than registers
Much smaller than RAM (typically a few MB)
Stores copies of the most frequently used data from RAM
Cache hit: data is found in cache (fast access)
Cache miss: data is not in cache, must be fetched from RAM (slow)
L1 cache: smallest, fastest, inside CPU core
L2 cache: larger, slightly slower, per core or shared
L3 cache: largest, slowest cache, shared between all cores
📝 Registers
Definition: Registers are the smallest, fastest memory locations in the computer system. They are located inside the CPU itself and hold individual data values currently being processed.
Fastest memory in the system - access is nearly instant
Very small capacity (typically 32 or 64 bits each)
Located directly inside the CPU
Examples: PC, MAR, MDR, ACC, CIR
📊 Memory Hierarchy
Memory Type
Speed
Capacity
Cost per MB
Location
Registers
Fastest
Smallest (bytes)
Most expensive
Inside CPU
L1 Cache
Very fast
Very small (KB)
Very expensive
Inside CPU
L2 Cache
Fast
Small (MB)
Expensive
Inside/near CPU
L3 Cache
Moderate
Medium (MB)
Moderate
Near CPU
RAM
Moderate
Large (GB)
Cheap
Motherboard
Secondary Storage
Slowest
Largest (TB)
Cheapest
Connected to motherboard
Memory Hierarchy Rule:
As you go DOWN the hierarchy: speed decreases, capacity increases, cost per MB decreases
As you go UP the hierarchy: speed increases, capacity decreases, cost per MB increases
🔄 Virtual Memory
Definition: Virtual memory is a technique where the operating system uses a section of the hard drive as if it were additional RAM. When RAM is full, the OS moves less-used data from RAM to a "swap file" or "page file" on the hard drive.
Used when RAM is full and more memory is needed
The OS creates a swap file/page file on the hard drive
Less frequently used data is "swapped out" from RAM to disk
When the swapped-out data is needed, it is "swapped in" back to RAM
This process is called paging or swapping
Virtual memory is MUCH slower than RAM (hard drive access is slow)
Too much paging (thrashing) severely slows down the computer
Example
You have 8 GB of RAM and open programs using 10 GB. The OS moves 2 GB of the least recently used data to the hard drive swap file. When you switch back to a program whose data was swapped out, the OS must swap it back in from disk - this causes a noticeable delay.
Exam Point: Adding more RAM reduces the need for virtual memory, which improves performance because RAM is much faster than accessing the hard drive for swapping.
💿 Secondary Storage
Definition: Secondary storage is non-volatile, long-term storage that holds data permanently, even when the power is off. It is used to store the operating system, applications, and user files. It is much slower than primary memory but has much larger capacity.
Magnetic Storage - HDD (Hard Disk Drive)
Uses spinning magnetic disks (platters) and read/write heads
Large capacity (up to several TB)
Relatively cheap per GB
Slower access than SSD (moving parts)
Can be damaged by physical shocks and magnetic fields
Definition: Cloud storage stores data on remote servers accessed via the internet, rather than on local storage devices. The data is managed by a third-party provider.
Advantages
Disadvantages
Accessible from anywhere with internet
Requires internet connection to access
Automatic backups
Security concerns (data on someone else's servers)
Easy sharing with others
Slow upload/download with poor internet
Scalable storage (pay for what you use)
Ongoing subscription costs
No risk of local device failure losing data
Privacy concerns (provider could access data)
📟 Embedded Systems
Definition: An embedded system is a computer system built into a larger device, designed to perform a specific, dedicated function. It typically has a microprocessor, ROM (not RAM), and limited I/O.
Purpose-built for a specific task (not general-purpose)
Contains a microprocessor, ROM, and limited I/O
Often has no screen or keyboard (headless)
Runs a single program stored in ROM
Low power consumption
Reliable - must work without crashing
Examples of Embedded Systems
Microwave oven controller, washing machine, car engine management system, traffic lights, digital watch, central heating thermostat, medical devices (pacemaker), industrial robots.
⚠️ Common Mistakes to Avoid
Mistake
Why It's Wrong
How to Fix It
Saying "RAM is permanent storage"
RAM is volatile - it loses data without power
RAM = temporary; secondary storage = permanent
Confusing cache and RAM
Cache is much smaller and faster than RAM
Cache = small, fast buffer between CPU and RAM
Saying "virtual memory is as fast as RAM"
Virtual memory uses the hard drive, which is much slower
Virtual memory is significantly slower than RAM
Saying SSDs have moving parts
SSDs use flash memory with no moving parts
Only HDDs have moving parts (spinning disks)
Saying ROM stores running programs
ROM stores permanent boot instructions; RAM stores running programs
ROM = startup; RAM = currently running
❓ Practice Questions
Q1: Explain the difference between RAM and ROM.
Q2: Describe the memory hierarchy from fastest to slowest.
Q3: What is virtual memory and why does it slow down a computer?
Q4: Compare HDD and SSD storage, giving two advantages and one disadvantage of each.
Q5: What is an embedded system? Give three examples.
✅ Answers
RAM is volatile (loses data without power), read-write, and stores running programs and current data. ROM is non-volatile (retains data without power), read-only, and stores permanent boot/startup instructions.
Registers (fastest) > L1 Cache > L2 Cache > L3 Cache > RAM > Secondary Storage (slowest). Speed decreases and capacity increases as you move down the hierarchy.
Virtual memory uses a section of the hard drive as extra RAM when actual RAM is full. The OS moves less-used data from RAM to disk (swapping/paging). It slows down the computer because hard drive access is much slower than RAM access. When the CPU needs data that has been swapped to disk, it must wait while it is loaded back into RAM.
HDD advantages: cheaper per GB, very large capacity available. HDD disadvantage: slower access due to moving parts, less durable. SSD advantages: faster access (no moving parts), more durable. SSD disadvantage: more expensive per GB, limited write cycles.
An embedded system is a computer system built into a larger device, designed to perform one specific dedicated function. It typically has a microprocessor and ROM rather than full RAM. Examples: microwave oven controller, washing machine, car engine management system.
🎯 Exam Tips
Always mention "volatile" for RAM and "non-volatile" for ROM - these are key terms
Know the memory hierarchy in order of speed
For virtual memory, always explain it uses the hard drive (which is slower)
Embedded systems = dedicated function, microprocessor + ROM, limited I/O
Adding more RAM improves performance by reducing virtual memory usage
⚠️ Common Errors
✗ Confusing virtual memory with RAM✓ Virtual memory uses space on the hard drive/SSD as overflow when RAM is full. It is much slower than RAM because disk access is slower than memory access.
✗ Thinking SSD and HDD have the same performance characteristics✓ SSD has no moving parts, faster read/write speeds, lower latency, and is more durable. HDD has spinning magnetic platters, slower access, but higher capacity at lower cost.
✗ Forgetting the memory hierarchy — cache vs RAM vs secondary storage✓ Speed: Cache > RAM > SSD > HDD. Capacity: HDD > SSD > RAM > Cache. Cost per GB: Cache > RAM > SSD > HDD. Each level trades speed for capacity and cost.
✗ Believing deleting a file permanently removes it from secondary storage✓ Deleting a file typically removes the reference from the file system but the data remains on disk until overwritten. 'Secure deletion' or disk wiping is needed to truly erase data.
✍️ Model Answer
Full-Mark Response
Explain the concept of virtual memory, why it is needed, and one disadvantage of using it. [3 marks]
Virtual memory is a technique where the operating system uses a section of the hard drive/SSD as if it were additional RAM. When the physical RAM becomes full, the OS moves less frequently used data from RAM to a designated area on disk called the swap file or page file.
It is needed because it allows the computer to run more programs simultaneously than the physical RAM could hold, preventing 'out of memory' errors when multitasking.
Disadvantage: Accessing virtual memory is much slower than accessing RAM because disk read/write speeds are significantly slower than memory access. If the system relies heavily on virtual memory (thrashing), performance degrades severely as the CPU spends more time swapping data between disk and RAM than executing instructions.
📊 AO Deep Dive
Assessment Objective Analysis
AO1 (Computational Thinking — 40%): Demonstrate knowledge and understanding of the principles and concepts of computer science, including memory and storage: RAM, ROM, cache and virtual memory for AQA 8525, OCR J277 & Edexcel 1CP2.
AO2 (Application — 40%): Apply knowledge and understanding of computer science, including memory and storage: RAM, ROM, cache and virtual memory to analyse problems in computational terms and to design, write and evaluate solutions.
AO3 (Evaluation — 20%): Evaluate the effectiveness, correctness and efficiency of computational solutions, including memory and storage: RAM, ROM, cache and virtual memory, and make reasoned judgements about trade-offs.
📝 Exam Technique
GCSE Computer Science Exam Tips:
Memory hierarchy: Cache (fastest, smallest) → RAM → Virtual Memory → SSD → HDD (slowest, largest). RAM: volatile, fast, working storage. ROM: non-volatile, boot instructions. Virtual memory: disk space used as RAM overflow, slow. SSD vs HDD: speed, durability, cost, capacity. When asked about performance, consider the bottleneck — if RAM is full, virtual memory slows everything down (thrashing).