1. Simplistically, a program's execution time, T, is

where N = number of machine language instructions executed, S = average number of basic steps needed to execute one machine instruction, and R = clock rate in cycles per second.

What changes to N, S, and R will decrease T?

2. Assume that an automobile assembly process takes 4 hours.

If the stages take the following amounts of time, then what is the time between completions of automobiles?

Chassis 45 minutes

Motor 1 hour

Interior 1 hour and 15 minutes

Exterior 1 hour

3. Consider the simple RISC Assembly Language:

Type of Instruction Assembly Language Register Transfer Language

Description

Memory Access Load R1, Mem
Store R1, Mem Mem[Mem]
Move Move R1, R2 R1 R2
Move R1, #100 R1 100
Arithmetic Instruction

(reg. operands only)

Add R1, R2, R3 R1 R2 + R3
Sub R1, R2, R3 R1 R2 - R3
Conditional

Branch

Compare R1, R2 Sets condition codes
BGT LABEL Branch to LABEL if conditions codes are set for <
Unconditional

Branch

B LABEL Always Branch to LABEL

Assembly Language Program

  AREA DATA  
X DCD 3  
Y DCD 2  
RESULT DCD 0  
     
  AREA CODE  
  Load R1, X  
  Load R2, Y  
  Move R3, #1  
  Move R4, #0  
  Move R5, #1  
FOR Compare R3, R1  
  BLE DO_LOOP  
  B END_FOR  
DO_LOOP ADD R4, R4, R2  
  ADD R3, R3, R5  
  B FOR  
END_FOR Store R4, RESULT  

What does this code do?