Virtual Machines (OCR A Level Computer Science)

Revision Note

Callum Davies

Written by: Callum Davies

Reviewed by: James Woodhouse

Virtual Machines

What are virtual machines?

  • Virtual machines (VMs) are entire operating systems running inside another operating system

  • A user running Windows 11 could run a virtual machine of MacOS

  • This would allow them to navigate the GUI of MacOS and install software on it

  • Running a virtual machine helps access software that is only designed to run on specific operating systems

  • VM management software includes a Hypervisor that monitors all activity happening inside the VM

Structure of several virtual machines running on a single piece of hardware

Structure of several virtual machines running on a single piece of hardware

Cross-platform and forwards compatibility

  • Not all software is designed to run on all operating systems

  • Apple commonly makes software that only runs on MacOS for performance reasons

  • A Windows user could run a virtual machine of MacOS and install the software they need

  • Most software needs to be updated to work on the latest versions of operating systems

  • A user running the latest release of Windows may need to run a virtual machine of a previous release of Windows to use an application that hasn't received a forwards-compatibility update

In software testing

  • VMs are a way to create isolated test environments, that leave the host operating system unaffected

  • Isolated environments allow a developer to:

    • Monitor the way their software affects system performance

    • Test on a clean-slate system, while no other applications are running

  • VM management software can create virtual machines that act like they have older hardware

  • This allows developers to build software that can be run on older hardware so that more users can use the software

  • A developer can test against various operating systems, such as MacOS, Linux and Windows, for greater compatibility

  • This is achieved through compiling into intermediate code and running against different operating systems

Consequences

  • VMs share the same system hardware as the host OS

  • Over-use of VMs can exhaust the host OS of the system of CPU, hard disk and memory

    • VM software such as VirtualBox can set maximum limits on system resources

    • A low-specification machine could be configured to allocate only 1GB of memory and 20% of CPU

    • A high-specification machine could afford up to 8GB of memory and 50% of the CPU

  • Operating systems are commonly free to download, but require an activation payment to access all features

Worked Example

Explain why the programmers of anti-virus software may make use of virtual machines when developing the updates.

[3]

How to answer this question:

  • Recall two benefits of using virtual machines in developing software

  • Link these benefits to some considerations needed when developing anti-virus software

Answer:

 Example answer that gets full marks:

Virtual machines (VMs) are essential in developing anti-virus software updates for several reasons. VMs create an isolated environment that is separate from the host operating system. This enables developers to safely work with virus test code that could risk the integrity of their own operating system. VMs can also be configured to emulate various types of hardware. This allows developers to understand how their anti-virus software will perform on different devices and under different conditions, ensuring a wider range of compatibility.

Acceptable answers you could have given instead:

Virtual machines create an isolated test environment from the host operating system. This means working with harmful test code carries less risk. Virtual machine management software can monitor the VM through the Hypervisor. This will show how the software affects VM system performance, allowing the programmer to make changes where needed.

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?

Callum Davies

Author: Callum Davies

Expertise: Computer Science

Callum is an experienced teacher of GCSE and A-Level Computer Science. He has 4 years of teaching experience and has detailed knowledge of how to achieve exam success, having marked for OCR A-Level. Callum is now a software engineer and regularly mentors new engineers.

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.