Question 31
Which cache replacement policy is mathematically guaranteed NEVER to suffer from Belady's Anomaly?
LRU is a Stack Algorithm, which is mathematically proven never to suffer from Belady's Anomaly.
Which cache replacement policy is mathematically guaranteed NEVER to suffer from Belady's Anomaly?
LRU is a Stack Algorithm, which is mathematically proven never to suffer from Belady's Anomaly.
In a Write-Back cache policy, what is the role of the dirty bit?
The dirty bit is set when a write modifies the block in cache, signalling that main memory must be updated upon eviction.
A direct-mapped cache has 128 lines. To which line index does main memory block 259 map?
Line index = Block number mod Total cache lines = 259 mod 128 = 3.
A virtual memory system has 32-bit virtual addresses, 4 KB page size, and 28-bit physical addresses. What are VPN, PFN, and Offset field widths?
$Page size = 4 KB = 2^12 B => Offset = 12 bits. VPN = 32 - 12 = 20 bits. PFN = 28 - 12 = 16 bits.$
A single-level page table system has 32-bit virtual addresses and 4 KB page size. Each PTE is 4 bytes. What is the page table size?
$Pages = 2^{32-12} = 2^20 pages. Size = 2^20 * 4 bytes = 4 MB.$