Assume the following information about a 2-level memory hierarchy system. Memory
ID: 3674591 • Letter: A
Question
Assume the following information about a 2-level memory hierarchy system.
Memory is byte addressable.
Memory capacity is 4 GB (G=2^30).
Cache capacity is 64 KB (K=2^10).
Block offset size is 8 bits.
Assuming that the CPU has generated the physical address X = (2293936063)10, answer the following questions.
1.If 2-way set associative is used, what is the size of each segment in bytes?
2.What is the block offset value?
3. If direct mapped is used, what is the index size?
4. If 2-way set associative is used, what is the index size?
Explanation / Answer
1ans:
Given that Memory capacity= 4 GB i.e 2^2*2^30=2^ 2+30
= 2^32
32 address lines are needed for memory
Cache capacity= 64 KB i.e 2^6*2^10= 2^6+10
=2^16
16 address lines are needed for cache memory
So, that 16 segements with 64 kb cache memory is used to represent the memory capacity.
Size of each segment is 64kb.
2 ans:
Given that Block offset size is 8 bits.
So, that the value of Block offset is 2^8= 256bytes
3ans:
If direct mapping is used, the size of index is 256bytes because it uses a repetative memory locations for the same repeetative value.
4 ans:
if 2-way set associative is used, it is reduced to half i.e 128 bytes. Because it takes 2 bolcks for each set.
So, the index size is 128 bytes.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.