9618/32/M/J/23 question 8: worked solution (May/June 2023, paper 32)

Show as plain text

Cambridge A2 Level Computer Science 9618 · 15.1 Processors, Parallel Processing and Virtual Machines Worked solution from the Hardware and Virtual Machines Paper 3 Advanced Theory booklet, Part 1 of 2. Q7 9618/32/M/J/23 original Q8 Structured · 6 marks 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. Stage 1 2 3 4 5 6 7 8 9 10 11 12 IF A B C D E F ID A B C D E F OF A B C D E F IE A B C D E F WB A B C D E F 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 IDEA In 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 VIDEO ▶ Whole paper Video solution of the whole paper · by qiphyedu. Tap the picture to open it on YouTube.