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

Similar documents
EECS 322 Computer Architecture Improving Memory Access: the Cache

Computer Architecture CS372 Exam 3

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

ECE/CS 552: Pipelining

COMP2611: Computer Organization. The Pipelined Processor

The Processor. Z. Jerry Shi Department of Computer Science and Engineering University of Connecticut. CSE3666: Introduction to Computer Architecture

Designing a Pipelined CPU

ECE Sample Final Examination

ECE260: Fundamentals of Computer Engineering

Final Exam Spring 2017

Do not start the test until instructed to do so!

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

ECS 154B Computer Architecture II Spring 2009

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

Computer Architecture V Fall Practice Exam Questions

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

Virtual memory. Hung-Wei Tseng

The University of Alabama in Huntsville Electrical & Computer Engineering Department CPE Test II November 14, 2000

ECE 30, Lab #8 Spring 2014

ECE331: Hardware Organization and Design

Virtual memory. Hung-Wei Tseng

Midnight Laundry. IC220 Set #19: Laundry, Co-dependency, and other Hazards of Modern (Architecture) Life. Return to Chapter 4

COMPUTER ORGANIZATION AND DESIGN. The Hardware/Software Interface. Chapter 4. The Processor: A Based on P&H

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

Chapter 4. Instruction Execution. Introduction. CPU Overview. Multiplexers. Chapter 4 The Processor 1. The Processor.

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

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

CS232 Final Exam May 5, 2001

Pipelined Datapath. Reading. Sections Practice Problems: 1, 3, 8, 12

EC 413 Computer Organization - Fall 2017 Problem Set 3 Problem Set 3 Solution

ELEC 5200/6200 Computer Architecture and Design Spring 2017 Lecture 4: Datapath and Control

Lecture 4: Review of MIPS. Instruction formats, impl. of control and datapath, pipelined impl.

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

Instruction word R0 R1 R2 R3 R4 R5 R6 R8 R12 R31

Improving Performance: Pipelining

ECE 313 Computer Organization FINAL EXAM December 13, 2000

Improve performance by increasing instruction throughput

ECE 331 Hardware Organization and Design. UMass ECE Discussion 10 4/5/2018

CS 2506 Computer Organization II Test 2

CSE 2021 Computer Organization. Hugh Chesser, CSEB 1012U W12-M

Lecture 6: Pipelining

Multi-cycle Datapath (Our Version)

CPS 104 Final Exam. 2pm to 5pm Open book exam. Answer all questions, state all your assumptions, clearly mark your final answer. 1.

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

Lecture 8: Data Hazard and Resolution. James C. Hoe Department of ECE Carnegie Mellon University

Processor (I) - datapath & control. Hwansoo Han

ELE 375 / COS 471 Final Exam Fall, 2001 Prof. Martonosi

CS 251, Winter 2019, Assignment % of course mark

Pipelining. CSC Friday, November 6, 2015

CS 251, Winter 2018, Assignment % of course mark

ECE 313 Computer Organization EXAM 2 November 11, 2000

What do we have so far? Multi-Cycle Datapath (Textbook Version)

CS 251, Winter 2018, Assignment % of course mark

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

Computer and Information Sciences College / Computer Science Department Enhancing Performance with Pipelining

ISA Instruction Operation

CPE 335 Computer Organization. Basic MIPS Pipelining Part I

Pipelined Datapath. Reading. Sections Practice Problems: 1, 3, 8, 12 (2) Lecture notes from MKP, H. H. Lee and S.

Pipelining. lecture 15. MIPS data path and control 3. Five stages of a MIPS (CPU) instruction. - factory assembly line (Henry Ford years ago)

Final Exam Fall 2007

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

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

CSCI-564 Advanced Computer Architecture

Lecture 9 Pipeline and Cache

ECE 2300 Digital Logic & Computer Organization. Caches

What do we have so far? Multi-Cycle Datapath

Solutions for Chapter 6 Exercises

Processor Design Pipelined Processor (II) Hung-Wei Tseng

Pipelining. Chapter 4

Chapter 4. The Processor

Full Name: NetID: Midterm Summer 2017

Quiz #1 EEC 483, Spring 2019

Final Exam Fall 2008

Pipelined datapath Staging data. CS2504, Spring'2007 Dimitris Nikolopoulos

Chapter 4. The Processor. Computer Architecture and IC Design Lab

T = I x CPI x C. Both effective CPI and clock cycle C are heavily influenced by CPU design. CPI increased (3-5) bad Shorter cycle good

ECE232: Hardware Organization and Design

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

Design of the MIPS Processor (contd)

CMSC411 Fall 2013 Midterm 1

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

CS232 Final Exam May 5, 2001

Codeword[1] Codeword[0]

Outline. A pipelined datapath Pipelined control Data hazards and forwarding Data hazards and stalls Branch (control) hazards Exception

CS 465 Final Review. Fall 2017 Prof. Daniel Menasce

CS 351 Exam 2 Mon. 11/2/2015

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

Caches. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. See P&H 5.1, 5.2 (except writes)

EECS150 - Digital Design Lecture 10- CPU Microarchitecture. Processor Microarchitecture Introduction

Winter 2009 FINAL EXAMINATION Location: Engineering A Block, Room 201 Saturday, April 25 noon to 3:00pm

CSE Quiz 3 - Fall 2009

Computer Architecture, IFE CS and T&CS, 4 th sem. Single-Cycle Architecture

NATIONAL UNIVERSITY OF SINGAPORE

ECE3055B Fall 2004 Computer Architecture and Operating Systems Final Exam Solution Dec 10, 2004

ECE154A Introduction to Computer Architecture. Homework 4 solution

Chapter 4. The Processor

Computer Organization and Structure

Computer and Information Sciences College / Computer Science Department The Processor: Datapath and Control

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

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

Transcription:

1 of 7 ay 13, 2002 v2 Spring 2002 Final Exam open books, open notes Starts: 7:30 pm Ends: 9:30 pm Name: (please print) ID: Problem ax points Your mark Comments 1 10 5+5 2 40 10+5+5+10+10 3 15 5+10 4 10 5+5 5 10 6 15 10+5 100 This paper will be retained for one year in the Computer Science Department. Computer Science Department

State all your assumptions clearly! v2 2 of 7 1. You know the following about the time distribution of instructions in your favorite application: t i CPI i ALU 50% 4 Load/store 40% 6 Branches 10% 5 a) compute the average CPI for your application. b) compute the IPS for your machine using the above table; the clock rate for your machine is 1 GHz.

State all your assumptions clearly! v2 3 of 7 2. Consider the following fragment of C code: i = 100; while (i) { a[i] = b[i] + c; i = i - 1; } Assume that a and b are arrays of words and that the base address of a is in $a0 and the base address for b is in $a1. i is in $t0, and c is in $s0. a) Write the code for IPS using native instructions. b) How many instructions are executed during the running of this code? c) How many memory references will be made during execution?

State all your assumptions clearly! v2 4 of 7 d) Assume your code will run on the pipelined datapath of Figure 6.30 (see also attached). Identify all pipeline hazards. c) What is the average CPI of your code running on the pipelined datapath of Figure 6.30?

State all your assumptions clearly! v2 5 of 7 3. You have a register-register architecture that has two addressing modes, base-displacement and memory indirect, besides register and immediate. You want to improve this architecture by eliminating the memory indirect addressing mode: this will decrease the clock cycle by 10% but will increase somehow the instruction count because you will have to replace instructions like: lw R1, @(R2) with a sequence of instructions. Assume that the frequency of memory indirect addressing is 5%, and that the overall CPI does not change. a) show the sequence of instructions that will replace every memory indirect addressing; b) how does the performance of the new architecture compare with the performance of the original?

State all your assumptions clearly! v2 6 of 7 4. a) Describe the general characteristics of a program that would exhibit very little temporal locality but very high amounts of spatial locality with regard to instruction fetches. b) Provide an example program (pseudocode is ok). 5. Cache C1 is direct-mapped with 16 one-word blocks. Cache C2 is direct-mapped with 4 four-word blocks. Assume that the miss penalty for C1 is is 8 clock cycles and the miss penalty for C2 is 11 clock cycles. Assuming that the caches are initially empty, find a reference string for which C2 has lower miss rate but spends more cycle on cache misses than C1. Use word addresses.

State all your assumptions clearly! v2 7 of 7 6. Consider a virtual memory system with the following properties: 40-bit virtual byte address 8-KB pages 30-bit physical byte address a) What is the total size of the the page table for each process on this machine assuming that the valid, protection, dirty and use bits take a total of four bits and that all virtual pages are in use? b) Calculate the amount of storage required to implement a fully-associative TLB with a total of 128 TLB entries

PC memory Add [20 16] emtoreg ALUOp Branch RegDst ALUSrc 4 16 32 [15 0] 0 0 u x 0 1 Add Add result Registers Write register Write data data 1 data 2 register 1 register 2 Sign extend u x 1 ALU result Zero Write data data u x 1 ALU control Shift left 2 RegWrite em Control ALU [15 11] 6 EX WB WB WB IF/ID PCSrc ID/EX EX/E E/WB u x 0 1 emwrite Address Data memory Address