Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assume the following: ? a memory reference takes 10 clock cycles to satisfy and

ID: 3624652 • Letter: A

Question

Assume the following:
? a memory reference takes 10 clock cycles to satisfy and a register reference takes 1
cycle
? a program executes N ALU instructions on a 3-address instruction set architecture; the multiply and divide instructions only have 2 operands and make up 25% of the N
instructions; the other 75% have 3 operands.
? the processor does not have a pipeline
? after the instruction has been fetched from memory, one clock cycle is required to
decode
? each of the above N instruction requires 1 clock cycle to finish its execution after the operands have been fetched
? each of the N instructions produces a result that must be stored
Compare in clock cycles the running time of the program if all operands are in registers and the result is returned to a register to the running time if all operands and result are memory references. Do count the cycles required to fetch the instruction. There is only one port into memory and one port into the register file.

Explanation / Answer

clocks to complete from register fetch instruction 10 decode 1 get R1 1 get R2 1 Execute 1 Store 1 total of 15 clocks to complete from memory fetch instruction 10 decode 1 get R1 10 get R2 10 execute 1 Store 10 total 42 From register= 2.8 times faster

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote