Skip to content
Cambridge AS & A Level9618

Processors, Parallel Processing and Virtual Machines

Computer Science 9618 Chapter Notes

Last updated November 2026

ShareWhatsAppPost

Processors, Parallel Processing and Virtual Machines notes as a printable PDF.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Processors, Parallel Processing and Virtual Machines notes as text: skim, search, and jump between subtopics.

~14 min read

1. RISC and CISC processors

A Reduced Instruction Set Computer (RISC) processor has relatively few, simple instructions. A Complex Instruction Set Computer (CISC) processor has a large instruction set.

RISC: fixed length instructions, single-clock-cycle instructions, few addressing modes, many general-purpose registers, a hard-wired control unit. It works well with pipelining and the design emphasis is on the software.

CISC: a large instruction set, many instruction formats and addressing modes, variable length or multi-operation instructions, multi-clock-cycle instructions and complex decoding. The design emphasis is on the hardware.

Examiner insight

“Many candidates gave too many incorrect responses to gain any credit.”

Worked example 14 marks

Reduced Instruction Set Computers (RISC) is a type of processor. Identify four features of a RISC processor.

  1. 1

    uses single-clock cycle instructions [1]

  2. 2

    uses fixed length instructions [1]

  3. 3

    uses many general-purpose registers [1]

  4. 4

    works well with pipelining (any four of the features above, or: low number of instruction formats, hard-wired control unit, low number of addressing modes, design emphasis on the software) [1]

2. Interrupt handling

At the start or end of each fetch-execute cycle, the processor checks whether an interrupt flag is set. It identifies the source of the interrupt and checks its priority. If the priority is high enough, the current program is stopped and the status of each register is stored on the stack.

The Interrupt Service Routine (ISR) is then executed. Afterwards the registers are restored from the stack, so the original program carries on.

A RISC processor may have several instructions still in its pipeline when an interrupt arrives. They are usually discarded except the one at write back, and the interrupt handler is applied to that instruction. Once the interrupt is serviced, the processor restarts with the next instruction in the sequence.

Examiner insight

“There was little mention of checking the priority of the interrupt and few candidates stated where in the FE cycle the check for interrupts would occur. There seemed to be an assumption that all current processes would be stopped immediately and the interrupt from the keyboard would be processed without any delay.”

Worked example 13 marks

Outline the process of interrupt handling as it could be applied to RISC or CISC processors.

  1. 1

    the processor detects an interrupt at the start / end of the fetch-execute cycle [1]

  2. 2

    the current program is temporarily stopped and the status of each register is stored on the stack [1]

  3. 3

    after the interrupt has been serviced (the ISR has been executed), the registers are restored to their original status from the stack [1]

3. Pipelining and registers in RISC

Pipelining divides the processing of an instruction into stages: instruction fetch (IF), instruction decode (ID), operand fetch (OF), instruction execute (IE) and write back result (WB). Several instructions are processed simultaneously, each at a different stage, so the instruction throughput of the CPU increases.

Each stage is completed during one clock cycle and uses a different register. No two instructions can be in the same stage in the same clock cycle. Instructions A, B and C pass through like this:

``` cycle 1 2 3 4 5 6 7 IF A B C ID A B C OF A B C IE A B C WB A B C ```

clock cycles = k + (n - 1) (k stages, n instructions)

Examiner insight

“This required a response and expansion based on the idea that pipelining allows multiple instructions to be processed simultaneously.” “Responses needed to clearly identify each of the six instructions as they passed through the five stages.”

Worked example 12 marks

Describe the use of pipelining in Reduced Instruction Set Computers (RISC).

  1. 1

    pipelining allows several instructions to be processed simultaneously / concurrently [1]

  2. 2

    therefore increasing the CPU instruction throughput / the number of instructions completed per unit of time [1]

4. The four computer architectures

SISD (Single Instruction, Single Data) has one processor, a control unit and a memory unit. A single instruction is performed on data from a single source, so instructions run sequentially. SIMD (Single Instruction, Multiple Data) performs the same operation on multiple data streams simultaneously. It uses multiple processors and can take advantage of pipelining.

MISD (Multiple Instruction, Single Data) performs different operations on the same data stream, each processor working on that stream independently. MIMD (Multiple Instruction, Multiple Data) has many processors. At any time each can execute different instructions on different data, and they operate independently.

Examiner insight

“However, very few candidates went beyond this, for example, to identify that both architectures make use of parallel computers with multiple processors, or that SIMD computers can take advantage of pipelining.” “However, relatively few candidates expanded their MIMD description sufficiently.”

Worked example 16 marks

There are four basic categories of computer architecture. Single Instruction Single Data (SISD) is one architecture. Identify the three other categories of computer architecture. Describe each category that you identify.

  1. 1

    SIMD: many / array processors execute the same instruction using different data sets [2]

  2. 2

    MISD: many processors (using different instructions) use the same data set [2]

  3. 3

    MIMD: many processors (using different instructions) use different data sets [2]

5. Massively parallel computers

A massively parallel computer links a large number of processors, or separate computers, together to form a more powerful 'single machine'.

The processors work simultaneously on the same problem. Each is responsible for its own part of it, and the computations are coordinated.

The processors are connected by a network infrastructure. They communicate by sending messages, or through shared pools of memory.

Examiner insight

“Candidates who outlined the characteristics of massively parallel computers as a large number of computer processors working collaboratively and connected using a network infrastructure, or similar, achieved full marks.”

Worked example 13 marks

Outline the characteristics of massively parallel computers.

  1. 1

    a large number of computer processors / separate computers connected together [1]

  2. 2

    simultaneously performing a set of coordinated computations // collaborative processing [1]

  3. 3

    network infrastructure, and communication using a message interface / by sending messages [1]

6. The concept of a virtual machine

A virtual machine (VM) is a standalone environment running on a physical computer. It is not a physical machine, but it can emulate the hardware and software of another system.

The host machine provides the physical resources, such as RAM and ROM, and is controlled through the host operating system. A guest operating system runs within the VM, under the control of the host operating system, and controls the virtual hardware.

A hypervisor runs between the host and guest operating systems. It creates and runs the virtual machines and allocates resources from the host to the guest. Several VMs can run on one host.

Worked example 14 marks

Explain what is meant by the term virtual machine.

  1. 1

    a VM is a standalone environment running on a physical computer // a VM is not a physical machine [1]

  2. 2

    it can emulate the hardware / software of another system [1]

  3. 3

    the host machine provides all the physical resources, and is controlled via a host operating system [1]

  4. 4

    a guest OS runs within the VM / host OS and controls / accesses the virtual hardware / software [1]

7. Benefits and limitations of virtual machines

Benefits: compatibility, since applications that are not compatible with the host can run in a VM, or software can be tried on a different operating system on the same hardware. Protection, since a fault in the guest does not affect the host, and recovery from a crash is easier. Cost, since there is no need to buy extra hardware.

Limitations: performance, since the VM runs extra code, shares memory and depends on the host. Complexity, since both host and VM must be set up and maintained. Hardware or software issues, since some of it cannot be emulated or directly accessed.

Examiner insight

“Some candidates correctly answered only some of these sections.”

Worked example 16 marks

A virtual machine is used to emulate a new computer system. Describe two benefits and one limitation of using a virtual machine for this purpose.

  1. 1

    Benefit 1: the new system can be tried on different virtual hardware, without the need to purchase the hardware [2]

  2. 2

    Benefit 2: it is easier to recover if the software emulating the new computer causes a system crash, as the VM provides protection to other software [2]

  3. 3

    Limitation: a virtual machine means execution of extra code, with resources shared, so processing time increases / performance degrades [2]

Recap

  • RISC: few simple instructions, fixed length, single clock cycle, many general-purpose registers, suits pipelining.
  • CISC: large instruction set, variable length, multi-clock-cycle, many addressing modes, complex decoding.
  • Interrupt: register status stored on the stack, ISR runs, registers restored from the stack.
  • Pipelining: several instructions at different stages at once, so instruction throughput rises. Each stage uses a different register.
  • SISD one instruction, one data. SIMD same instruction, many data. MISD many instructions, one data. MIMD many instructions, many data.
  • Massively parallel: a large number of processors, working simultaneously on one problem, linked by a network.
  • A VM emulates another system on a host. Benefits: compatibility, protection, cost. Limitations: performance, complexity, hardware or software that cannot be emulated.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. State one difference between the instructions of a RISC processor and a CISC processor.2 marks
    Answer
    1. RISC instructions are fixed length [1], whereas CISC instructions are variable length [1].
    2. (Or: RISC uses single-clock-cycle instructions [1], whereas CISC uses multi-clock-cycle instructions [1].)

    Trap: Swapping the two processors: RISC is the one with fixed length instructions and few addressing modes.

  2. State whether each feature belongs to a RISC or a CISC processor: (a) single-clock-cycle instructions, (b) many addressing modes, (c) many general-purpose registers, (d) multi-clock-cycle instructions.4 marks
    Answer
    1. (a) RISC [1].
    2. (b) CISC [1].
    3. (c) RISC [1].
    4. (d) CISC [1].

    Trap: 'Reduced' does not mean fewer registers: a RISC processor uses many general-purpose registers.

  3. A processor is running a program when an interrupt is detected. Outline what the processor does to the registers, from the moment the interrupt is detected until the program carries on.3 marks
    Answer
    1. The current program is stopped and the status of each register is stored on the stack [1].
    2. The Interrupt Service Routine is executed [1].
    3. The registers are then restored from the stack [1].

    Trap: Storing the registers but never restoring them: the original program could not carry on from where it stopped.

  4. A RISC processor divides every instruction into five stages. Each stage takes one clock cycle. Calculate the number of clock cycles needed to complete 8 instructions (a) with no pipelining, one instruction at a time, and (b) with pipelining.3 marks
    Answer
    1. (a)
    2. 8 × 5 = 40 clock cycles [1].
    3. (b)
    4. The first instruction takes 5 cycles, then one more instruction completes in each following cycle [1].
    5. 5 + (8 - 1) = 12 clock cycles [1].

    Trap: 5 + 8 = 13 counts the first instruction's five stages and then adds it again.

  5. A student says: 'Pipelining makes every instruction finish sooner.' Explain what pipelining actually improves.2 marks
    Answer
    1. Several instructions are processed simultaneously, each at a different stage [1].
    2. So more instructions are completed per unit of time: the instruction throughput increases [1].

    Trap: Each instruction still passes through all five stages, so it takes the same number of clock cycles.

  6. Name the computer architecture described. (a) One processor executes one instruction at a time on data from a single source. (b) Many processors perform the same operation on different data streams at the same time. (c) Many processors perform different operations on the same data stream. (d) Many processors operate independently, each executing different instructions on different data.4 marks
    Answer
    1. (a) SISD [1].
    2. (b) SIMD [1].
    3. (c) MISD [1].
    4. (d) MIMD [1].

    Trap: SIMD and MISD swapped: SIMD has one instruction and many data, MISD has many instructions and one data.

  7. A weather model runs on thousands of linked computers. Explain why a network infrastructure is needed.2 marks
    Answer
    1. The computers are separate processors that are connected together [1].
    2. They communicate by sending messages, so each can work on its own part of the same problem [1].

    Trap: The computers do not work on unrelated problems: they work simultaneously on one problem, each on its own part.

  8. A student runs a guest operating system in a virtual machine on a laptop. State the role of the host operating system and the role of the guest operating system.4 marks
    Answer
    1. Host: the normal operating system of the laptop, with control of all its resources [1].
    2. Host: it runs the virtual machine software [1].
    3. Guest: it runs within the virtual machine, under the control of the host operating system [1].
    4. Guest: it controls the virtual hardware, and reaches the real hardware only through the virtual machine and the host [1].

    Trap: The guest operating system does not control the laptop's physical hardware directly.

  9. A bank must keep running an accounts program written for an old operating system. The program is not compatible with the operating system on its new server. The bank also wants to open suspicious email attachments safely. It plans to use virtual machines on the new server. (a) Explain how a virtual machine lets the bank keep running the old program. (b) Explain why a virtual machine is a safe place to open a suspicious attachment. (c) A manager says: 'The virtual machines will give the server extra memory.' Explain why this is wrong.6 marks
    Answer
    1. (a)
    2. A guest operating system that is compatible with the old program runs within the virtual machine [1].
    3. The virtual machine runs on the new server's hardware, under the host operating system, so no old hardware is needed [1].
    4. (b)
    5. If the attachment is a virus or crashes the guest operating system, only the virtual machine is affected [1].
    6. The host server and anything outside the virtual machine are protected, and recovery is easier [1].
    7. (c)
    8. A virtual machine shares the host's memory and runs extra code [1].
    9. So it uses up the server's resources and performance degrades; it does not add memory [1].

    Trap: Confusing a virtual machine with virtual memory, a mistake examiners reported, and giving a benefit such as 'it is safer' with no reason.

  10. A RISC processor has a five-stage pipeline (IF, ID, OF, IE, WB), one stage per clock cycle. Instruction 1 is fetched in clock cycle 1, and a program of 10 instructions runs. (a) Calculate the number of clock cycles needed for the whole program with pipelining, and without pipelining. (b) State the clock cycle in which instruction 4 is in the IE stage. (c) An interrupt is received during clock cycle 7. State which instruction is at write back, what happens to the other instructions in the pipeline, and where the program restarts after the interrupt is serviced.6 marks
    Answer
    1. (a)
    2. With pipelining: 5 + (10 - 1) = 14 clock cycles [1].
    3. Without pipelining: 10 × 5 = 50 clock cycles [1].
    4. (b)
    5. Instruction 4 is fetched in cycle 4, so IE (the fourth stage) is in cycle 4 + 3 = 7 [1].
    6. (c)
    7. In cycle 7 the stages hold: IF instruction 7, ID instruction 6, OF instruction 5, IE instruction 4, WB instruction 3. Instruction 3 is at write back [1].
    8. Instructions 4, 5, 6 and 7 are discarded; the interrupt handler is applied to instruction 3 [1].
    9. After servicing, the processor restarts with the next instruction in the sequence, instruction 4 [1].

    Trap: Losing track of which instruction is in which stage: in cycle 7 write back holds instruction 3, not instruction 7, and 10 + 5 = 15 counts the first instruction's stages twice.

Say this, not that

Wording that loses the mark, against the wording the mark scheme credits.

Loses the markGets the mark
A virtual machine is an area of storage used to extend memory.A virtual machine is a standalone environment that can emulate the hardware or software of another system.
MIMD has many processors.MIMD has many processors that operate independently, each executing different instructions on different data.
Pipelining makes the processor faster.Pipelining processes several instructions simultaneously, increasing instruction throughput.
Massively parallel computers have lots of processors.A large number of processors working collaboratively, connected using a network infrastructure.

Frequently asked questions

What is the difference between RISC and CISC processors?
A RISC processor has relatively few, simple instructions, mostly fixed length and single-clock-cycle, with many general-purpose registers and a hard-wired control unit. A CISC processor has a large instruction set, with variable length or multi-operation instructions that take several clock cycles. The RISC design emphasis is on the software, and the CISC emphasis is on the hardware.
How does pipelining increase the instruction throughput of a processor?
Pipelining divides the processing of an instruction into stages: instruction fetch, instruction decode, operand fetch, instruction execute and write back. Several instructions are processed simultaneously, each at a different stage, so the instruction throughput of the CPU increases. Each stage is completed during one clock cycle, and the number of clock cycles is k + (n - 1), for k stages and n instructions.
What happens when a processor receives an interrupt?
At the start or end of each fetch-execute cycle, the processor checks whether an interrupt flag is set and checks its priority. If the priority is high enough, the status of each register is stored on the stack. The Interrupt Service Routine is then executed, and the registers are restored from the stack so the original program carries on.
What are the four computer architectures SISD, SIMD, MISD and MIMD?
SISD performs a single instruction on data from a single source, so instructions run sequentially. SIMD performs the same operation on multiple data streams at the same time. MISD performs different operations on the same data stream. MIMD has many processors, each executing different instructions on different data, and they operate independently.
What is a virtual machine and how does the host operating system control it?
A virtual machine is a standalone environment running on a physical computer, which can emulate the hardware and software of another system. The host operating system controls the host machine and its physical resources. A guest operating system runs within the VM, and a hypervisor runs between the host and guest operating systems.
Is a virtual machine the same as virtual memory?
No. A virtual machine is a standalone environment that can emulate the hardware or software of another system. Virtual memory is an area of secondary storage used to temporarily extend the available memory, and it is not a virtual machine.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters