Answer: provided in the explanation segment
Step-by-step explanation:
taking a step by step process for this, we will analyze this problem,
we have that the Word size = 8 bytes
Cache size = 128 KB = 128×2¹⁰ bytes = 2¹⁷ bytes
(a). we are asked to cal for fully associative mapping with line size of 4 words.
- fully associative mapping with line size of 4 words = 4 × 8 = 32 bytes
- offset = log₂³² = 5 bit
- tag = 32 - (5+0) = 27 bit
- index bit = 0
(b). Direct mapping with the line size of 8 words:
- here the line size = 8×8 = 64 bytes
- no of lines = 2¹⁷/2⁶ = 2¹¹ lines
- offset = log ₂(2⁶) = 6 bit
- index = log ₂(2¹¹) = 11 bit
- tag = 32 - (5 +11) = 15 bit
(c). 2-way set associated mapping with the line size of 1 word:
- no of lines = 2¹⁷/2³ = 2¹⁴ lines
- offset = log₂(2³) = 3 bit
- no of sets = 2¹⁴/2 = 2¹³ sets
- index = log₂(2¹³) = 13 bit
- tag = 32 - (3+13) = 16 bit
(d). 8-way set associated mapping with the line size of 2 words:
8-way set associated mapping with the line size of 2 = 2*8 = 16 bytes
- no of lines = 2¹⁷/2⁴ = 2¹³ lines
- no of sets = 2¹³/2³ = 2¹⁰ sets
- offset = log₂¹⁶ = 4 bit
- index = log ₂(2¹⁰) = 10 bit
- tag = 32 - (4+10) = 18 bit
cheers i hope this helps!!!!