A2 · Practice questions · Virtual machines

Host and guest.

Six original Cambridge-style questions on what a virtual machine is, the roles virtual machines play and their benefits and limitations, with mark-scheme style solutions.

Original questions All questions on this page are original work, written in the Cambridge AS & A Level style. They are not from past papers. They test the same concepts and skills the syllabus rewards.
How to earn the marks

Concept, role, consequence.

01
Recall
[2 marks]

Explain the term virtual machine.

  • Software that emulates (the hardware of) a computer system. ✓
  • It allows a guest operating system to run on a host computer as if it were running on its own hardware. ✓
02
Explain
[3 marks]

Give three examples of the role of virtual machines.

  • Running more than one operating system on the same computer at the same time. ✓
  • Running legacy software that needs an old operating system. ✓
  • Any one of: testing software on different platforms without risk; running suspected malware in isolation; running many virtual servers on one physical server; running bytecode on a process VM such as the JVM. ✓
03
Explain
[4 marks]

Describe two benefits and two limitations of using virtual machines.

  • Benefit: the guest is isolated, so if it crashes or is infected the host and other guests are not affected. ✓
  • Benefit: fewer physical computers are needed, saving cost, space and energy (or: easy to back up, copy or restore from a snapshot). ✓
  • Limitation: performance is lower than on real hardware because of the overhead of emulation. ✓
  • Limitation: the host needs plenty of memory and processing power (or: some hardware cannot be emulated; complex to manage). ✓
04
Apply
[3 marks]

A university computer science department wants students to practise installing and configuring operating systems on the lab computers. Explain why it should use virtual machines.

  • Each student can install a guest OS in a VM without changing the host operating system of the lab computer. ✓
  • Mistakes only affect the guest, which can be deleted or reset from a snapshot, so the lab computers keep working. ✓
  • Several different operating systems can be practised on the same computer, without buying extra hardware. ✓
05
Explain
[2 marks]

Explain why software runs more slowly on a virtual machine than directly on the host hardware.

  • The guest's instructions that use the hardware must be intercepted by the virtual machine software. ✓
  • They are translated or emulated before being executed on the real hardware, which takes extra processing time (overhead), and the host's resources are shared with other guests. ✓
06
Analysis
[3 marks]

A games company is choosing between running its new graphics-intensive game in a virtual machine for testing, or on dedicated physical test computers. Discuss which is more suitable.

  • Virtual machines would make it easy to test on several operating systems and to reset after crashes, and would save hardware. ✓
  • But the game is graphics-intensive: the emulation overhead and limited access to the real graphics hardware would make performance much lower, and some graphics features may not work. ✓
  • Dedicated physical computers are more suitable for accurate performance testing; VMs could still be used for functional tests. ✓

Mark this once you have attempted all six and checked your working. It records a Practiced badge on the topic and adds a one-time bonus. Revealing the solutions alone does not count.