9618/31/M/J/24 question 11: worked solution (May/June 2024, paper 31)

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. Q11 9618/31/M/J/24 original Q11 Structured · 8 marks 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 IDEA On 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 VIDEO ▶ Starts at Q11 (1:15:09) Starts at Q11 (1:15:09) · by Pseudocode Pro. Tap the picture to open it on YouTube.