Question 10544 – Critical-Section
February 25, 2024
Question 7850 – Computer-Networks
February 26, 2024
Question 10544 – Critical-Section
February 25, 2024
Question 7850 – Computer-Networks
February 26, 2024

Question 8938 – Cache

How many total bits are required for a direct-mapped cache with 128 KB of data and 1 word block size, assuming a 32-bit address and 1 word size of 4 bytes?

Correct Answer: D

Question 71 Explanation: 
Size of a cache line = block size = 4 bytes
Number of lines in the cache = cache size / line size = 128KB / 4 bytes = 32K = 2^15
In a direct mapped cache the address is split into 3 fields (TAG, LINE, OFFSET)
Here OFFSET is the number bits needed to identify a word within the cache line.
As line size = word size, we don’t need any bits to identify the word within a block so OFFSET = 0.

As there are 2^15 lines in the cache, LINE needs 15 bits.

From the 32 bits of physical address, TAG bits = 32 – 15 = 17 bits.

TAG directory size = Number of cache lines * TAG bits = 2^15 * 17 = 544 K bits
Cache data size = 128KB = 128 * 8 K bits = 1024 K bits

Total cache size = TAG directory size + cache data size = 544 K + 1024 K = 1564 K bits = 1.53 M bits

A
2 Mbits
B
1.7 Mbits
C
2.5 Mbits
D
1.5 Mbits
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!