Final answer:
The size of the main memory can be calculated using the formula: Size of Cache = Number of Sets × Associativity × Block Size. Given the cache size is 16KB and it is 4-way set-associative with a block size of 8 words, the size of the main memory is 128.
Step-by-step explanation:
The size of the main memory can be calculated using the formula:
Size of Cache = Number of Sets × Associativity × Block Size
Given that the cache size is 16KB and it is 4-way set-associative with a block size of 8 words, we can substitute the values into the formula:
16KB = Number of Sets × 4 × 8 words
Converting the cache size to words:
16KB = Number of Sets × 4 × 8 × 4 bytes
Now, solving for the number of sets:
Number of Sets = 16KB / (4 × 8 × 4B)
Number of Sets = 16 × 1024B / (4 × 8 × 4B)
Number of Sets = 16 × 1024 / 4 × 8 × 4
Number of Sets = 16 × 1024 / 128
Number of Sets = 128
Therefore, the size of the main memory is 128.