Problem 1) In a 32-bit machine we subdivide the virtual address into 4 parts as follows: 10-bit 8-bit 6-bit 8-bit, i.e. we use a 3-level page table, such that the first 10-bit are for the first level etc. If the valid virtual address range is the lowest 256 KB: a) What is the page size in such a system? b) How many page tables and valid PTEs are needed for the third level (6-bit)? c) How many page tables and valid PTEs are needed for the second level (8-bits)? d) How many page tables and valid PTEs are needed for the first level (10-bits)? Problem 2) As discussed in lecture, address spaces serve two purposes: they provide protection and true virtual memory. Why does using address spaces to provide both of these functions make sharing between processes difficult? Trace through an example of how process P1 might pass the data stored at virtual memory location 0x60000000 to process P2. Now imagine that we are building an operating system using 64-bit addresses. How huge is such an address space? A full 64-bit address space consumed at 1GB/sec will last for about 544 years. A 32-bit address space consumed at that rate will last about about a minute. What this means is that we could safely create a single virtual address space for all processes without worrying about exhausting the virtual memory namespace. How would this make sharing easier? Trace through the example with P1 and P2 from before, only now assume that there is a single virtual address space in which both processes run. Of course, we still need to worry about providing protection. Fortunately, a 64-bit single virtual address space for all processes looks a lot like another resource under the control of the operating system--the file system. What allows sharing and protection to coexist in the file system is the notion of a file owner. The owner of a file can tell the operating system which users are allowed to read and write their file. Say that we associate an owning process with each page in the single virtual address space and give page owners the power to give other processes read or write access to their pages. Going back to our example, P1 owns the page containing 0x60000000 and wants to give P2 read access to it. How would the operating system prevent P2 from reading 0x60000000 before it was allowed to? What state does the operating system have to change so that P2 can read 0x60000000? Problem 3) TLB: Consider a system with memory mapping done on a page basis and using a single level page table. Assume that the page table is always in the main memory. a) If a memory reference takes 200ns, how long does a paged memory reference takes? b) Now we add an MMU that imposes an overhead of 20ns on a hit or a miss. If we assume that 85% of all memory references hit in the MMU TLB, what is the effective memory access time?