Question: We would like to find the rate at which machine code instructions can be executed in a given CPU system like the one shown below

We would like to find the rate at which machine code instructions can be executed in a given CPU system like the one shown below for which a program resides in main memory (RAM). The machine code instructions and operands are stored in separate memory addresses and need to be fetched separately. Assume this CPU recognizes two types of instructions. Type A: is a register-to-register instruction and it takes 10 clock cycles to execute, once the instruction is fetched into the instruction register (IR). It does not take any operands. Type B: is a memory read/write instruction. This operation reads/writes the content (data) of a register from/to main memory at an address given in the program as an operand to this instruction. It takes 125 clock cycles once both the instruction and the operand have been fetched. Since fetching an instruction is similar to a memory read/write operation it takes the same time as the read/write of a type B instruction to fetch an instruction from main memory into IR (125 cycles). Same applies for fetching an operand. According to the fetch-decode-execute cycle, to execute a type A instruction, the CPU fetches the instruction (pointed to by the program counter) into IR, decodes it, and performs the operation. A type B instruction is executed by performing the following steps: fetch instruction into IR, decode instruction, fetch the operand from main memory, and then read/write content of register from/to main memory. Assume decode time is negligible for both types of instructions. Assume a typical program has 20 percent of memory read/write instructions (type B) and the rest are register-to-register instructions (type A).

a) Find the average instruction execution time on this CPU system. Give your answer in clock cycles.

b) Find the average time it takes to execute an instruction (t1 in the multi-level example) if the clock frequency is 1 MHz.

c) Find the instruction execution rate in part b (in instructions per second).

d) Find the processor bandwidth (the rate at which instructions are executed instructions per second) if the clock frequency is 20 MHz.

e) Find the program completion time of a two million-instruction program (at level 1 machine code) in part d. Give your answer in seconds.

We would like to find the rate at which machine code instructions

Central processing unit (CPU) Control unit Arithmetic logical unit (ALU) 10 devices Registers Main memory Disk Printer Bus Central processing unit (CPU) Control unit Arithmetic logical unit (ALU) 10 devices Registers Main memory Disk Printer Bus

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!