

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Computer System Organization; Subject: Computer Science; University: University of Illinois - Urbana-Champaign; Term: Fall 2006;
Typology: Assignments
1 / 3
This page cannot be seen from the preview
Don't miss anything!


CS433: Computer Systems Organization Fall 2006 Homework 1 Assigned: 8/ Due in class 9/
Instructions: Please write an alias on your homework submissions for posting grades. We will use this alias throughout the quarter. Homeworks are due in class on the date posted.
(a) What percentage of a program must be run in enhanced mode must be used to achieve a speed up of 2? (b) For a given program, if enhanced mode is used 30% of the execution time, what is the speedup of the program with the enhancement over the program without the enhancement? (Note that the 30% is the percentage of time spent in enhanced mode, not the percentage of the program that can use enhanced mode).
(a) Calculate the CPU time of a program assuming a 800MHz processor and 10^8 instructions. (b) Suppose a processor runs at 800MHz and an average program follows the above chart. What is it the processor’s MIPS rating?
(a) How many times does this loop execute? (b) Use a pipeline timing chart similar to Figure A.5 of the textbook to show the timing of the above code fragment as it gets executed. Show only 1 iteration and the load for the following iteration. Assume there is no bypassing/forwarding hardware, branches are resolved in the memory stage and are handled by flushing the pipeline (aka let all the instructions currently in the pipeline finish execution before loading the first instruction at the branch target) and that register writes occur in the 1st half of the clock cycle and register reads occur on the 2nd half. Use IF, ID, EX, MEM, WB to indicate which stage the instruction is in and use S to indicate stalls. (c) Do the same thing as in part b but this time assume there is bypassing/forwarding hardware. (d) How many cycles does it take to execute the entire fragment in part b? in part c?
Consider following the code fragment. loop: LW r1, 0(r2) DADDI r1, r1 1 LW r3 0(r5) SW r1, 0(r2) DADDI r4, r4 - BNEZ r4, loop DADD r2, r2 r Assume that before the loop begins, the value of r4 is 184 and the system is the classic 5 stage integer pipeline RISC processor as discussed in class and that memory accesses take 1 cycle. Assume there is full bypassing/forwarding hardware, branches are resolved in the memory stage and that register writes occur in the 1st half of the clock cycle and register reads occur on the 2nd half. In addition, branches are predicted as taken and there is 1 branch delay slot.
(a) Use a pipeline timing chart similar to Figure A.5 of the textbook to show the timing of the above code fragment as it gets executed. Show the 1st iteration. (b) In general, how does statically predicting the outcome of a branch improve performance? (c) What is the drawback of statically predicting taken without any additional modifications? How does the branch delay slot improve performance?