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

2. Cache performance (8 pts) The base CPI of a system, excluding memory stalls,

ID: 3881857 • Letter: 2

Question

2. Cache performance (8 pts) The base CPI of a system, excluding memory stalls, is Quux Loads and stores collectively constitute MA% of all instructions Accessing the L1 data cache takes P cycles (accounted for in base CPI) Accessing the L1 instruction cache takes D cycles (accounted for in base CPI) Misses to main memory take an average of K cycles The L1 D-cache miss rate/access is Mo. The L1 1-cache miss rate/access is M a) (3) What is the CPl of the above system, including memory behavior? b) (5) Your team is considering adding an L2 cache for data accesses only. Assuming that the L2 access time is 3D, how high can the L2 miss rate be and still improve AMAT?

Explanation / Answer

2.a)-->CPU time can be divided into two parts: CPU time=execution+memory access time

CPU time = (CPU execution clock cycles + Memory-stall clock cycles) x Clock cycle time;

here the question itself excluding the memory-stalls so the time taken to Mem-stall=0;

CPU time=cpu execution clock cycles *clock cycle time

clock cycle time=1/clock cycle rate;

Instruction miss cycles= I(toatal number instructions per program)*M0*100;

Data miss cycles=I*M1*MA/100*100;

////if you have more doubts follow the video URL https://www.youtube.com/watch?v=TnughHdERpY

---->2b) AMAT = Hit time + Miss rate x Miss penalty

  AMAT = %instr x (instr hit time + instr miss rate x instr miss penalty) + %data x (data hit time + data miss rate x data miss penalty)

AMAT = Hit TimeL1 + Miss RateL1 x Miss PenaltyL1

Miss PenaltyL1 = Hit TimeL2 + Miss RateL2 x Miss PenaltyL2

AMAT= Hit TimeL1 + Miss RateL1 x (Hit TimeL2 + Miss RateL2 x Miss Penalty(L2))

//////I think the hitrate is needed for this question..