Back to the topic

The mark scheme starts on a new page, so you can print pages one and two for a student and keep the last page yourself. Everything prints in black on white whichever theme you are using.

A Level · 1.1.2

Types of Processor

Section A: 10 multiple choice questions, 10 marks. Section B: 5 written questions, 18 marks. Total 28 marks.

Name

Class

Date

Mark  / 28

Section A

Circle the letter of the correct answer. One mark each.

  1. 1Which is a characteristic of RISC?1
    1. AFixed length instructions that mostly execute in one cycle
    2. BFewer instructions per program
    3. CComplexity in the hardware
    4. DVariable length complex instructions
  2. 2Where does complexity sit in a RISC system?1
    1. AIn the operating system
    2. BIn the compiler
    3. CIn cache
    4. DIn the hardware
  3. 3Why are GPUs well suited to machine learning?1
    1. AThey require no memory
    2. BThey have higher clock speeds than CPUs
    3. CThe same operation is applied across huge amounts of data simultaneously
    4. DThey have larger instruction sets
  4. 4What does SIMD stand for?1
    1. AShared Interrupt Memory Device
    2. BSingle Instruction Multiple Data
    3. CSequential Instruction Modular Design
    4. DSimple Integrated Microprocessor Design
  5. 5Why does doubling the number of cores not halve execution time?1
    1. ACores run at half speed when doubled
    2. BThe clock speed drops
    3. CPart of the task is sequential and coordination adds overhead
    4. DOperating systems only use one core
  6. 6Which architecture is used in almost all mobile phones?1
    1. ARISC, specifically ARM
    2. BCISC, specifically x86
    3. CHarvard only
    4. DNeither
  7. 7What is microcode?1
    1. AThe source code of an operating system
    2. BA type of cache
    3. CAssembly language
    4. DLow level instructions inside a CISC processor implementing its complex instructions
  8. 8A task is 20 per cent sequential. What is the maximum possible speedup with unlimited processors?1
    1. A20 times
    2. BUnlimited
    3. C80 times
    4. D5 times
  9. 9Which task is LEAST suited to a GPU?1
    1. ARunning an operating system with complex branching
    2. BRendering graphics
    3. CTraining a neural network
    4. DProcessing a large image
  10. 10Compared with CISC, a RISC program for the same task typically:1
    1. AContains the same number
    2. BCannot be written
    3. CContains fewer instructions
    4. DContains more instructions

Section B

Answer in the space provided. The number of marks tells you how many separate points to make.

  1. 1StateState two differences between RISC and CISC processors.2
  2. 2ExplainExplain why RISC processors are commonly used in mobile devices.4
  3. 3ExplainExplain why a GPU is more suitable than a CPU for training a machine learning model.4
  4. 4ExplainA program is run on a system with four cores rather than one, but the execution time is only reduced by 40 per cent rather than 75 per cent. Explain why.5
  5. 5ExplainExplain what is meant by a co-processor and give an example of its use.3

Mark scheme

Section A

1A2B3C4B5C6A7D8D9A10D

Section B

1 State two differences between RISC and CISC processors. 2

One mark for each of the following, to a maximum of 2.

  • RISC has a small instruction set with fixed length instructions, CISC has a large set with variable length
  • RISC instructions usually take one cycle, CISC instructions take several

Model answer. A RISC processor has a small instruction set consisting of simple, fixed length instructions, whereas a CISC processor has a large instruction set containing complex instructions of variable length. As a consequence, RISC instructions typically complete in a single clock cycle while CISC instructions may take several, which means a RISC program needs more instructions to accomplish the same task but is far easier to pipeline.

2 Explain why RISC processors are commonly used in mobile devices. 4

One mark for each of the following, to a maximum of 4.

  • Simpler hardware consumes less power
  • Battery life is a critical constraint on a mobile device
  • Fixed length uniform instructions pipeline effectively, giving good throughput
  • Less complex hardware also generates less heat, which matters in a sealed device

Model answer. RISC processors use a small set of simple instructions implemented in comparatively simple hardware, and that simplicity translates directly into lower power consumption per instruction. On a mobile device, where everything runs from a battery of fixed capacity, power efficiency is the dominant design constraint and outweighs raw peak performance. The uniform, fixed length instructions also pipeline extremely effectively, so despite each instruction doing less work the processor achieves high throughput, closing much of the performance gap. Finally, simpler hardware drawing less power generates less heat, which is essential in a thin sealed device with no fan and no room for a heatsink.

3 Explain why a GPU is more suitable than a CPU for training a machine learning model. 4

One mark for each of the following, to a maximum of 4.

  • Training is dominated by the same arithmetic applied to very large amounts of data
  • A GPU has thousands of simple cores that operate in parallel
  • This matches the SIMD model of one instruction applied to many data items
  • A CPU has few cores optimised for complex sequential work, so it processes far fewer values per cycle

Model answer. Training a machine learning model consists overwhelmingly of matrix multiplication, which means the same arithmetic operation applied independently to enormous numbers of values. A GPU is built for exactly this: it contains thousands of relatively simple cores that all execute the same instruction on different data at the same time, which is the single instruction multiple data model. Because the calculations for different elements do not depend on one another, they can all proceed in parallel with almost no coordination cost, so a GPU can complete in one pass what would take a CPU many thousands. A CPU has only a handful of cores, each of which is optimised for complex sequential work with sophisticated branch prediction and large caches, so although each core is individually far more capable, the total number of arithmetic operations completed per cycle is orders of magnitude lower for this kind of workload.

4 A program is run on a system with four cores rather than one, but the execution time is only reduced by 40 per cent rather than 75 per cent. Explain why. 5

One mark for each of the following, to a maximum of 5.

  • Part of the task must be executed sequentially and cannot be divided
  • Amdahl's law limits the speedup to the fraction that can be parallelised
  • Data dependencies mean some steps must wait for earlier results
  • Coordinating the cores and sharing data adds overhead
  • The software may not divide the work evenly, leaving some cores idle

Model answer. Only part of a program can usually be parallelised. Any section that must execute sequentially, such as reading the input, setting up data structures or producing the final output, takes exactly the same time regardless of how many cores are available, and Amdahl's law states that this sequential fraction places a hard ceiling on the achievable speedup. Within the parallel section, data dependencies further limit what can genuinely run at once, because a calculation that requires the result of an earlier step cannot begin until that step has completed. On top of this, running work across four cores introduces overhead that did not exist with one: threads must be created and scheduled, access to shared data must be synchronised to prevent corruption, and results must be gathered and combined at the end, all of which consumes time that grows as more cores are added. Finally, the work may not divide into four equal parts, so some cores finish early and sit idle while the slowest thread completes, and the overall time is determined by that slowest thread rather than by the average.

5 Explain what is meant by a co-processor and give an example of its use. 3

One mark for each of the following, to a maximum of 3.

  • A secondary processor that handles specific tasks
  • It relieves the main processor of that work
  • Gives a valid example such as a GPU or a maths co-processor

Model answer. A co-processor is an additional processor that works alongside the main CPU and is specialised for a particular class of task, taking that work off the CPU so it is free to do other things. Because it is designed for one kind of computation it can perform that work far more efficiently than a general purpose processor would. The most familiar example is a GPU, which handles the rendering calculations for graphics and, increasingly, the matrix arithmetic for machine learning, allowing the CPU to run the operating system and application logic without being blocked by that work.