Reputation: 61
Considering a machine with a byte-addressable main memory of 256 Kbytes and a block size of 8 bytes. With a set associative mapped cache consisting of 32 lines divided into 2-line sets.
Explanations as to why would be extremely helpful as i'm trying to understand how to work these out for further understanding.
Upvotes: 1
Views: 1772
Reputation: 36
Before your answer let's look at some calculations(see log as log to the base 2):
i) Number of Sets= 32/2 =16. Hence number of bits required to point address a set= log 16=4.
ii) Number of bits to be left aside as offset within a line= log 8 =3. 8 is the block or line size here.
iii) Number of blocks in RAM = 256KB /8 = 2^15.
Upvotes: 1