retagged by
3,335 views
2 votes
2 votes

A given program has $25 \%$ load/store instructions. Suppose the ideal $\text{CPI}$ (cycles per instruction) without any memory stalls is $2$. The program exhibits $2 \%$ miss rate on instruction cache and $8 \%$ miss rate on data cache. The miss penalty is $100$ cycles. The speedup (rounded off to two decimal places) achieved with a perfect cache (i.e., with NO data or instruction cache misses) is __________.

retagged by

2 Answers

4 votes
4 votes

Answer : 3

Let's Assume there are 100 instructions, 

so we have 100 fetches for 100 instructions, this will come from instruction cache. 

25% that is 25 instructions are Data fetch / store instructions - come from data cache

so in total 100 fetches we will have 2% ie, 2 misses - 200 cycles penality. 

from the data stream, 8% ie, 2 misses - 200  cycles penality. 

Total cycles taken to execute 100 instructions is 100*2 + 200 + 200 = 600 cycles

CPI = 600/100 = 6. 

In a perfect caching solution we have 0 misses and hence the CPI will be default ie, 2 CPI. 

Speedup achieved = 6/2 = 3 

3 votes
3 votes
CPI with a Perfect Cache: $2$

CPI with the Actual Cache: 2 (ideally) + $0.02 \times 100$ (stall cycles for instruction cache miss) + $0.25 \times 0.08 \times 100$ (stall cycles for data cache miss) = $6$

Speedup with a perfect cache = $6/2 = 3.$
Answer:

Related questions

2.9k
views
2 answers
3 votes
Arjun asked Feb 16
2,896 views
Consider two set-associative cache memory architectures: $\text{WBC}$, which uses the write back policy, and $\text{WTC}$, which uses the write ... the victim cache block to main memory before loading the missed block to the cache
2.3k
views
3 answers
0 votes
Arjun asked Feb 16
2,281 views
The baseline execution time of a program on a $2 \mathrm{GHz}$ single core machine is $100$ nanoseconds ( $n s)$ ... of time.The number of cores that minimize the execution time of the program is __________.
2.7k
views
3 answers
2 votes
Arjun asked Feb 16
2,724 views
Which one of the following statements is FALSE?In the cycle stealing mode of DMA, one word of data is transferred between an I/ ... executing an interrupt service routine faster with vectored interrupts than with non-vectored interrupts
4.8k
views
2 answers
5 votes
Arjun asked Feb 16
4,819 views
Consider a $5$-stage pipelined processor with Instruction Fetch (IF), Instruction Decode (ID), Execute (EX), Memory Access (MEM), and Register Writeback ... does not require any extra hardware to retrieve the data from the pipeline stages