Docsity

COSC 201 Fall, 1998 Final Exam: CPU Implementations and Characteristics - Prof. Jaime W. S, Exams of Computer Architecture and Organization

Toggle sidebar
bg1
COSC 201 Fall, 1998 Final Exam Name_________________
The three numbered schematic diagrams show possible implementations of a simplified
MIPS CPU. Describe the particular type and its characteristics, as numbered, for
questions 1, 2, 3.
1. Describe the implementation of the CPU shown in diagram 1. What are the
characteristics of this implementation?
2. Describe the implementation of the CPU shown in diagram 2. What are the
characteristics of this implementation?
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download COSC 201 Fall, 1998 Final Exam: CPU Implementations and Characteristics - Prof. Jaime W. S and more Exams Computer Architecture and Organization in PDF only on Docsity!

The three numbered schematic diagrams show possible implementations of a simplified MIPS CPU. Describe the particular type and its characteristics, as numbered, for questions 1, 2, 3.

  1. Describe the implementation of the CPU shown in diagram 1. What are the characteristics of this implementation?
  2. Describe the implementation of the CPU shown in diagram 2. What are the characteristics of this implementation?
  1. Describe the implementation of the CPU shown in diagram 3. What are the characteristics of this implementation?
  2. What changes would need to be made to the pipeline CPU to reduce the branch hazard penalty from three clock cycles to one? Describe with reference to the appropriate diagram, or sketch the changes.

(d) Describe the function of the control lines marked A.

(e) Describe the function of the control lines marked B.

(f) Describe the function of the control lines marked C (two of them).

(g) Describe the function of the lines marked D.

(h) Describe the function of the lines marked E.

(Extra credit -- do not do this unless you are insane!) How many transistors are used in

the circuitry displayed in the Register File diagram?

7(a). What are the characteristics of the typical program and data which make the use of a cache effective?

(b) Assume that your machine has a 16 Kbyte data cache, arranged in lines which each hold 32 bytes (four doubles). Assume that a program multiplies two 512x matrices of doubles and stores the result in a third 512x512 matrix. Assume that the matrices are declared (and hence memory is assigned) one after the other, so that the first item (the 0,0 item) in each array is mapped to the same line in the cache.

Suppose that you use an algorithm which divides each matrix into 4x4 blocks, and multiplies the arrays of blocks, where each block multiply is then a multiplication of two 4x4 matrices (as in the second program for lab 9). In lab 9 we saw how the block multiplication improves performance when the 16 Kbyte data cache is direct mapped with 512 lines of 32 bytes. Describe how performance would be improved further if the cache were four-way set associative, with 128 sets of four lines each, each line still 32 bytes (four doubles), but with no change in access times for cache hits or misses. You may assume in either case that a full cache line is loaded on a cache miss.

Hint: Consider what happens when block A 00 is multiplied by block B 00 and stored in block C 00 and when block A 40 is multiplied by block B 04 and stored in block C 00.

  1. Consider the hexadecimal value 0xC0000000 (the 0x just indicates that it is a hex value). (a) What would be the value of this number interpreted as an unsigned integer? (You may give your answer in terms of powers of 2.)

(b) What would be the value of this number interpreted as a twos-complement integer? (You may give your answer in terms of powers of 2.)

(c) What would be the value of this number interpreted as a single precision floating point number according to IEEE-754 specifications? (You should give your answer as a decimal number.)

  1. Consider designing a processor for use in a symmetric Multiprocessor (SMP). (a) What would be the appropriate write policy for the processor cache? Why?

(b) What type of circuitry would need to be added to the cache to maintain cache coherence effectively?

(c) If a three state finite state machine were used to describe the state of each cache line for a processor (invalid, read only (shared), write/dirty (exclusive)), then how could actions of other processors change the state of a cache line?

(d) What type of instruction would be needed to implement a synchronization scheme using semaphores or some other construct to protect critical sections?

Now suppose that we include cache miss penalties into the calculation. Assume that instruction cache misses occur on 2% of the instruction memory accesses and that data cache misses (reads and writes) occur on 10% of the data memory accesses. Also assume that a cache miss incurs a penalty of 6 clock cycles. (Note: every instruction is a potential instruction cache miss, but only sw and lw instructions can cause a data cache miss.)

c) What is the average CPI for the multicycle CPU, taking into account cache misses?

d) What is the average CPI for the pipeline CPU, taking into account cache misses? (Assume there is no saving time when instruction and data accesses overlap, both penalties apply fully.)