Virtual Memory (Cambridge (CIE) IGCSE Computer Science)

Revision Note

James Woodhouse

Written by: James Woodhouse

Reviewed by: Lucy Kirkham

Virtual Memory

What is virtual memory?

Diagram illustrating the transfer of pages between RAM and virtual memory within the secondary storage system.
  • Virtual memory is an extension of primary storage (RAM) located on secondary storage

  • In situations where RAM is close to being full, virtual memory can be used so that the computer remains operational

  • Programs and data not currently being executed are transferred to virtual memory

  • Programs and data are transferred back to RAM when they are needed

  • Programs are stored as pages of data

  • Pages of data are transferred between RAM and virtual memory when needed

  • Virtual memory is much slower than RAM and its use will impact negatively on system performance

  • To avoid the use of virtual memory, increase the size of the RAM

Example

Comparison of RAM and Virtual Memory
  • In the example above, the computer is turned on and the elements of the operating system are loaded into RAM

  • The user opens some spreadsheet and video editing software but RAM is full

  • The program not currently being used (video editing) is transferred to virtual memory

  • When the user wants to use the video editing software again, it is transferred back from virtual memory to RAM

Comparison of Ram and Virtual Memory when swapping out software in RAM

Case Study

A student uses software to create 3D models.

  • 3D modelling often means processing large amounts of data

  • This takes up a large amount of RAM

  • If there is not enough physical RAM, virtual memory is used to:

    • Extend the RAMs capacity

    • Ensure the software does not freeze/crash when RAM gets full

Worked Example

A computer only has 4GB of RAM, Fynn says that virtual memory can be used instead of adding more RAM.

  1. Explain how virtual memory can compensate for the lack of RAM in Fynn's computer [3]

  2. Explain why it would be beneficial for Fynn to get more RAM instead of relying on virtual memory [2]

How to answer these questions

  1. What is the definition of virtual memory? how does it work?

  2. What is the downside of using virtual memory? turn this into an advantage of adding more RAM

Answers

  • How can Virtual Memory compensate

    • Virtual Memory is used when RAM is full

    • ...part of the secondary storage used as (temporary) RAM

    • Data from RAM is moved to the secondary storage/Virtual Memory (to make space in RAM)

    • RAM can then be filled with new data

    • When data in Virtual Memory is needed it is moved back to RAM 

  • Benefit of more RAM

    • More RAM will improve the performance of the computer // More RAM will speed up the access to data

    • Virtual Memory is slower to access than RAM direct (because it has to go back to RAM first)

    • Moving data between RAM and VM takes processor time

Last updated:

You've read 0 of your 5 free revision notes this week

Sign up now. It’s free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Did this page help you?

James Woodhouse

Author: James Woodhouse

Expertise: Computer Science

James graduated from the University of Sunderland with a degree in ICT and Computing education. He has over 14 years of experience both teaching and leading in Computer Science, specialising in teaching GCSE and A-level. James has held various leadership roles, including Head of Computer Science and coordinator positions for Key Stage 3 and Key Stage 4. James has a keen interest in networking security and technologies aimed at preventing security breaches.

Lucy Kirkham

Author: Lucy Kirkham

Expertise: Head of STEM

Lucy has been a passionate Maths teacher for over 12 years, teaching maths across the UK and abroad helping to engage, interest and develop confidence in the subject at all levels.Working as a Head of Department and then Director of Maths, Lucy has advised schools and academy trusts in both Scotland and the East Midlands, where her role was to support and coach teachers to improve Maths teaching for all.