Teachers' Portal  /  IGCSE Computer Science 0478  /  Hardware  /  Virtual memory and cloud storage
Lesson pack · IGCSE Computer Science 0478 · 3.3 · IGCSE

Virtual memory and cloud storage

When RAM is full. Open enough browser tabs and your RAM fills up, yet the computer keeps going.

Student lesson Lab, full screen
At a glance

The shape of the lesson

Topic
Hardware
Syllabus reference
Cambridge IGCSE Computer Science 0478, 3.3
Level
IGCSE
Duration
45 minutes, lab-led; stretches to a 60 minute block (see the contingency notes)
Position in topic
Lesson 9 of 10 in Hardware; follows Magnetic, optical and solid-state storage; leads into NICs, MAC addresses, IP addresses and routers
Central model
Fig. 1: when RAM is full, an idle page is moved to virtual memory so a needed page can be brought into RAM
Cooperative structure
Assessment
Stage 1 check and the exam-style plenary from the student lesson, plus the worksheet as the exit task
Learning objectives

By the end of the lesson, learners can

Section by section
  • 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.
Key points to leave on the board
  • 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.
The core visual model

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.

RAM is full: pages are swapped with virtual memory RAM page A (in use) page B (in use) page C (idle) virtual memory area of HDD / SSD page D (needed) 2. page D in1. page C out too much swapping slows the computer down (disk thrashing)
Fig. 1: when RAM is full, an idle page is moved to virtual memory so a needed page can be brought into RAM
Lesson sequence

Forty-five minutes, phase by phase

TimePhaseWhat happens in the roomGrouping
0 to 5 minHook: predictOpen 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 minTeach and check: Virtual memoryThe CPU can only use instructions and data that are in RAM.Whole class, then pairs
13 to 21 minTeach and check: Why it is neededVirtual 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 minTeach and check: Cloud storageCloud 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 minCheckThe 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 minPlenaryThe 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 minExit and homeworkSet the worksheet below (6 questions, 16 marks). Learners self-assess against the objectives before they leave.Individual
Timing and contingency

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.

Running the cooperative task

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.

Examiner traps to pre-empt

What to head off, and how

Trap learners fall intoTeaching 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.
Worksheet

Virtual memory and cloud storage: worksheet

6 questions, 16 marks. Written in the style of the papers; no past paper question is reproduced.

NameClassDate
Q1 · explain[4 marks]

Describe how virtual memory is created and used.

Q2 · explain[2 marks]

Explain why a computer may need virtual memory.

Q3 · apply[2 marks]

A user notices that her computer becomes very slow when she opens many programs. Explain why, and suggest how to improve it.

Q4 · recall[2 marks]

State what is meant by cloud storage.

Q5 · explain[4 marks]

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.

Q6 · analysis[2 marks]

A student writes: "Virtual memory is faster than RAM because it uses an SSD." Explain why this is wrong.

Answer key and marking notes
Q1 · 4 marks
  • 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).
Q2 · 2 marks
  • 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).
Q3 · 2 marks
  • 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.
Q4 · 2 marks
  • Storing data on remote (physical) servers owned by a third party/provider.
  • That are accessed over the internet.
Q5 · 4 marks
  • 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.
Q6 · 2 marks
  • 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.
Quiz

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.

Q11 mark

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
Q21 mark

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
Q31 mark

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
Q41 mark

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
Q51 mark

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
Q61 mark

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
Q1: A

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.

Q2: A

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.

Q3: A

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.

Q4: A

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.

Q5: A

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.

Q6: A

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

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.

Also for this topic

Everything else you can use

Original work by the TheLucidSTEM team. The worksheet items are written in the style of the papers; no past paper question is reproduced.
Previous lessonMagnetic, optical and solid-state storage