Docsity

Sample Problems for Old Final Exam - Computer Organization | COSC 201, Exams of Computer Architecture and Organization

Partial preview of the text

Download Sample Problems for Old Final Exam - Computer Organization | COSC 201 and more Exams Computer Architecture and Organization in PDF only on Docsity!

Fall 2001 COSC 201 Final Exam Name: ____________________________________

  1. Define or describe the following.

a) five classical components of a computer

b) benchmark

c) instruction set architecture

  1. You have a program that takes T seconds to execute on a computer with a 1 GHz Pentium III processor. The exact same program also takes T seconds to execute on another computer that is identical to the first computer except that it has a 1.4 GHz Pentium 4 processor.

a) Give 3 components of performance that are multiplied together to calculate execution time of a program:

T = ____________________X ___________________X ___________________

b) Which of these components of performance are the same for the two computers in this example?

c) Which of these components of performance are different for the two computers in this example?

d) Why is clock rate by itself not a good measure of a machine's performance?

  1. Refer to the diagram of the single-cycle CPU and the truth table for the ALU controller. Specify how each of the control signals is set for the following instructions: beq $rs, $rt, else addi $rs, $rt, -

beq addi

RegDst

ALUSrc

MemtoReg

RegWrite

MemRead

MemWrite

Branch

ALUOp

ALUOp

  1. Refer to the diagram of the multi-cycle CPU and the truth table for the ALU controller. Specify how each of the control signals is set in each clock cycle for the following instruction: add $rd, $rs, $rt

Clock Cycle

RegDst

ALUSrcA

ALUSrcB

ALUSrcB

MemtoReg

RegWrite

MemRead

MemWrite

IorD

IRWrite

PCSource

PCSource

PCWrite

PCWriteCond

ALUOp

ALUOp

  1. Refer to the diagram of the pipelined CPU. Assume that the register file has been modified so that it is possible to read and write in the same clock cycle (as in the previous problem).

a) Rewrite the sequence of instructions below, adding the minimum number of nop instructions required to avoid all data hazards for this CPU. Do not re-order any of the instructions.

addi $t4, $zero, 10 slt $t3, $s0, $t4 # (k < 10)? beq $t3, $zero, endloop # if not, branch to end of loop

b) Describe and/or sketch the modifications you would make to the hardware in order to eliminate all nop instructions between the slt and beq instructions.

  1. Describe two advantages of a multi-cycle CPU over a single-cycle CPU.

  2. Describe how caches improve scalability for shared memory, SMP/UMA multiprocessors.