61.5k views
1 vote
A 64-bit word computer employs a 128KB cache. The address bus in this system is 32-bits. Determine the number of bits in each field of the memory address register (MAR) as seen by cache in the following organizations (show your calculations): A. Fully associative mapping with line size of 4 words. B. Direct mapping with the line size of 8 words. C. 2-way set associated mapping with the line size of 4 words. D. 8-way set associated mapping with the line size of 2 words.

User Basin
by
5.0k points

1 Answer

1 vote

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

User Iron John Bonney
by
5.0k points