Question 1 (5 Marks)
Describe the sub-steps a processor performs when executing an individual instruction.
Question 2 (5 Marks)
How does Pipelining improve the performance of a processor?
Question 3 (3 Marks)
What are Hazards? Give two examples of hazards and how they can be avoided.
Question 4 (5 Marks)
Why is parallel programming so much more difficult than serial programming? Give an example of a task that is trivial to parallelise and a task that is difficult to parallelise, with a brief explanation of how you would go about breaking up the task and what synchronisation would be required between the subtasks.
Question 5 (4 Marks)
For many tasks, GPUs are much faster than CPUs. Why is this the case? When will you prefer CPU over GPU?
Question 6 (8 Marks)
Over-subscription can occur on a CPU when there are more threads than physical cores, causing excessive overhead due to context switching between the threads. However, to maximise GPU performance it is advised to run 10,000s threads in parallel. Why is running so many threads in parallel beneficial? Why doesn’t the CPU use the same model?
Sample Solution