Consider a machine with a -way set associative data cache of size and block size . The cache is managed using virtual addresses and the page size is . A program to be run on this machine begins as follows:
double ARR[1024][1024];
int i, j;
/*Initialize array ARR to 0.0 */
for(i = 0; i < 1024; i++)
for(j = 0; j < 1024; j++)
ARR[i][j] = 0.0;
The size of double is . Array is located in memory starting at the beginning of virtual page and stored in row major order. The cache is initially empty and no pre-fetching is done. The only data memory references made by the program are those to array .
The total size of the tags in the cache directory is:
View worked solution
Answer: D
To find the total size of the tags in the cache directory, we first determine the cache parameters and the division of the 32-bit virtual address.
1. Cache Parameters
- Cache Size:
- Block Size:
- Associativity: -way set associative
2. Number of Blocks and Sets
- Total Cache Blocks (Lines):
- Number of Sets:
3. Address Fields
The 32-bit virtual address is divided into three fields:
- Block Offset:
- Set Index:
- Tag:
4. Total Tag Directory Size
Each of the blocks in the cache directory must store its corresponding tag.
Converting this to Kbits ():
Therefore, the correct option is D.
Free practice · Your answers on this page are not saved.
