7.2
Access to a big hash table exhibits poor locality.

7.5
Write-through cache provides safety (the cache always matches memory) at the expense of performance.
a. Use write-back cache to increase performance.
b. Use write-through cache to provide data integrity.

7.9
References in order: miss, miss, miss, miss, miss, miss, miss, miss, miss, hit, miss, miss, miss, miss, hit

The cache at the end of these references showing byte addresses (hex) and word addresses (decimal)
Memory[n]- Memory[n+3]
C0-C4 (word address 48)
 
8-B (word address 2)
C-F (word address 3)
10-13 (word address 4)
54-57 (word address 21)
18-1B (word address 6)
 
 
6C-6F (word address 27)
 
2C-2F (word address 11)
 
34-37 (word address 13)
 
 

One example of index computation (address reference = 21)
Word Address reference = 0010101
Full Address reference = 0010101XX

index = 0101
tag = 1
Memory locations 54-57 will be loaded into the cache.

7.10
References in order: miss, hit, miss, miss, miss, miss, miss, miss, miss, hit, miss, hit, miss, miss, hit, miss

The cache at the end of these references showing byte addresses (hex) and word addresses (decimal)
Memory[n]- Memory[n+15]
0-F (word addresses 0-3)
10-1F (word addresses 4-7)
20-2F (word addresses 8-11)
30-3F (word addresses 12-15)

One example of index computation (address reference = 11)
Word Address reference = 0001011
Full Address reference = 0001011XX

index = 10
tag = 0
Memory locations 20-2F will be loaded into the cache.

7.28
Consider a cache that contains 4 words so there are 2 sets in the set-associative cache.
Consider a series of accesses (word addresses in hex) 0, 2, 4
The direct mapped cache will have fewer misses because all three words map to set - in the set-associative cache.

7.39
Page size = log2(16K) = 14 bits
Virtual page number requires 40 - 14 = 26 bits
Page number requires 36 - 14 = 22 bits
Page table requires 2 26 page table entries
Each page table entry requires 4 + 22 = 26 bits (round up to 32 bits)
Each page table requires 2 26 x 4 bytes/entry = 256 Megabytes

Address Space Problem
Virtual memory was originally created to allow access to a large physical address space.
e.g. The Eclipse had a 16 bit address space but you could configure 16 MBytes of Ram (if you had the $$$$)