cs313-2006-t2-midterm2-solution - CPSC 313, 06w Term 2—...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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.

Page1 / 4

cs313-2006-t2-midterm2-solution - CPSC 313, 06w Term 2—...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online