Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

3. Suppose a set-associative cache consisting of 1024 4-word blocks is construct

ID: 3569361 • Letter: 3

Question

3. Suppose a set-associative cache consisting of 1024 4-word blocks is constructed. A word is 4-bytes. Let n be the associativity. A word of data is word-aligned in memory and each memory address is 32-bits.
(a) For n = 1, 2, 4, 8, how many sets would the cache consist of? (b) To construct a fully-associative cache, what
would n (in decimal) need to be? (c) For each n = 1, 2, 4, 8, how many blocks would each set consist of? (d) For a
fully-associative cache, how many blocks would each set consist of? (e) Suppose n = 4. How many and which memory address bits would be used to form the block offset? (f) Continuing, how many and which memory address bits would be used to form the set index? (g) Continuing, how many and which memory address bits would be used to form the tag for each cache block? (h) Continuing, what would be the size of the cache (just the bits storing data), in KiB? (i) Continuing, where would memory address A = 0x1A2B_4D3C map to? That is, which set (in decimal), which block within the set (in decimal), and what would be the block offset (in decimal)?

Explanation / Answer

ANSWER:

a) 1,2,4,8 respectively.

b) There are 1024 blocks. Hence n=1024.

c) 1024, 512, 256, 128 blocks respectively.

d) 1 block

e) There would be 256 blocks in a set. Hence, 8 bits are required to form block offset.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote