6.9.1 How much memory? a) The MemTotal row in /proc/memory shows the total amount of RAM available for users - this does not include RAM reserved for the kernel. b) The DRAM reported in Raspberry Pi specs is the on-chip RAM --- some of this is dedicated for Video RAM for the onboard GPU. Check the gpu_mem option which may be set in /boot/config.txt on your Pi. To find the precise amount of DRAM installed, you might consider installing the lshw package and running the lshw command. 6.9.2 Hypothetical address space 1. 10 bits to address 1KB pages 2. again, 10 bits for page number 3. 1 top-level page table 4. 2^5 == 32 2nd level page tables 5. 32 6. just the single top-level table 7. 31 unnecessary 2nd level page tables 6.9.3 Custom memory protection 1. for immutable data structures, to provide runtime guarantee data is not written to 2. a just-in-time code generator 6.9.4 Inverted page tables 1. Each lookup would take too long, too many sequential memory accesses. 2. Hash the ASID and the virtual address, use the hash value to determine where to store the physical address. Need buckets in hashtable to cope with potential collisions. 6.9.5 How much memory? 1. pn 2. pn 3. pn^2 6.9.6 Tiny virtual address space 1. 2^8 == 256 2. 256/16 == 16 3. it doubles- two accesses per memory read 4. use a TLB or similar address translation cache 5. very high overhead for such a small amount of memory 6.9.7 Definitions quiz 1. -> 4 2. -> 1 3. -> 3 4. -> 5 5. -> 2 --- Corrections? email jeremy.singer@glasgow.ac.uk