In a hypothetical system with 1024 bytes of main memory, 128 bytes of cache, blocks of 32-byte size, with direct-map (S = 2) placement policy and LRU replacement policy, answer each of the following questions:
B.
Total # of block inside cache = Cache size / Block size
=128/32 = 4
Therefore total number of set = 4/2 = 2
A.
Since total of set inside cache = 2
Number of index bits = log 2 = 1 bit
Block offset = log (Block size) = log 32 = 5 bits
Memory bits= log 1024 = 10 bits
Tag bits = 10 - 1 - 5 = 4 bits
C.
Total # of block in main memory = 1024/32 = 32
Now since we have 2 set, number of block mapped to one set is 32/2 = 16
D. In fully associative mapping, number of tag bits = 5 since index bits = 0.
So # of XOR gate required = # of tag bits = 5
Please don't post so many questions at once. Only one question or 4 sub question at a time is what we have been asked to solve . If you have any questions comment down and please? upvote thanks
Get Answers For Free
Most questions answered within 1 hours.