CMSC411 Fall 2013 Midterm 1

Similar documents
ELE 375 Final Exam Fall, 2000 Prof. Martonosi

CMSC 411 Practice Exam 1 w/answers. 1. CPU performance Suppose we have the following instruction mix and clock cycles per instruction.

Final Exam Fall 2007

Computer Architecture CS372 Exam 3

CMSC 411 Computer Systems Architecture Lecture 6 Basic Pipelining 3. Complications With Long Instructions

ECE154A Introduction to Computer Architecture. Homework 4 solution

Complications with long instructions. CMSC 411 Computer Systems Architecture Lecture 6 Basic Pipelining 3. How slow is slow?

ECE 2300 Digital Logic & Computer Organization. Caches

ECE 313 Computer Organization FINAL EXAM December 13, 2000

EE557--FALL 1999 MAKE-UP MIDTERM 1. Closed books, closed notes

EN2910A: Advanced Computer Architecture Topic 02: Review of classical concepts

CS/CoE 1541 Mid Term Exam (Fall 2018).

CS 2506 Computer Organization II Test 2

Good luck and have fun!

ECE 313 Computer Organization FINAL EXAM December 14, This exam is open book and open notes. You have 2 hours.

Instruction Frequency CPI. Load-store 55% 5. Arithmetic 30% 4. Branch 15% 4

ECE331: Hardware Organization and Design

Perfect Student CS 343 Final Exam May 19, 2011 Student ID: 9999 Exam ID: 9636 Instructions Use pencil, if you have one. For multiple choice

Instruction Level Parallelism. Appendix C and Chapter 3, HP5e

CENG 3531 Computer Architecture Spring a. T / F A processor can have different CPIs for different programs.

OPEN BOOK, OPEN NOTES. NO COMPUTERS, OR SOLVING PROBLEMS DIRECTLY USING CALCULATORS.

CSCE 212: FINAL EXAM Spring 2009

CS232 Final Exam May 5, 2001

ENGN 2910A Homework 03 (140 points) Due Date: Oct 3rd 2013

CS 251, Winter 2018, Assignment % of course mark

Final Exam Fall 2008

Computer Architecture Spring 2016

CS433 Homework 3 (Chapter 3)

ELE 818 * ADVANCED COMPUTER ARCHITECTURES * MIDTERM TEST *

CS 230 Practice Final Exam & Actual Take-home Question. Part I: Assembly and Machine Languages (22 pts)

CMSC411 Fall 2013 Midterm 2 Solutions

3/12/2014. Single Cycle (Review) CSE 2021: Computer Organization. Single Cycle with Jump. Multi-Cycle Implementation. Why Multi-Cycle?

Advanced Parallel Architecture Lessons 5 and 6. Annalisa Massini /2017

CS 2506 Computer Organization II Test 2. Do not start the test until instructed to do so! printed

c. What are the machine cycle times (in nanoseconds) of the non-pipelined and the pipelined implementations?

Do not start the test until instructed to do so!

Pipelining. CSC Friday, November 6, 2015

Final Exam Spring 2017

ECE 313 Computer Organization FINAL EXAM December 14, This exam is open book and open notes. You have 2 hours.

Pipelining Analogy. Pipelined laundry: overlapping execution. Parallelism improves performance. Four loads: Non-stop: Speedup = 8/3.5 = 2.3.

Computer Architecture Review. Jo, Heeseung

CS 2506 Computer Organization II Test 2. Do not start the test until instructed to do so! printed

Question 1: (20 points) For this question, refer to the following pipeline architecture.

CS 2506 Computer Organization II Test 2. Do not start the test until instructed to do so! printed

CS 352H Computer Systems Architecture Exam #1 - Prof. Keckler October 11, 2007

Comprehensive Exams COMPUTER ARCHITECTURE. Spring April 3, 2006

CS 61C Fall 2016 Guerrilla Section 4: MIPS CPU (Datapath & Control)

CS433 Midterm. Prof Josep Torrellas. October 16, Time: 1 hour + 15 minutes

DLX Unpipelined Implementation

Pipelining! Advanced Topics on Heterogeneous System Architectures. Politecnico di Milano! Seminar DEIB! 30 November, 2017!

Caches and Memory Hierarchy: Review. UCSB CS240A, Fall 2017

Tomasulo s Algorithm

ECE331: Hardware Organization and Design

Basic Pipelining Concepts

CS 61C Summer 2016 Guerrilla Section 4: MIPS CPU (Datapath & Control)

Minimizing Data hazard Stalls by Forwarding Data Hazard Classification Data Hazards Present in Current MIPS Pipeline

Instruction Pipelining Review

ECE 4750 Computer Architecture, Fall 2017 T05 Integrating Processors and Memories

EE557--FALL 1999 MIDTERM 1. Closed books, closed notes

THE HONG KONG UNIVERSITY OF SCIENCE & TECHNOLOGY Computer Organization (COMP 2611) Spring Semester, 2014 Final Examination

CS 251, Winter 2019, Assignment % of course mark

Chapter 4. The Processor

CS433 Midterm. Prof Josep Torrellas. October 19, Time: 1 hour + 15 minutes

Full Datapath. Chapter 4 The Processor 2

Data Hazards Compiler Scheduling Pipeline scheduling or instruction scheduling: Compiler generates code to eliminate hazard

Lecture 2: Pipelining Basics. Today: chapter 1 wrap-up, basic pipelining implementation (Sections A.1 - A.4)

CSEE 3827: Fundamentals of Computer Systems

Q1: Finite State Machine (8 points)

ECS 154B Computer Architecture II Spring 2009

Instruction Level Parallelism. ILP, Loop level Parallelism Dependences, Hazards Speculation, Branch prediction

COSC 6385 Computer Architecture - Pipelining

Lecture Topics. Announcements. Today: Data and Control Hazards (P&H ) Next: continued. Exam #1 returned. Milestone #5 (due 2/27)

T T T T T T N T T T T T T T T N T T T T T T T T T N T T T T T T T T T T T N.

Caches and Memory Hierarchy: Review. UCSB CS240A, Winter 2016

SOLUTION. Midterm #1 February 26th, 2018 Professor Krste Asanovic Name:

3. (2 pts) Clock rates have grown by a factor of 1000 while power consumed has only grown by a factor of 30. How was this accomplished?

CS232 Final Exam May 5, 2001

Chapter 5. Memory Technology

COSC4201 Instruction Level Parallelism Dynamic Scheduling

4. (2 pts) What is the only valid and unimpeachable measure of performance?

4. What is the average CPI of a 1.4 GHz machine that executes 12.5 million instructions in 12 seconds?

Problem Score Max Score 1 Syntax directed translation & type

Very short answer questions. "True" and "False" are considered short answers.

The Processor Pipeline. Chapter 4, Patterson and Hennessy, 4ed. Section 5.3, 5.4: J P Hayes.

LECTURE 3: THE PROCESSOR

EXAM #1. CS 2410 Graduate Computer Architecture. Spring 2016, MW 11:00 AM 12:15 PM

Multiple Issue ILP Processors. Summary of discussions

ILP concepts (2.1) Basic compiler techniques (2.2) Reducing branch costs with prediction (2.3) Dynamic scheduling (2.4 and 2.5)

(1) Using a different mapping scheme will reduce which type of cache miss? (1) Which type of cache miss can be reduced by using longer lines?

1. Truthiness /8. 2. Branch prediction /5. 3. Choices, choices /6. 5. Pipeline diagrams / Multi-cycle datapath performance /11

Memory Hierarchies. Instructor: Dmitri A. Gusev. Fall Lecture 10, October 8, CS 502: Computers and Communications Technology

EECC551 Exam Review 4 questions out of 6 questions

Chapter 4 The Processor 1. Chapter 4A. The Processor

cs470 - Computer Architecture 1 Spring 2002 Final Exam open books, open notes

CS2100 Computer Organisation Tutorial #10: Pipelining Answers to Selected Questions

LECTURE 10: Improving Memory Access: Direct and Spatial caches

s complement 1-bit Booth s 2-bit Booth s

Pipelining and Exploiting Instruction-Level Parallelism (ILP)

Computer Science and Engineering 331. Midterm Examination #1. Fall Name: Solutions S.S.#:

Donn Morrison Department of Computer Science. TDT4255 Memory hierarchies

Transcription:

CMSC411 Fall 2013 Midterm 1 Name: Instructions You have 75 minutes to take this exam. There are 100 points in this exam, so spend about 45 seconds per point. You do not need to provide a number if you can show the appropriate fraction. E.g., 1/13 is acceptable in place of.0769. This is a closed book exam. No notes or other aids are allowed. If you have a question, please raise your hand and wait for the instructor. Answer essay questions concisely using 1-2 sentences. Longer answers are not necessary and a penalty may be applied. In order to be eligible for partial credit, show all of your work and clearly indicate your answers. Write neatly. Credit cannot be given for illegible answers. Problem Score 1 Computer Architectures /12 2 Reliability, Performance, /18 Amdahl s Law 3 Basic Pipelining /30 4 Pipeline Hazards /16 5 Pipeline Performance /8 6 Cache Organization /16 Total /100

1. (12 pts) Computer architectures a. (3 pts) Describe one advantage of using geometric mean instead of arithmetic mean to combine results from multiple benchmark programs. b. (3 pts) Explain the motivation behind the introduction of pipelining in processor architectures. c. (3 pts) Explain why it is difficult to report exceptions precisely for pipelined architectures. d. (3 pts) Explain how caches exploit spatial locality to improve performance.

2. (18 pts) Reliability, performance, and Amdahl s Law The memory hierarchy consists of cache, memory, and disk. Suppose you are considering replacing your hard disk drive with a faster solid state disk based on flash memory. The access speeds and mean time to failure (MTTF) for different parts of the memory hierarchy are as shown in the table below:. Component Access Time MTTF Cache (SRAM) 10 cycles 10 years Memory (DRAM) 100 cycles 10 years Hard disk drive (HD) 10000 cycles 2 years Solid state disk (SSD) 1000 cycles 5 years a. (6 pts) What is the mean time to failure (MTTF) of the entire memory hierarchy assuming there are 2 caches, 1 memory, and 2 hard disk drives? There is no SSD. b. (6 pts) If 1% of memory accesses result in page misses that require a disk access, what is the average cost of a memory access (in cycles)? Assume no caches. c. (6 pts) For the problem above, what is the improvement in the average memory access time (in cycles) if the hard disk drive is replaced with a solid state disk (i.e., hard disk performance improved by 10x)?

3. (30 pts) Basic pipelining. Use the following code fragment: I1 LW R1, 0(R2) ; R1 address (0+R2) I2 LW R2, 0(R1) ; R2 address (0+R1) I3 ADDI R3, R2, #8 ; R3 R2+8 I4 MULT R4, R1, R1 ; R4 R1*R1 I5 SW R4, 4(R3) ; address(4+r3) R4 a. (10 pts) List all RAW (read-after-write) pipeline hazards in the code, regardless of whether they cause any stalls. Use the classic MIPS five-stage integer pipeline, show the timing of this instruction sequence. Assume all memory accesses take 1 clock cycle, and a register may be read and written in the same clock cycle. b. (10 pts) Assume there is no forwarding or bypassing hardware. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 LW IF ID EX MEM WB LW ADDI MULT SW c. (10 pts) Assume normal forwarding and bypassing hardware. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 LW IF ID EX MEM WB LW ADDI MULT SW

4. (16 pts) Pipeline hazards. Consider the following MIPS floating point pipeline: Processors implement logic to check for potential data hazards (such as RAW and WAW) and forwarding. Recall that the format of MIPS register-register instructions are rd = rs OP rt (i.e., rd is the destination, and rs/rt are the operands), and register immediate instructions (including load/store) are rt = rs OP immed (i.e., rt is the destination, and rs is the operand). Consider the following check: IF/ID.IR[op] = ADD.D & A2/A3.IR[op] = ADD.D & IF/ID.IR[rt] = A2/A3.IR[rd] a. (8 pts) Explain what the logic is checking b. (8 pts) Explain whether the check is needed

5. (8 pts) Pipeline performance. Suppose processor X executes instructions in the following 3 stages (no pipeline), where each stages could run this fast. Compare the performance of a pipelined vs. unpipelined implementation of processor X. IF&ID 12ns EX 7ns MEM&WB 15ns 6. (16 pts) Cache organization Suppose we have a byte addressable memory of size 4GB (2 32 bytes). a. (12 pts) The Intel Core i7 (Sandy Bridge) CPU has a 256K MB L2 cache (2 17 bytes, not including tag bits) and a cache block size of 64 (2 6 ) bytes. The L2 cache is 8-way (2 3 ) associative. Compute for the L2 cache the length in number of bits for the tag, index and offset fields of a 32-bit memory address (show your calculations) Power of 2 Value 2 1 2 2 2 4 2 3 8 2 4 16 2 5 32 2 6 64 2 7 128 2 8 256 2 9 512 2 10 1K 2 20 1M 2 30 1G b. (4 pts) Considering the answer to part (a), circle the bits representing the index in the following 32-bit memory address (in binary): 1 0 0 1 1 1 0 1 1 1 0 0 0 1 1 0 1 1 1 0 1 0 0 1 1 1 0 0 0 1 0 0