Cambridge A2 Level Computer Science 9618 · 15.1 Processors, Parallel Processing and Virtual Machines

Q11 · 9618/31/M/J/24 Q11

Worked solution from the Hardware and Virtual Machines Paper 3 Advanced Theory booklet, Part 1 of 2.

Q119618/31/M/J/24original Q11Structured · 8 marks
Question 11 from 9618/31/M/J/24

Worked solution

(a)

Write any two of these features of RISC:

Uses relatively few, simple instructions [1]

Each instruction takes a single clock cycle [1]

Other features that score: hard-wired control unit, few addressing modes, fixed-length instructions, many general-purpose registers, pipelining is easy to use, few transistors.

(b)

Write the steps in order:

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

The current program is paused and the contents of the registers are saved on the stack [1]

The interrupt service routine (ISR) is run. When it finishes, the registers are restored from the stack and the program carries on [1]

(c)

Write three of these:

Pipelining makes interrupt handling harder, because several instructions are still in the pipeline when the interrupt arrives [1]

The instructions in the pipeline are usually discarded, except the last one (the one at write back) [1]

The interrupt handler is then run, and once it is done the processor restarts from the next instruction in the sequence [1]

KEY IDEAOn an interrupt the processor saves its state, runs the interrupt routine, then restores the state; pipelining means unfinished instructions in the pipeline must be dealt with first.
TOTAL 8 marks

Official mark scheme

Mark scheme for 9618/31/M/J/24 question 11
VIDEO
▶ Starts at Q11 (1:15:09)

Starts at Q11 (1:15:09) · by Pseudocode Pro. Tap the picture to open it on YouTube.

Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.