1
$\begingroup$

An 8-way set-associative cache is used in a computer in which the real memory size is 222 bytes. The line size is 16 bytes, and there are 26 lines per set. A) What is the size of the cache in bytes?

What I (think) I understand: Cache line and cache block are synonymous. The textbook says that an n-way set-associative cache has n blocks(lines) per set. That conflicts with the next sentence that says "there are 26 lines per set." Is this problem incorrect or are my assumptions wrong?

$\endgroup$
1
$\begingroup$

An n-way set associative cache can store n different entries for a given index in the cache array. So the 8-way acts like an 8x multiplier as compared with a direct mapped cache (1-way set associative).

So, I would take it that the line size of 24 with 26 lines per set and 23-way set associative is 213 or 8k bytes.

A next question might be how big are the tags that are stored in the associations? 22 (from the address space) - 4 (for cache line size) - 6 (the number of entries in the array), means that a tag size of 12 bits is needed.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.