Question 4 -- 20 points
Suppose you have a system with 32-bit pointers and 4 megabytes of memory
partitioned into 4096-byte pages. The system employs an inverted page table
combined with the ``second chance'' (clock) page replacement algorithm.
Assume that there is no page sharing between processes.
Answer the following questions:
- Describe what page table entries should look like. How many bits
should be in each page table entry, and what are they for? How
many page table entries should there be in the page table?
- In the absence of a TLB, describe how a virtual address
is translated into a physical address for a memory-resident page.
How can this be made more efficient without adding a TLB?
- In order to make such a scheme efficient enough to use on a
real machine, you need a TLB. Describe what this
is, and how it works.
- What needs to occur on a context switch?
- Describe what happens when a page fault occurs for a non-resident page.
What extra data structures need to be maintained?