...
Cache
November 12, 2023
Cache
November 12, 2023
Cache
November 12, 2023
Cache
November 12, 2023

Cache

Question 1
Consider a computer system with a byte-addressable primary memory of size 232bytes. Assume the computer system has a direct-mapped cache of size 32 KB (1 KB = 210bytes), and each cache block is of size 64 bytes.

The size of the tag field is ______ bits.

A
17
Question 1 Explanation: 

Given that the main memory is 2^32 bytes. So the physical address is 32 bits long.

 

Since it is a direct mapped cache the physical address is divided into  fields as (TAG, LINE, OFFSET).

 

Cache size is 32KB = 2^15 Bytes. 

Block size is 64 bytes = 2^6 bytes, so OFFSET needs 6 bits.

 

Number of blocks in the cache = 2^15//2^6 = 2^9, So LINE number needs 9 bits.

 

TAG bits = 32 – 9 – 6 = 17 bits.

Correct Answer: A
Question 1 Explanation: 

Given that the main memory is 2^32 bytes. So the physical address is 32 bits long.

 

Since it is a direct mapped cache the physical address is divided into  fields as (TAG, LINE, OFFSET).

 

Cache size is 32KB = 2^15 Bytes. 

Block size is 64 bytes = 2^6 bytes, so OFFSET needs 6 bits.

 

Number of blocks in the cache = 2^15//2^6 = 2^9, So LINE number needs 9 bits.

 

TAG bits = 32 – 9 – 6 = 17 bits.

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!!