RAM — Random Access Memory
The computer's working memory. Whatever you're actively doing right now - the programs open, the tab you're reading, the game you're playing - is sitting in RAM so the CPU can reach it instantly. It can be read and written to by the CPU. The more RAM you have, the more programs can run smoothly (multi-tasking).
Power Cut!
RAM is volatile — it needs constant power to hold data. ROM is non-volatile. See it for yourself:
Both are powered up and holding data.
ROM — Read-Only Memory
Before an operating system exists for the computer to use, something has to tell the CPU what to do the instant the power button is pressed. That's ROM's job. It is non-volatile and read-only . It holds the vital start up instructions.
Why ROM Has to Go First
You don't need to know a detailed boot process — just the big picture of why ROM exists. Click these three stages into the right order:
Your order: —
Cache
A tiny area of memory built onboard the CPU. It's far faster to access than RAM, so keeping the CPU's frequently used instructions and data there cuts out a lot of waiting around. Cache reduces how often the CPU has to wait on the comparatively slow to access RAM. A bigger cache generally means more hits — but cache is expensive, so it's always kept small.
| Cache | RAM | Virtual Memory | |
|---|---|---|---|
| Access Speed | Fastest | Fast | Slowest |
| Capacity | Smallest | Medium | Largest |
| Cost per byte | Highest | Moderate | Lowest |
Cache Hit or Miss?
The CPU asks for 10 pieces of data, one at a time. In this demo, cache can only hold 3 at once. Step through each request and watch what the CPU has to do to get the data.
Cache contents (checked first):
Cache Hits
RAM Fetches (Misses)
Total time spent fetching data so far:
Using cache saved 0 time units so far.
Virtual Memory
When RAM fills up, the operating system borrows space on secondary storage as overflow — swapping data between the two as needed. Acess speeds are slower, but it keeps everything running. Paging is the process of swapping out of RAM or back in again. This takes time and too much of it causes disk thrashing .
Memory Manager
In this demo, RAM holds 12 units. If a new or returning program doesn't fit, you choose what to page out to make room.
Total Time Cost
Paged Out
Paged In
Memory Challenges
A mix of styles — sorting, true/false, "which memory?", quick-fire questions, and ordering the hierarchy.