Determining Cache Size: Find Data Size

In summary, to determine the size of a cache, you can use the equation: total cache size = (2^(index bits)) * [(associativity)(tag bits + valid bits + data size)]. Data size is typically determined by the size of each cache block or line, which can vary depending on the processor architecture and design decisions. The rest of the equation can be determined using the number of index bits, associativity, and the size of the address.
  • #1
bl4ke360
20
0

Homework Statement


6xz0ox.jpg


Homework Equations


total cache size = (2^(index bits)) * [(associativity)(tag bits + valid bits + data size)]
(Correct me if this is wrong)

The Attempt at a Solution


I came up with 2^11 cache sets, therefore it's 8-way associative because 2^14 / 2^3 = 2^11. And 8=2^3.
Therefore 8 comparators, 10 bits each because the tag is 10 bits.
I'm stuck on the last part where it asks to determine the size of the cache because I'm not sure what the data size is. From what I have so far the equation would be:
2^11 * (8(10+(1+1+1+1)+data size))

If this is correct, can someone tell me how the data size is determined so that I can solve that equation?
 
Last edited:
Physics news on Phys.org
  • #2


Hi there! Your equations and calculations look correct so far. The data size is typically determined by the size of each cache block or line. This refers to the amount of data that can be stored in each individual cache entry. For example, if each cache block can hold 32 bytes of data, then the data size in your equation would be 32. This number can vary depending on the processor architecture and design decisions.

To determine the size of the cache, you can use the following equation:

Total cache size = (2^(index bits)) * [(associativity)(tag bits + valid bits + data size)]

In this equation, you already have the index bits and associativity calculated. The tag bits and valid bits are determined by the size of the address and the number of bits used for indexing and tag storage. The data size, as mentioned before, is determined by the size of each cache block.

Hope this helps! Let me know if you have any further questions. Good luck with your calculations!
 

1. What is cache size?

Cache size refers to the amount of space available in the computer's memory for storing frequently accessed data. It is used to improve the performance of the system by reducing the time it takes to retrieve data from the main memory.

2. How is cache size determined?

Cache size is determined by a variety of factors, including the type of processor, the amount of available memory, and the specific software or operating system being used. It can also be manually configured by adjusting settings in the system's BIOS or through software tools.

3. Why is it important to determine the cache size?

Determining the cache size is important because it allows for the efficient use of the system's resources. If the cache size is too small, data may not be stored effectively, resulting in slower performance. On the other hand, if the cache size is too large, it may take up unnecessary space and slow down the system.

4. How do you find the data size in cache?

The data size in cache can be found by using tools such as the Task Manager or Resource Monitor on Windows or the Activity Monitor on Mac. These tools provide information on the amount of data currently stored in the cache, as well as the overall cache size.

5. Can the cache size be changed?

Yes, the cache size can be changed by adjusting the settings in the system's BIOS or through software tools. However, it is important to note that changing the cache size may have an impact on the overall performance of the system.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
3
Views
753
  • Engineering and Comp Sci Homework Help
Replies
7
Views
848
  • Engineering and Comp Sci Homework Help
Replies
6
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
13
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
10
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
3K
Back
Top