retagged by
677 views
2 votes
2 votes

The designers of a computer must select a cache system. They have two options.

In first design they uses a direct-mapped cache containing $2$ words per cache line. It would have an instruction miss rate of $3%$ and a data miss rate of $8%$.

In second design they uses a $2$-way set associative cache containing $8$ words per cache line. It would have an instruction miss rate of $1%$ and a data miss rate of $4%$.

For each design, there will be approximately $0.5$ data references on average per instruction. The cache miss penalty in clock cycles is $8$ + cache line size in words; for example, the penalty with $1$-word cache lines would be $8 + 1 = 9$ clock cycles.

Let $D1 =$ cycles wasted by First Design on cache miss penalties (per instruction)

Let $D2 =$ cycles wasted by Second Design  on cache miss penalties (per instruction)

On average, how many clock cycles will be wasted by each on cache miss penalties?

  1. $D1 = 1.10, D2 = 0.96$
  2. $D1 = 0.70, D2 = 0.40$
  3. $D1 = 1.10, D2 = 0.40$
  4. $D1 = 0.70, D2 = 0.48$
retagged by

2 Answers

Best answer
5 votes
5 votes
No of instruction per instruction is 1 and no of data per instruction is 0.5

Direct-mapped cache containing 2 words per cache line. It would have an instruction miss rate of 3% and a data miss rate of 8%.
Miss penality = 0.03(8+2) + 0.08(8+2)/2 = 0.30 + 0.40 = 0.70

2-way set associative cache containing 8 words per cache line. It would have an instruction miss rate of 1% and a data miss rate of 4%.
Miss penality = 0.01(8+8) + 0.04(8+8)/2 = 0.16 + 0.32 = 0.48
selected by
0 votes
0 votes

For these designs,

let p equal the cache miss penalty, in clock cycles, and let mi and md indicate the instruction and data miss rates, respectively.

Then the total time spent on penalties, for an average instruction, is p * (1 * mi + 0.5 md), since there are about 0.5 data references per instruction.

Consequently, the total penalty for D1 and D2, are 0.70 and 0.48, respectively.

Answer:

Related questions

804
views
2 answers
1 votes
Bikram asked Jan 24, 2017
804 views
A certain computer has a $TLB$ cache, a one-level physically-addressed data cache, $DRAM$, and a disk backing store for virtual memory. The processor loads ... page fault occurs, then a data cache miss definitely does not occur as well.
632
views
3 answers
4 votes
Bikram asked Jan 24, 2017
632 views
The designers of a cache system wants to reduce the number of cache misses that occur in a certain group of programs.Which of the following statements is/are correct regarding what ... and III I and II only II and III only III only
449
views
1 answers
1 votes
Bikram asked Jan 24, 2017
449 views
Consider a set associative cache memory with $8$ cache blocks $(0 - 7)$ and main memory with $128$ blocks. The following block requests are made by the $CPU$ ($\text{LRU}$ ... $ is present is:$3, 7$3, 6$2, 5$7$ is recently replaced
949
views
1 answers
1 votes
Bikram asked Jan 24, 2017
949 views
Consider the following sequence of instructions intended for execution on a stack machine. Each arithmetic operation pops the second operand, then pops the first operand, ... is empty.I and III onlyII and III onlyII onlyI, II, and III