Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Exam Study Guide - Computer Architecture | EEL 4713, Exams of Electrical and Electronics Engineering

Material Type: Exam; Class: COMPUTER ARCH; Subject: ENGINEERING: ELECTRICAL; University: Florida State University; Term: Unknown 1989;

Typology: Exams

Pre 2010

Uploaded on 08/30/2009

koofers-user-dju-1
koofers-user-dju-1 🇺🇸

10 documents

1 / 6

Toggle sidebar

Related documents


Partial preview of the text

Download Exam Study Guide - Computer Architecture | EEL 4713 and more Exams Electrical and Electronics Engineering in PDF only on Docsity! Name: _____________________________ (write neatly at top of every page) EEL 4713 / Computer Architecture / Fall 2005 Midterm Exam #1 Administered: Oct. 4, 2005 The exam is open book, and open notes. There are 3 questions, and each question is worth 35 points; 100 points total is full credit. You will have 75 minutes (from 1:15 to 2:30) to take the exam. Pace yourself; if you find you are spending more than 25 minutes on a problem, come back and finish it later. If a question is ambiguously worded, raise your hand and I will come give you a clarification if appropriate. Important clarifications will be written on the board. Time remaining will be announced periodically. Question #1 (CIO 1 / POs a,e,o) – Performance/Cost Metrics Suppose you are working for a software company whose main product is a complex, expensive application program “A” that users run on a certain brand “W” of high-end engineering workstations. You are in charge of reengineering the tool flow for the company’s build process for its software releases, and you are considering whether the company should switch to a new compiler that was just announced by the workstation vendor. Your goal is for the application A, as seen by each individual user, to have the best performance possible. The brochure from the vendor describing the new compiler claims that it increases workstation W’s MIPS rating when running floating-point (FP) code by 300%. You already know that, when compiled using the old compiler, application “A” currently spends 60% of its time executing floating-point code. 1a. Identify the true nature of the problem to be solved, as an engineering problem. In the specific scenario described, which of the following quantities is it your job to be trying to optimize, and for each one that’s appropriate, should you be trying to maximize or minimize that particular quantity? Circle one choice in each row. i. Execution time of program A Maximize / minimize / neither ii. Clock frequency of workstation W Maximize / minimize / neither iii. CPI of program A on workstation W Maximize / minimize / neither iv. MIPS rating of W when running A Maximize / minimize / neither v. Performance of W on program A Maximize / minimize / neither vi. Cost of the workstation W Maximize / minimize / neither 1b. Formulate the problem to be solved, as an engineering problem. For one of the quantities from part A that you identified that you were trying to maximize or minimize in this situation, compose an algebraic expression that gives the factor by which that quantity would be improved if you were to switch to the new compiler. You may use the following variables in your expression. If you need to use any additional variables, please clearly state their definitions. (But, do not yet worry about whether you know the values of all these variables for this problem or not!) Name: _____________________________ (write neatly at top of every page)  CPIold,fp – The average CPI of workstation W when running floating-point code in program A that was compiled with the old compiler.  CPInew,fp – The same, but for the new compiler.  ICold,fp, ICnew,fp – The dynamic instruction count of the FP code compiled with the old/new compilers, measured over the course of an average run of program A.  CPIold,int, CPInew,int, ICold,int, ICnew,int – Same as the above, but for running integer (non floating-point) code. 1c. Formulate the vendor’s claim about the MIPS rating in the form of an algebraic expression that relates (some subset of) the above variables to each other. 1d. Formulate the information that you are given about the fraction of time spent running floating point code as an algebraic expression in the above variables. 1e. At minimum, what additional information do you need that is not already given in the problem statement if you are going to solve the problem? 1f. Now, assuming that the IC and CPI of integer code remains unchanged with the new compiler, and that the IC of the floating-point code becomes 10× larger with the new compiler, solve the problem. What is the value of your expression from part (1b)? Should you switch to the new compiler? Why or why not? Name: _____________________________ (write neatly at top of every page) Question #3 (CIO 3 / POs a,c,o) The following C language function computes the integer square root, that is, given an integer n ≥ 0, it returns the value r of the largest integer that is less than or equal to the square root of n, or, in symbols, r n    . Design a correct implementation of this function in MIPS assembly language; that is, hand-compile this C code to equivalent MIPS assembly. Use standard MIPS calling conventions, except don’t worry about the frame pointer. Assume that an int is 32 bits. Don’t worry about whether this particular algorithm does anything sensible when the argument is negative (it doesn’t). It’s also not very efficient, but it works. int sqrt(int n){ /* Find integer square root of n*/ int r=0; /* First trial square root = 0 */ while (r*r <= n) /* While it’s not too big, */ r++; /* keep making it bigger. */ return r-1; /* Too big, return previous. */ } Please write neatly, comment your code, and draw a neat table showing any correspondences that you may have set up between MIPS registers and C code variables. Name: _____________________________ (write neatly at top of every page) How the Exam was Designed You may recall that the course syllabus listed the following items under “Course Instructional Objectives:” At the completion of this course, students should be able to: 1. Metrics: Calculate and interpret different performance and cost metrics of computer systems. 2. AsmML: Derive machine code from assembly instructions. 3. CAsm: Derive assembler code from an equivalent C code representation. … Later, under “Assessment Instruments,” the syllabus also said: 1. Metrics (a) Apply-3, (e) Solve-3, (o) Topics-3  Students will solve exam problems in which they must analyze descriptions of hypothetical processors to determine their performance, cost-performance, and power-performance. 2. Asm  ML (a) Apply-3, (o) Topics-3  Students will solve exam problems in which they must hand-assemble MIPS (or similar) assembly language instructions to their binary machine-language representations. 3. C  Asm (a) Apply-3, (c) Design-3, (o) Topics-3  Students will solve exam problems in which they must hand-compile short C language code fragments to equivalent assembly language code for a MIPS or similar instruction-set architecture. As indicated by the letters in parentheses above, the exam problems should also demonstrate that students have obtained the following EE/CpE “Program Outcomes”: (a) Apply: An ability to apply knowledge of mathematics, science, and engineering; (c) Design: An ability to design a system, component, or process to meet desired needs; (e) Solve: An ability to identify, formulate, and solve engineering problems; (o) Topics: (EE) A knowledge of electrical engineering applications selected from the … digital systems… areas. (CpE) A knowledge of computer science and computer engineering topics including … computer architecture. We assume that any reasonable question in the field of the course automatically addresses outcomes (a) and (o). As for (c) “Design,” the C-to-assembly question should address it, and for (e) “Solve,” the Metrics question should address it. The questions on this exam were composed with the above considerations in mind.
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved