|
|
#1 (permalink) |
|
TestMagic Guru
![]() ![]() ![]() ![]() Join Date: Jul 2003
Location: Brazil
Posts: 1,360
![]() |
Interesting one:
How many bits of storage are required for the tag array of a 32-KB cache with 256-byte cache lines and four-way set-associativity if the cache is write-back but does not require any additional bits of data in the tag array to implement the write-back policy? Assume that the system containing the cache uses 32-bit addresses. |
|
|
|
|
|
#2 (permalink) |
|
Within my grasp!
![]() ![]() Join Date: Jun 2003
Location: Israel
Posts: 111
![]() |
I hope I do not confuse bits with bytes...
number of cache-lines is: 128 (32KB/256B) tag size is: 32-7-8 = 17bit (32 bit address minus 7bit due to 128 lines minus 8bit due to line-size of 256B). number of tags = number of lines = 128 size of tag array = 17*128 = 2176b |
|
|
|
|
|
#3 (permalink) |
|
TestMagic Guru
![]() ![]() ![]() ![]() Join Date: Jul 2003
Location: Brazil
Posts: 1,360
![]() |
Good try... You forgot to take into account the four-way set-associativity characteristic of the cache.
You're right about needing 8 bits due to the line size. However, you don't need 7 bits for the 128 lines, since you have four entries for each set, and therefore just 5 bits is needed to address 128/4 = 32 sets. So, you have 32 - 13 = 19 bits long (* 128 = 2432 bits). The official answer throws 2 more bits (making it 21 and thus 2688 bits), arguing that it needs it for the valid and dirty bits. However, the question explicitly mentions not to count those extra bits needed to implement a write-back cache. That's why the answer confused me a bit. Wood |
|
|
|
Contact TestMagic TestMagic Forums Archive
Link to TestMagic
TestMagic Locations
Legal
Privacy
Partner Sites:
GMAT Sentence Correction
SAT 2400
Content Relevant URLs by vBSEO 3.0.0
Copyright © 1998-2008 TestMagic
Ad Management by RedTyger