A4 Section 3 Answers

1,154 views
Skip to first unread message

Ahmed Elkatib

unread,
Apr 28, 2013, 5:14:17 PM4/28/13
to cs49...@googlegroups.com
The answers are excactly what I found on these links , however, not sure about 6,8

A4 - Assignment

Section III
  1. Which is the fastest cache mapping function?

     Direct mapping 
     Set associative mapping 
     Fully associative mapping 
  2. Which cache mapping function is LEAST likely to thrash, i.e., it has the lowest chance of any block contending with any other block to be stored in the same line?

     Direct mapping 
     Set associative mapping 
     Fully associative mapping 
  3. Which cache mapping function does not require a replacement algorithm?

     Direct mapping 
     Set associative mapping 
     Fully associative mapping 
  4.  

    A copy of the data from memory address 7121C5 (hex) is contained in the portion of the cache shown above. What is the value retrieved from that address?

     

     

     

     

     

     

     94 
     F5 
     A4 
     A5 
     66 
     C7 
  5. What is the total main memory size?

     1 Mega Bytes 
     4 Mega Bytes 
     8 Mega Bytes 
     16 Mega Bytes 
     32 Mega Bytes 
  6. What is the total cache memory size?

     1 kilo Bytes 
     2 Kilo Bytes 
     4 Kilo Bytes 
     1 Mega Bytes 
     2 Mega Bytes 
  7. Similar to the mapping indicated above, assume a 2-way set associative mapping that is defined.  Assume there are a total of P locations in primary memory and C locations in cache memory. How many different locations in primary memory map to a particular location in cache memory?

     1 
     2 
     P/C 
     2P/C 
     P/(2C) 
     P 
  8. Using the above problem description, how many locations in cache memory can be occupied by any primary memory location?

     1 
     2 
     P/C 
     C 
     2P/C 
 
A4.docx

agabriela079

unread,
Apr 28, 2013, 5:54:43 PM4/28/13
to cs49...@googlegroups.com
amed: i apreciate you giving us the links you used to get the answers but i would rather have you show us the work that you did in a paper with explanations because honestly i don't have time to read all the information that is on the links and all the websites. Also when i study for the midterm i wont have time to read all of the websites. It will be much easier to just look over the notes. i know we all are short in time but it will help us at the end. Is this ok?
thanks, kindly
gaby

Christopher Rivas

unread,
Apr 29, 2013, 1:46:38 AM4/29/13
to cs49...@googlegroups.com
I can't do #6. I tried looking at this link (http://cseweb.ucsd.edu/classes/fa10/cse240a/pdf/08/CSE240A-MBT-L15-Cache.ppt.pdf)
Cache Size = #sets * block size * associativity
so it's C = 2^7 * BLOCKSIZE * 2
C = 256 * BLOCK SIZE.
I don't know how to figure it out from the diagram in A4.
I think it's 4 because words are 2-bits. so that's 4 words. and 256*4 = 1KB.
but i don't know where that base-16 comes in. because 256 * 16 is 4 KB.
Reply all
Reply to author
Forward
0 new messages