Computer Science AS OCR
-
1-1-structure-and-function-of-the-processor as5 主题
-
1-2-types-of-processor as3 主题
-
1-3-input-output-and-storage as2 主题
-
2-1-systems-software as8 主题
-
2-3-software-development as5 主题
-
2-4-types-of-programming-language as4 主题
-
3-1-compression-encryption-and-hashing as3 主题
-
3-2-databases as3 主题
-
3-3-networks as8 主题
-
3-4-web-technologies as13 主题
-
html as
-
css as
-
css-styling as
-
javascript as
-
variables-and-constants-in-javascript as
-
outputs-in-javascript as
-
selection-in-javascript- as
-
for-loops-in-javascript- as
-
while-loops-in-javascript- as
-
strings-in-javascript- as
-
operators-in-javascript- as
-
nested-statements-in-javascript as
-
functions-and-procedures-in-javascript as
-
html as
-
4-1-data-types as8 主题
-
4-2-data-structures as4 主题
-
4-3-boolean-algebra as1 主题
-
5-1-computing-related-legislation as4 主题
-
5-2-moral-and-ethical-issues as9 主题
-
6-1-thinking-abstractly as3 主题
-
6-2-thinking-ahead as1 主题
-
6-3-thinking-procedurally as3 主题
-
6-4-thinking-logically as2 主题
-
6-5-thinking-concurrently as2 主题
-
7-1-programming-techniques as9 主题
-
8-1-standard-algorithms-and-big-o-notation as8 主题
virtual-machines as
Exam code:H046
Virtual Machines
What are virtual machines?
-
A virtual machine (VM) is a software-driven computer that runs within a physical machine
-
It mimics a complete computer system, including virtual CPU, memory, storage, and network interface
-
A physical machine can run multiple VMs using hypervisor software
-
Each VM behaves as a separate system with its own operating system and applications, independent of the host OS
Executing intermediate code
-
Some languages (e.g. Java) compile to intermediate code (bytecode) instead of machine code
-
This bytecode can be executed by a virtual machine (like the Java Virtual Machine), allowing the same program to run on multiple platforms
Structure of several virtual machines running on a single piece of hardware

Uses of virtual machines
-
Cross-platform compatibility: Run MacOS apps on Windows or vice versa
-
Software testing: Safe, isolated environments for testing across multiple OS versions
-
Legacy support: Run older versions of Windows for outdated apps
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
-
In A Level Computer Science, intermediate code is generated through compilation and allows programs to run across 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
|
Benefits |
Drawbacks |
|---|---|
|
Allows software to run on different operating systems (cross-platform) |
Uses system resources such as CPU, RAM, and storage from the host machine |
|
Supports running legacy applications on older operating systems |
Performance is usually slower than running software directly on physical hardware |
|
Provides isolated test environments for safe software testing |
Can be complex to set up and manage |
|
Enables execution of intermediate code (e.g. Java bytecode via JVM) |
May require additional licences or activation for virtualised OSs |
|
Multiple VMs can run on a single physical machine, improving hardware usage |
Resource limits can cause crashes or lag if poorly configured |
|
Easy to reset or rollback using snapshots |
Not all hardware features can be virtualised accurately |
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.
Responses