Docsity

Final Exam - Fall 2012 | Computer Architecture | CS 5513, Exams of Computer Architecture and Organization

Partial preview of the text

Download Final Exam - Fall 2012 | Computer Architecture | CS 5513 and more Exams Computer Architecture and Organization in PDF only on Docsity!

CS 5513

Final

Fall 2012

Instructor: Prof. Abdullah Muzahid

Time: 2 hr 30 min

Name: Alias: Banner Id : Instructions:

  1. This is a closed book, closed-­‐notes examination.
  2. The exam has 6 questions. Please budget your time.
  3. Calculators are allowed.
  4. Please write your answers neatly. Good luck! Question Total Points 1 10 2 6 3 13 4 16 5 26 6 10 Total 81
  1. (10 pt) Write True or False after every statement. a. Higher value of CPI is usually better. b. There are 3 types of data hazards. c. Two properties critical to the correctness of a program are data flow and control flow. d. In Tomasulo’s algorithm, register renaming is accomplished by the use of reservation stations. e. Cold misses will happen even if the cache size is infinity. f. Sequential consistency allows a later read to bypass an earlier write operation. g. Directory based scheme requires a shared bus. h. Out of order execution always uses speculation mechanism. i. Way prediction reduces cache miss rate. j. Power Utilization Effectiveness must be greater than or equal to 1.
  2. (6 pt) We have an unpipelined processor with cycle time 10 ns. ALU and branch instructions take 3 clock cycles whereas memory instructions takes 5 clock cycles. Usually, a program has 40% ALU instructions, 20% branch instructions and the rest are memory instructions. When we pipeline this processor, the clock cycle time increases by 1 ns. Assuming an ideal pipeline (i.e. CPI = 1), what will be the speed up of the pipelined processor with respect to the unpipelined one?

d. (3 pt) With the same assumptions as C), but assuming that the branch is taken 90 percent of the time, which instruction would you put in the delay slot and WHY? Show the complete code.

  1. Consider a virtual memory hierarchy with the following properties:
  • Virtual Addresses are 64 bits wide.
  • Physical Addresses are 30 bits wide.
  • A virtual memory page is 8 kilobytes.
  • The TLB is direct mapped and its index field is 9 bits.
  • There is one 4-way set associative cache and its index field is 8 bits
  • Each cache line is 128 bytes. a. (2 pt) How much data can the cache store? b. (2 pt) How many pages of virtual memory can be mapped to the TLB? c. (2 pt) How many bits are necessary for the tag field in the TLB?

d. (2 pt) How many bits of output does the TLB produce (how many bits wide is the TLB data)? e. (4 pt) Given the listed parameters, what is the potential disadvantage of using a physically tagged, physically indexed cache? What can we do to fix the problem? f. (2 pt) Name one advantage and one disadvantage of using large page sizes? g. (2 pt) How can you distinguish whether a miss is a conflict miss or a capacity miss?

  1. You are designing a multiprocessor with 3 processors. Each processor has a cache. You are debugging the system issuing references to line a. In the following, R1a means processor 1 reads a , and W3a means that processor 3 writes a. You are debugging two protocols: Illinois and Centralized Directory. Initially the caches are empty.

c. (5 pt) In a multiprocessor environment, how does prefetching change the cache coherence protocol? For example, how does it change the MSI protocol? d. (3 pt) Assume that compare-and-swap R1, R2, L swaps the value in memory location L with the value in register R2 if R1 = [L] (i.e. value in L). Use this to implement a function atomic-inc ( L). Assume that atomic-inc (L) should increment the value in L atomically.

  1. a. (6 pt) Show how the following code lays out in convoys, assuming a single copy of each vector functional unit: LV V1, Rx ; load vector X MULVS.D V2, V1, F0 ; vector-­‐scalar multiply LV V3, Ry ; load vector Y ADDVV.D V4, V3, V2 ; add two vectors LV V5, Rz ; load vector Z SUBVV.D V6, V5, V4 ; subtract two vectors SV V6, Rz ; store vector How many chimes will this vector sequence take. If we double the number of vector functional units, how many chimes will it take then? b. (4 pt) What is chaining? What is a scatter-­‐gather operation?