Go Back   TestMagic Forums > Test preparation > GRE Subject Tests > GRE Computer Science
Register FAQForum Rules Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 09-21-2003, 01:30 PM   #1 (permalink)
wood
TestMagic Guru
 
Join Date: Jul 2003
Location: Brazil
Posts: 1,360
wood has disabled reputation
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.
wood is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Google Bookmark this Post!Reddit!
Reply With Quote
Old 09-21-2003, 04:27 PM   #2 (permalink)
rafi_dery
Within my grasp!
 
Join Date: Jun 2003
Location: Israel
Posts: 111
rafi_dery has disabled reputation
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
rafi_dery is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Google Bookmark this Post!Reddit!
Reply With Quote
Old 09-21-2003, 04:44 PM   #3 (permalink)
wood
TestMagic Guru
 
Join Date: Jul 2003
Location: Brazil
Posts: 1,360
wood has disabled reputation
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
wood is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Google Bookmark this Post!Reddit!
Reply With Quote
Old 09-21-2003, 04:52 PM   #4 (permalink)
rafi_dery
Within my grasp!
 
Join Date: Jun 2003
Location: Israel
Posts: 111
rafi_dery has disabled reputation
Sure, I completely forgot the sets matter...
Thanks!
rafi_dery is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Google Bookmark this Post!Reddit!
Reply With Quote
Old 09-21-2003, 04:57 PM   #5 (permalink)
wood
TestMagic Guru
 
Join Date: Jul 2003
Location: Brazil
Posts: 1,360
wood has disabled reputation
But what do you think... is the book correct in adding the two extra bits it supposedly asked not to??
wood is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Google Bookmark this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

What you can do
You cannot post new threads
You cannot post replies
You cannot post attachments
You cannot edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 06:11 PM.

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

Scroll Up