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

Similar documents
COMP2611: Computer Organization. The Pipelined Processor

CS232 Final Exam May 5, 2001

ECS 154B Computer Architecture II Spring 2009

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

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

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

CS232 Final Exam May 5, 2001

ECE260: Fundamentals of Computer Engineering

Processor (I) - datapath & control. Hwansoo Han

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

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

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

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

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

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

ECE154A Introduction to Computer Architecture. Homework 4 solution

Computer Architecture V Fall Practice Exam Questions

CS 2506 Computer Organization II Test 2

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

EECS150 - Digital Design Lecture 9- CPU Microarchitecture. Watson: Jeopardy-playing Computer

CSEN 601: Computer System Architecture Summer 2014

CO Computer Architecture and Programming Languages CAPL. Lecture 18 & 19

LECTURE 3: THE PROCESSOR

Chapter 4. The Processor

EECS 322 Computer Architecture Improving Memory Access: the Cache

COSC 6385 Computer Architecture - Pipelining

ECE331: Hardware Organization and Design

COMP303 - Computer Architecture Lecture 8. Designing a Single Cycle Datapath

CS3350B Computer Architecture Quiz 3 March 15, 2018

ECE 2300 Digital Logic & Computer Organization. Caches

CPE 335 Computer Organization. Basic MIPS Architecture Part I

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

Processor (II) - pipelining. Hwansoo Han

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

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

Full Datapath. Chapter 4 The Processor 2

COMPUTER ORGANIZATION AND DESIGN

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

Lecture 9. Pipeline Hazards. Christos Kozyrakis Stanford University

Computer Architecture CS372 Exam 3

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

Full Datapath. Chapter 4 The Processor 2

Final Exam Spring 2017

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

ECE260: Fundamentals of Computer Engineering

Pipelining. CSC Friday, November 6, 2015

CS 251, Winter 2019, Assignment % of course mark

COMPUTER ORGANIZATION AND DESIGN

CS 251, Winter 2018, Assignment % of course mark

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

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

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

Single Cycle CPU Design. Mehran Rezaei

Full Datapath. CSCI 402: Computer Architectures. The Processor (2) 3/21/19. Fengguang Song Department of Computer & Information Science IUPUI

COMPUTER ORGANIZATION AND DESIGN

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

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

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

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

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

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

Systems Architecture

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

Computer Architecture Spring 2016

Processor: Multi- Cycle Datapath & Control

Codeword[1] Codeword[0]

Lecture 3: The Processor (Chapter 4 of textbook) Chapter 4.1

CS 351 Exam 2 Mon. 11/2/2015

CSE Quiz 3 - Fall 2009

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

Chapter 4. The Processor

Lecture 10: Simple Data Path

Department of Computer and IT Engineering University of Kurdistan. Computer Architecture Pipelining. By: Dr. Alireza Abdollahpouri

Do not start the test until instructed to do so!

Pipelined Processor Design

CSE 141 Computer Architecture Summer Session Lecture 3 ALU Part 2 Single Cycle CPU Part 1. Pramod V. Argade

Pipelining. Ideal speedup is number of stages in the pipeline. Do we achieve this? 2. Improve performance by increasing instruction throughput ...

CPE 335 Computer Organization. Basic MIPS Pipelining Part I

CSE 2021 COMPUTER ORGANIZATION

The Evolution of Microprocessors. Per Stenström

COMP303 Computer Architecture Lecture 9. Single Cycle Control

CMSC411 Fall 2013 Midterm 1

ECEC 355: Pipelining

Multi-cycle Approach. Single cycle CPU. Multi-cycle CPU. Requires state elements to hold intermediate values. one clock cycle or instruction

LECTURE 5. Single-Cycle Datapath and Control

CSCI 402: Computer Architectures. Fengguang Song Department of Computer & Information Science IUPUI. Today s Content

ECE 313 Computer Organization FINAL EXAM December 11, Multicycle Processor Design 30 Points

Chapter 4. The Processor

CSEE 3827: Fundamentals of Computer Systems

CENG 3420 Computer Organization and Design. Lecture 06: MIPS Processor - I. Bei Yu

Final Exam Fall 2007

EECS 151/251A Fall 2017 Digital Design and Integrated Circuits. Instructor: John Wawrzynek and Nicholas Weaver. Lecture 13 EE141

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

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

CS/COE0447: Computer Organization

CS/COE0447: Computer Organization

Chapter 4 The Processor 1. Chapter 4B. The Processor

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

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

Transcription:

Instructions Page 1 of 7 Use pencil, if you have one. For multiple choice questions, circle the letter of the one best choice unless the question specifically says to select all correct choices. There is no penalty for guessing, so answer all questions. Place drawings where indicated in the question; be sure to put the question number next to your drawing; use pencil rather than ink. No calculators or other electronic aids allowed. 1. Which instruction above lets you know that you won t be asked to compute the square root of π on this exam? A. 3.14159 B. 1.77245 C. The one that says there is no penalty for guessing. D. The one that says to use pencil. E. The one that says calculators are not allowed. 2. What are the inputs to the adder that computes the Branch Target Address? A. 3 and 5 B. The outputs of data memory and the ALU C. The two outputs from the register file D. The output from the PC+4 adder and the immediate field of the instruction multiplied by 4 and sign extended E. The PC and RegDst 3. Circle all the values computed by the ALU. (Hint: there is more than one letter that has to be circled.) A. PC+4 B. The Branch Target Address C. Memory addresses for lw and sw instructions D. The difference between two registers being compared for beq instructions E. The result for R type instructions 4. From where do the RR1 and RR2 inputs to the register file come? A. RD1 and RD2 B. The rs and rt fields of the instruction being executed C. R[rs] and R[rt] D. Data Memory E. The ALU 5. From where do the ALU inputs come? A. The rs and rt fields of the instruction being executed. B. The DataIn and DataOut outputs of data memory. C. The RD1 output of the registers and the multiplexer that selects between the RD2 output of the register and the sign extended immediate field of the instruction being executed. D. The RD1 and RD2 outputs of the register file. E. The outputs of the ALU and Data Memory

Page 2 of 7 6. What are the values of MemRead, MemWrite, and RegWrite (in that order) for lw instructions? A. 0, 0, 1 B. 0, 1, 0 C. 0, 1, 1 D. 1, 0, 0 E. 1, 0, 1 7. Where do the signals named R type, lw, and sw (among others) come from? A. The op code decoder in the control unit B. The register file C. The PC D. The ALU E. Data Memory 8. What is the only instruction for which the MemWrite control signal is true? A. add B. slt C. lw D. sw E. beq 9. Which statement describes a memory read operation? A. The data on the DataIn lines is stored in the location specified by the address lines. B. The data on the address lines is stored in the location specified by the DataIn lines. C. The data at the location specified by the address lines becomes available on the DataOut lines. D. The data on the DataOut lines is made available on the address lines. E. The address of the data replaces the data of the address. 10. What is the only instruction for which the MemToReg control signal is true? A. add B. slt C. lw D. sw E. beq 11. What do sw, beq, and j (jump) instructions all have in common with one another? A. They do not use the PC B. They do not use the ALU C. They do not use Instruction Memory D. They do not use Data Memory E. They do not write to the Register File 12. The time interval from starting to fetch and instruction until its execution completes is called: A. rate B. throughput C. latency D. frequency E. leading edge

Page 3 of 7 13. What characteristic of instruction processing would be measured in instructions per second? A. period B. throughput C. latency D. trailing edge E. flip flop 14. A single cycle datapath (like the first one described in Chapter 5) is observed to execute one million instructions per second. What is the clock frequency? A. 1 MHz B. 1 GHz C. 1 μsec D. 1 nsec E. 1 cm 15. How long does it take to execute a billion instructions if a processor uses one clock cycle per instruction and the clock period is 0.5 nsec? A. 0.5 sec B. 1.0 sec C. 2.0 sec D. 5.0 sec E. 1 G 16. If a single cycle datapath requires one second to process one instruction, how long will it take to execute one million instructions? A. One minute B. One hour C. One day D. One second E. One million seconds 17. If a single cycle datapath requires one second to process one instruction, and is re implemented as a perfectly balanced ten stage pipeline, how long will the new datapath take to process one instruction? A. One second B. One tenth of a second C. Ten seconds D. Two seconds E. Half a second 18. If a single cycle datapath requires one second to process one instruction, and is re implemented as a perfectly balanced ten stage pipeline, how long will the new datapath take to process one million instructions? (Pick the best choice, even though it is not exactly right.) A. 10,000,000 seconds B. 1,000,000 seconds C. 100,000 seconds D. 10,000 seconds E. 1,000 seconds

Page 4 of 7 19. Would the actual answer to the previous question be less or more than the value given, and why? A. It would be less (faster) because pipelines can take advantage of spatial locality. B. It would be more (slower) because hazards reduce pipeline performance. C. It would be less (faster) because of multicore microarchitecture. D. It would be more (slower) because of the need for additional cooling modules. E. It would be less (faster) because of the overlap in processing between pipeline stages. 20. What is the name of the type of pipeline hazard introduced by branch instructions? A. Structural B. Data C. Control D. Memory E. Latency 21. Which of the following describes register forwarding? A. Connecting the outputs of the register file to the inputs of the ALU without going through the ID/EX pipeline register. B. Getting a register operand from the EX/MEM or MEM/WB pipeline register instead of from the register file. C. Exchanging the positions of the IF/ID and ID/EX registers in the pipeline. D. Eliminating the EX/MEM pipeline register. E. Using the MEM/WB pipeline register as the input to the PC. 22. What is stored in the EX/MEM pipeline register? A. All the control and data information required by the MEM and WB stages of the pipeline B. A copy of the PC register and the flip flops that are in the ALU C. A copy of PC register and the full adders that are in the Instruction Memory D. The outputs of the Data Memory and the inputs to the Instruction Memory E. PC + 4 23. If a pipeline has n stages, how many places does the system clock connect to? A. 0 B. 1 C. n 1 D. n E. n + 1 24. How are a memory s speed and access time related? A. They are reciprocals of each other: the shorter the access time, the greater the speed B. They are the same thing C. There is no relationship between them D. Access time is a rate, and speed is an interval E. Speed depends on cost, but access time does not 25. A disk spins at 3600 RPM. What is its rotational period, to 3 decimal places, in seconds: seconds. 26. Using current technology, which of the following is the most accurate value for the number of bits that can be stored in one square inch of a disk s surface? A. 600 bits B. 6,000 bits C. 60,000 bits D. 600,000 bits E. 600,000,000,000 bits

27. Which of the following statements is not true about the memory hierarchy? A. The closer to the CPU, the faster the memory. B. The closer to the CPU, the shorter the memory s access time. C. The closer to the CPU, the larger the capacity of the memory. D. The closer to the CPU, the smaller the capacity of the memory. E. The closer to the CPU, the higher the cost per bit of the memory. 28. What feature of cache design takes advantage of the fact that programs often execute instructions taken from successive locations in memory? Page 5 of 7 A. When fetching an instruction causes a cache miss, not only the word containing the instruction, but an entire block of memory containing other nearby instructions is brought into cache. B. By increasing the set size, the penalty for cache misses can be eliminated. C. All instructions are loaded into cache when a program starts, so there are no cache misses until data accesses occur. D. Because the cache is slower than main memory, fetching instructions from main memory takes advantage of the lower cost per bit of the cache memory. E. The cache s tag bits eliminate the structural hazards caused by branch instructions. 29. If a processor referenced memory in a totally random fashion, what would be the probability of a cache hit once the cache is full? A. Size of main memory divided by size of cache B. Size of cache divided by size of main memory C. Size of main memory times size of cache D. Size of main memory minus size of cache E. Size of main memory plus size of cache 30. For this and the following questions, assume a computer uses a byte addressable main memory with a capacity of 2 36 bytes. How many address bits would this computer send to the memory system when performing a read or write operation? A. 2 36 for both reading and writing B. 36 for both reading and writing C. 8 for both reading and writing D. 2 36 for reading and 0 for writing E. 36 for reading and 0 for writing 31. For this and the following questions, assume the computer uses 256 byte blocks. How many blocks of memory are there? A. 36 8 B. 36 2 8 C. 2 36 2 8 D. 2 36 2 8 E. 123 32. How large is a cache line? A. 2 8 bits B. 2 8 bytes C. 2 8 blocks D. 36 bits E. 36 bytes

33. For this and the following questions, assume the computer has 2 16 cache lines. What is the capacity (not including tag and v bits) of the cache? A. 17 KB B. 2 16 2 8 bytes C. 16 + 8 bytes D. 2 36 2 16 bytes E. 2 36 2 16 bits 34. How many sets are there if the cache is direct mapped? A. 1 B. 16 C. 2 16 D. 2 14 E. 2 18 35. How many sets are there if the cache is 4 way associative? A. 1 B. 16 C. 2 16 D. 2 14 E. 2 18 36. How many sets are there if the cache is fully associative? A. 1 B. 16 C. 2 16 D. 2 14 E. 2 18 37. How many bytes per word are there? A. 2 B. 4 C. 8 D. 16 E. You didn t tell us. 38. How many address bits are needed for the index field using a direct mapped design? A. 0 B. 14 C. 16 D. 18 E. 2 16 39. How many address bits are needed for the index field using a 4 way set associative design? A. 0 B. 14 C. 16 D. 18 E. 2 16 Page 6 of 7

40. What is the purpose of tag bits? Page 7 of 7 A. They tell which block of memory occupies a cache line B. They tell which cache line occupies a block of memory C. They are the minimum amount of information that can be read from or written to a disk D. They hold the op code of the instruction being executed E. They compensate for the increased cost per bit of disks compared to registers.