The shape of the lesson
By the end of the lesson, learners can
- Virtual memory: The CPU can only use instructions and data that are in RAM.
- Why it is needed: Virtual memory is a safety net, not a replacement for RAM.
- Cloud storage: Cloud storage means saving files to storage owned by a provider, reached over the internet.
- Virtual memory: area of secondary storage used when RAM is full.
- Pages: moved out of RAM when idle, back into RAM when needed.
- Cloud: remote physical servers owned by a provider, accessed over the internet.
- Compare: say "compared with local storage" and give both sides.
One picture every idea returns to
Virtual memory is an area of secondary storage (HDD or SSD) used as if it were extra RAM when RAM is full. Data is split into pages; pages not currently needed are moved from RAM to virtual memory, and moved back into RAM when needed. It lets a computer run programs that need more memory than its RAM holds. Cloud storage keeps data on remote physical servers, owned by a provider, that are accessed over the internet, in comparison to storing data locally on the user's own devices.
Forty-five minutes, phase by phase
| Time | Phase | What happens in the room | Grouping |
|---|---|---|---|
| 0 to 5 min | Hook: predict | Open with the question in the title, When RAM is full.. Open enough browser tabs and your RAM fills up, yet the computer keeps going. Put the figure on the board: it is the one picture every idea in the lesson returns to. | Whole class, then pairs |
| 5 to 13 min | Teach and check: Virtual memory | The CPU can only use instructions and data that are in RAM. | Whole class, then pairs |
| 13 to 21 min | Teach and check: Why it is needed | Virtual memory is a safety net, not a replacement for RAM. Model the worked example Explain the slowdown on the board, one line at a time. | Pairs |
| 21 to 30 min | Teach and check: Cloud storage | Cloud storage means saving files to storage owned by a provider, reached over the internet. Your turn: A photographer stores all her photos only in the cloud. Give one advantage and one disadvantage of this. | Cooperative Concept Mapping |
| 30 to 36 min | Check | The four Stage 1 questions from the student lesson, answered on mini whiteboards or by show of fingers. Re-teach the one most get wrong. | Individual, then whole class |
| 36 to 43 min | Plenary | The exam-style questions from Stage 2, one at a time: thirty seconds alone, then a random call. The feedback lines in the key give the examiner's wording. | Individual, random call |
| 43 to 45 min | Exit and homework | Set the worksheet below (6 questions, 16 marks). Learners self-assess against the objectives before they leave. | Individual |
Protect the parts that carry the learning
The sequence carries about fifty minutes of material, so the lab is driven by one student while the class predicts rather than explored freely. Times are a guide.
Protected: the check at 30 minutes. It is the only individual read on whether the key idea landed, and it is not cut.
Cut first if the build overruns: the last check in Cloud storage, never the check or the plenary.
In a 60 minute block: run worksheet questions 1 to 3 in class as a Rally Coach set and model both the hardest worked example and its check live.
Cooperative Concept Mapping
Teams receive the key terms on cards and arrange them on a large sheet, drawing and labelling the links. Compare maps between teams before showing the model map.
The full structure, with its variations and the other twelve, is on the cooperative-learning page.
What to head off, and how
| Trap learners fall into | Teaching move that pre-empts it |
|---|---|
| The CPU never processes data directly from virtual memory. | A page must be moved back into RAM before it can be used. |
| Do not say cloud storage "does not use physical storage". | Cloud data is still stored on physical servers; the user simply does not own or look after them. |
Virtual memory and cloud storage: worksheet
6 questions, 16 marks. Written in the style of the papers; no past paper question is reproduced.
Describe how virtual memory is created and used.
Explain why a computer may need virtual memory.
A user notices that her computer becomes very slow when she opens many programs. Explain why, and suggest how to improve it.
State what is meant by cloud storage.
A school is deciding whether to store students' work on the cloud instead of on its own local server. Give two advantages and two disadvantages of using cloud storage.
A student writes: "Virtual memory is faster than RAM because it uses an SSD." Explain why this is wrong.
Answer key and marking notes
- An area of secondary storage (HDD/SSD) is allocated as virtual memory.
- It is used when RAM is full.
- Pages of data that are not currently needed are transferred from RAM to virtual memory.
- When they are needed, pages are transferred back into RAM (so the CPU can access them).
- RAM may become full when many/large programs are running.
- Virtual memory allows the programs to keep running (instead of crashing or being unable to open).
- Pages are being transferred between RAM and virtual memory on slower secondary storage (possibly disk thrashing).
- Install more RAM, so fewer pages need to be transferred.
- Storing data on remote (physical) servers owned by a third party/provider.
- That are accessed over the internet.
- Advantage: students can access their work remotely, from any device with an internet connection.
- Advantage: the provider backs up the data / the school does not need to buy and maintain its own storage hardware.
- Disadvantage: work cannot be accessed without an internet connection.
- Disadvantage: security/privacy risk as data is held by a third party / ongoing subscription cost.
- Secondary storage, including an SSD, is much slower to access than RAM.
- Virtual memory is used only because RAM is full; using it slows the computer down.
6 multiple-choice questions on this lesson
From the topic question bank. Assign them in the app for a marked score in your gradebook, or run the topic as a class game.
What is virtual memory?
- Aan area of secondary storage used as if it were extra RAM when RAM is full
- Ba small amount of very fast memory between the CPU and RAM
- Cmemory on remote servers that is accessed over the internet
- Da part of ROM that can be written to when the computer starts
A program needs a page of data that is currently in virtual memory. What happens?
- AThe page is transferred back into RAM, moving an idle page out if needed, before the CPU uses it
- BThe CPU reads and processes the page directly from virtual memory
- CThe page is copied into ROM so that the CPU can access it
- DThe program closes because the data is no longer in RAM
A computer with 4 GiB of RAM becomes very slow whenever many programs are open. Which upgrade would most reduce the slowdown?
- Ainstalling more RAM
- Binstalling a larger hard disk drive
- Cincreasing the size of the virtual memory
- Dadding cloud storage
Which is a disadvantage of storing files only in cloud storage, compared with storing them locally?
- AThe files cannot be accessed without an internet connection
- BThe files cannot be shared with other people
- CThe user must buy and maintain their own servers
- DThe files are lost if the user's laptop is stolen
What is disk thrashing?
- Awhen pages are swapped between RAM and virtual memory so often that the computer spends more time transferring pages than running programs
- Bwhen a hard disk is damaged because its read/write head touches the spinning platter
- Cwhen the CPU reads instructions from secondary storage instead of RAM
- Dwhen cloud storage is slow because many users are uploading at once
Which statement about cloud storage is accurate?
- AData is stored on physical servers owned by a provider and accessed remotely over the internet
- BData is not stored on any physical device; it exists only on the internet
- CData is stored in the RAM of the user's computer and copied to the internet when shut down
- DData is stored on the user's own devices and synchronised by the router
Quiz key
Virtual memory is space on the HDD or SSD that the operating system uses as extra RAM: pages not currently needed are moved out of RAM into it. Fast memory between the CPU and RAM is cache, remote servers reached over the internet are cloud storage, and ROM cannot be written to.
The CPU never processes data directly from virtual memory; the page is moved back into RAM (another unused page may be moved out to make room), then the CPU accesses it. ROM is read only and does not take pages. Programs do not close: the whole point of virtual memory is to keep them running when RAM is full.
With many programs open, RAM fills and pages are swapped to and from virtual memory on much slower secondary storage. More RAM lets more pages stay in RAM, so fewer transfers are needed. A larger disk or a larger virtual memory area allows even more swapping, which does not make it faster, and cloud storage holds files, not running programs.
Cloud files are on remote servers reached over the internet, so with no connection there is no access. In fact cloud storage makes sharing easy, the provider owns and maintains the servers, and because the files are not only on the laptop they are safe if it is stolen: those three are advantages, not disadvantages.
Disk thrashing happens when RAM is so overloaded that pages are moved in and out of virtual memory constantly, and performance drops badly. A head touching the platter is physical damage (a head crash), not thrashing. The CPU cannot read instructions straight from secondary storage, and slow cloud uploads are a network problem, not a memory one.
Cloud storage uses real servers and storage devices in data centres, owned and maintained by the provider; the user reaches them over the internet. Saying it uses no physical storage is a common error. Data in the user's RAM would be volatile and local, and data kept on the user's own devices is local storage, the opposite of cloud storage.
Slides for this lesson
A projectable deck for every pack is on the way. Until then, present the student lesson full screen: its sections, figure and lab tabs follow the same order as the plan above.