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

rocessor R is a 64-bit RISC processor with a 2 GHz clock rate. The average instr

ID: 3885236 • Letter: R

Question

rocessor R is a 64-bit RISC processor with a 2 GHz clock rate. The average instruction requires

one cycle to complete, assuming zero wait state memory accesses. Processor C is a CISC

processor with a 1.8 GHz clock rate. The average simple instruction requires one cycle to

complete, assuming zero wait state memory accesses. The average complex instruction requires

two cycles to complete, assuming zero wait state memory accesses. Processor R can t directly

implement the complex processing instructions of Processor C. Executing an equivalent set of

simple instructions requires an average of three cycles to complete, assuming zero wait state

memory accesses. Program S contains nothing but simple instructions. Program C executes

70% simple instructions and 30% complex instructions. Which processor will execute program S more quickly? which processor will execute program C more quickly? At what percentage of complex instructions will the performance of the two processors be equal?

Explanation / Answer

Hi,
here we are dealing with 2 processors R and C, both of them are identical except that R is build for simple instructions and C is for simple instructions and R has 2Ghz clock rate where as C has 1.8Ghz
Since program S has only simple instructions for which R is built for, and also has 2Ghz clock rate, R will be faster,
Now, its given program C contains 70% simple and 30% complex instructions,
Now, let say, program C has n total instructions,
total cycle for both processors is,
R= 1* number of simple instructions + 3* number of complex= 1* 0.7 *n +3*0.3*n= 1.6n
C=  1* number of simple instructions + 2* number of complex= 1* 0.7 *n +2*0.3*n= 1.3n
Time= cycles/frequency
R= 1.6 n / 2 = 0.8 n nano sec
C= 1.3 n /1.8 = 0.72 n nano sec
therefore C is faster,
Now, say there were x percentage of complex, then
R= 1* (100-x) * n+ 3* x *n cycles
C= 1* (100-x) * n+ 2* x *n cycles
now if performances are equal, times are equal implies
(n(100-x)+ 3nx )/2= (n(100-x)+2nx)/1.8
1.8(100+2x)= 2(100+x)
   180+3.6x=200+2x
   1.6x=20
x= 12.5
therfore if there are 12.5% complex instructions, then they will show equal performances
Thumbs up if this was helpful, otherwise let me know in comments.