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

2.) (20 POINTS) Assume a cache with the following parameters: - b: block size gi

ID: 3705727 • Letter: 2

Question

2.) (20 POINTS) Assume a cache with the following parameters: - b: block size given number of words - S: number of sets - N: number of ways A: number of address bits - word: 4 bytes Using these parameters, give the formula for each item required below. 2.A.) (5 POINTS) Cache capacity C? 2.B.) (5 POINTS) Number of bits required to store the tags:? 2.C. (5 POINTS) S and N for a fully associative cache of capacity C words with block size b? 2.D. (5 POINTS) S for a direct mapped cache of size C words and block size b?

Explanation / Answer

2 A) Cache capacity C = number of sets * number of ways * block size * word size = S*N*b*4 bytes = 4SNb bytes.

2 B) Number of bits in block offset field = log2(b) bits [ assuming word addresable menory]

Number of bits in set index field = log2(S) bits

Number of bits = [ A - (log2(b) +  log2(S))] bits.

2 C) Number of blocks in cache = C/b.

For fully associative cache S = 1 and N = C/b.

2 D) Number of blocks in cache = C/b.

For direct mapped cache S = number of blocks in the cache = C/b. and N = 1.

Therefore S = C/b.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote