Let us assume a 2-way set associative 128 KB L1 cache with LRU replacement polic
ID: 3823640 • Letter: L
Question
Let us assume a 2-way set associative 128 KB L1 cache with LRU replacement policy. The cache implements write back and no write allocate policy. Cache block size is 16 Byte. Page size is 64 KB. The system has a direct mapped TLB with16 entries. TLB also implements LRU policy. Virtual address is 24 bit and physical address is 20 bit long. The cache is virtually indexed and physically tagged.
How many entries are there in the page table?
How many physical pages are there?
How many bits are used for TLB index and tag?
How many bits are used for cache index and tag?
Explanation / Answer
a) Entries in page table :
Page size 64KB = 2^16 bytes(offest)
Virtual (logical) address = 24bit = 2^24 bytes
Entries in page table = 24-16 = 8 = 2^8
b) Physical pages are : 2^20 (20 bits are physical address)
c) TLB index = log2(base2) = 1 bit ( as 2 way associative)
TLB tag = 24 (logical address) - 1(index) - 16(page size) = 7 bits
d) L1 cache = 128KB = 2^17 bytes
Cache block size = 16 B = 2^4 bytes
Offset size: log2 (cache block size) = log2 (2^4 ) = 4 bits
number of lines: cache size / (cache block size / number of sets) = 2 ^ 17 / (2 ^ 4 / 2) = 2^14
Index size:
log2 (number of lines) = log2 (2^14 ) = 14 bits
Tag size: 24 4 14 = 6 bits
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.