This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: CPSC 313, 06w Term 2— Midterm 2 — Solutions Date: March 23, 2007; Instructor: Norm Hutchinson 1. (12 marks) Short answers. 1a. (2 marks) Describe the difference between stalling and creating a bubble. Stalling means that an instruction remains in a particular pipeline stage for another cycle without making progress. Creating a bubble means injecting a dynamically created NOOP instruction into a particular pipeline stage. 1b. (2 marks) Is it possible to stall the pipeline without creating a bubble? Explain briefly. No. When one instruction stalls in stage i , something must move into stage i + 1 , and that something is always a bubble (unless stage i +1 also stalls in which case the bubble happens in stage i + 2 ). 1c. (2 marks) What is the difference between a dependency and a hazard? A dependency is a relationship between instructions that forces them to execute in a particular order. A hazard is a situation that arises in an implementation where the dependency will not be honoured by the implementation without some additional effort. 1d. (2 marks) Give one example of an X86 (IA32) instruction that we have talked about in class that is impossible to execute on the pipelined processor described in class (PIPE-). Explain why it cannot be executed by PIPE-. addl %eax, (%ebx) It cannot be executed because it references memory twice. 1e. (2 marks) What is branch prediction? Why is it useful? Predicting early in the pipeline whether a branch will be taken. It is useful because predicting correctly allows the pipeline to remain full of useful instructions....
View Full Document
This note was uploaded on 10/09/2011 for the course CPSC 344 taught by Professor Karen during the Fall '10 term at UBC.
- Fall '10