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

Run the cache simulator[1] using a cache size of 4,8,16 and sets 1, 2, and 4. Th

ID: 667058 • Letter: R

Question

Run the cache simulator[1] using a cache size of 4,8,16 and sets 1, 2, and 4.

The Table below represents columns of hits for each cache and set size pairs. Enter both lines into the simulator, not one at a time.

54 58 04 40 08 61 08 64 54   

58 09 05 10 60 04 64 40 61

You should get

LRU

FIFO

RAND

C4S1

1

1

3

C4S2

1

1

1

C4S4

1

1

1

C8S1

4

5

6

C8S2

2

2

4

C8S4

3

3

3

C16S1

7

7

7

C16S2

7

7

7

C16S4

5

5

6

Run this query again with this new pattern.

54 58 04 40 08 61 08 64 54   (Note that 1st 2 rows are the same)

58 09 05 10 60 04 64 40 61

08 09 11 10 58 61 04 54 40

Note about simulator: All of the query numbers are in decimal, so don't check the box. Make sure you set the limit query to 27 (number of characters, I believe), it defaults to 20. Use LRU, FIFO, and Random.

[1] The simulator can be found here: http://www.ecs.umass.edu/ece/koren/architecture/Cache/frame1.htm

Question: What can you conclude by varying the cache size and sets compared to the hit/miss rate?

You should get

LRU

FIFO

RAND

C4S1

1

1

3

C4S2

1

1

1

C4S4

1

1

1

C8S1

4

5

6

C8S2

2

2

4

C8S4

3

3

3

C16S1

7

7

7

C16S2

7

7

7

C16S4

5

5

6

Explanation / Answer

For dataset 58 09 05 10 60 04 64 40 61

LRU FIFO RAND
--------------------
4 4 4
2 2 2
5 5 5
14 14 14
2 2 2
0 2 0
4 4 4
14 14 14

Hit = 2
Miss = 6
Hit ratio 0.25

2)

For dataset 08 09 11 10 58 61 04 54 40

LRU FIFO RAND
--------------------
4 4 6
5 5 5
5 5 3
13 13 13
14 14 14
2 2 1
11 11 11
4 4 4

Hit = 1
Miss = 7
Hit ratio 0.125