Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A very small cache has the following configuration: 2 - way associative, using an LRU replacement policy 8 sets 4 bytes per cache block yielding

A very small cache has the following configuration:
2-way associative, using an LRU replacement policy
8 sets
4 bytes per cache block
yielding a total capacity of 64 bytes. The cache is initially all blocks invalid. When both blocks in a set are invalid, new data prefer way 0.
An array of characters (one byte each) is located at address 0, such that the index of each character in the array is exactly the address of that character. Indices in the array are accessed in the order given below.
Select the appropriate choices from the dropdowns to give the index of the first element in each block (the base address of the block) of the cache after all of the accesses are complete. In order to help you get started, we've done the first 8 accesses for you, and to help you verify your work, some of the answers are provided for you; if your answers don't match the provided answers, you made an error in your calculations.
Addresses are accessed through the cache in the following order:
53,100,6,110,8,72,104,4,
61,2,1,89,67,88,5,28,
106,32,81,12,57,6,96,35,
126,89,56,68,96,62,1,61
Working through the first 8 accesses:
Initially, the cache is empty.
Address 53 misses. It is added to at set 5, way 0.
Address 100 misses. It is added to at set 1, way 0.
Address 6 misses. It is added to at set 1, way 1.
Address 110 misses. It is added to at set 3, way 0.
Address 8 misses. It is added to at set 2, way 0.
Address 72 misses. It is added to at set 2, way 1.
Address 104 misses. It is maps to set 2, where both ways are occupied. It replaces the LRU line in way 0.
Address 4 hits in set 1, way 1.
At this point, the cache has the following state:
Way 0 has data in sets 1,2,3, and 5; sets 0,4,6, and 7 are invalid.
Way 1 has data in sets 1 and 2; sets 0,3,4,5,6, and 7 are invalid
At set 1, the block in way 0 is least recently used.
At set 2, the block in way 1 is least recently used.
Complete the state of the cache after the remaining 24 accesses. In those pulldowns which contain more than one address, the first number corresponds with way 0, the second with way 1.
Set 0: The block in way 0 begins at address 0. The block in way 1 begins at address
[ Select ]
.
Set 1: The blocks begin at addresses
[ Select ]
.
Set 2: The blocks begin at addresses
[ Select ]
.
Set 3: The blocks begin at addresses
[ Select ]
.
Set 4: The block in way 0 begins at address
[ Select ]
. The block in way 1 is invalid.
Set 5: The block in way 0 begins at address
[ Select ]
. The block in way 1 is invalid.
Set 6: The blocks begin at addresses
[ Select ]
.
Set 7: The blocks begin at addresses

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

=+(0

Answered: 1 week ago

Question

What are the different techniques used in decision making?

Answered: 1 week ago