A
couple things that you should be sure that you know about … VM.
(Assume 32 bit virtual addresses and 28 bit physical
addresses for all problems.)
1a. If the virtual addresses are denominated in bytes, how big (in GB) is the virtual address space? ________4GB_______________
1b. If the physical addresses are denominated in bytes, how big (in GB) is the physical address space? _______________________
1ci. If a page offset in a particular system is a field of 16 bits, then how big are the pages? ________2^16_______________________
[X]1cii. If pages in a particular system are 32KB big, then how many bits are in the page offset? _______________________________
1d. Is your answer to part 1c independent of the size of the virtual address space? _Yes___________
1e. Is your answer to part 1c independent of the size of the physical address space? __Yes__________
1f. If you had to describe the ‘VM-set-associatively’ of the pages of an average VM system, would you say direct-mapped, fully-SA, or partway-SA?___fully SA!___ Why?__Hint: think about the different ways that a physical page can correspond to a virtual page. 1-way? 4-ways? or any-way?_______________________
2a. If your machine has 4KB pages, then …
How many physical pages?__________________________________
How many virtual pages?____________________________________
How many bits in VP number?________________________________
How many bits in PP number?________________________________
How many bits in Page offset?________________________________
2b. On the machine in 2a, if the tlb contained a mapping of VP#1024 -> PP#64, then give the binary representation of a virtual page that will map into the 42nd word of physical page #64.__Hint: VPN:1024, Page Offset: 42x4________________________
2c. If your machine has 8KB pages, then …
How many physical pages?__________________________________
How many virtual pages?____________________________________
How many bits in VP number?________________________________
How many bits in PP number?________________________________
How many bits in Page offset?________________________________
2d. On the machine in 2c, if the tlb contained a mapping of VP#1024 -> PP#64, then give the binary representation of a virtual page that will map into the 42nd word of physical page #64.__________________________
3a. True or
False: A tlb is a cache of virtual-> physical page mappings? True,
dammit!
3b. The total size of a normal tlb is normally [bigger : smaller] than in a normal L1 data cache? Why?___Think about how much ‘area’ each mapping covers. ____________
3c. The set associatively of a normal tlb is normally [greater : less] than in a normal L1 data cache? Why?___What is the relation between potential SA and size?_______________________
3d. The block size of a normal tlb is normally [bigger : smaller] than in a normal L1 data cache? Is this a trick question?_Kinda._ Why?__The basic ‘data’ units of the tlb are ‘mappings’ – not the linear data of caches._____
[X]4a Explain what ‘a larger page size’ means in a VM context._____________________________
[X]4b. In which of the following situations will a larger page size (than in a ‘normal’ system) be a good or bad idea (and why):
1. In a system that does lots of linear accesses, bigger pages is [good : bad ]?
Why?_____________________________________________________________________
2. In a system that does lots of [truly] random accesses, bigger pages is [good : bad]?
Why? ____________________________________________________________________
3. In a system that has high latency/low bandwidth memory access, bigger pages is [good : bad] Why?_____________________________________________________________________
4. In a system that has low latency/high bandwisth memory access, bigger pages is [good : bad] Why?______________________________________________________________________