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

Q7 · 9618/32/M/J/23 Q8

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

Q79618/32/M/J/23original Q8Structured · 6 marks
Question 8 from 9618/32/M/J/23

Worked solution

(a)

Say what pipelining does and why it helps.

Pipelining lets several instructions be processed at the same time, each one in a different stage [1]

This increases the instruction throughput (more instructions completed in a given time), for example one instruction is being decoded while the next is being fetched [1]

Other points that score: each stage takes one clock cycle, and no two instructions can be in the same stage in the same cycle.

(b)

Call the six instructions A to F. Each one moves down one stage per clock cycle, and the next instruction starts one cycle after the one before it.

Stage123456789101112
IFABCDEF
IDABCDEF
OFABCDEF
IEABCDEF
WBABCDEF

Instruction A starts at IF in clock cycle 1 [1]

Instruction A passes through IF, ID, OF, IE, WB over five clock cycles (1 to 5) [1]

The other instructions each start one cycle later, so the last one (F) finishes in cycle 10 [1]

No extra stage boxes added on any row (cycles 11 and 12 stay empty) [1]

Numbering such as 1.1, 1.2 ... instead of letters is also accepted.

KEY IDEAIn a pipeline each instruction is one stage behind the one in front, so after the pipeline fills, one instruction finishes every clock cycle.
TOTAL 6 marks

Official mark scheme

Mark scheme for 9618/32/M/J/23 question 8
VIDEO
▶ Whole paper

Video solution of the whole paper · by qiphyedu. 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.