Discussion questions: memory management 1
Please work out these problems before your next discussion section. The
GSIs will go over these problems during the discussion section.
1. Page addressing
Consider a system with 32-bit addressing and 4-KB pages.
a. How many bits are needed to represent the offset? Which bits of the
address are these? (bit 31 is the most-significant, bit 0 is the least-significant).
b. How many bits are needed to represent the page number? Which bits
of the address are these?
c. What is the greatest number of virtual pages a process could
d. Repeat (a), (b), and (c), assuming now that the system changes to
using 16-KB pages.
2. Second-chance Clock with FIFO
Assume the clock queue contains the following resident pages:
The hand currently points at page 5. The referenced bits are currently
a. If the OS needs to evict a frame, which one will it choose, given this
clock queue, hand position, and reference bits?
b. List the hand position and reference bits for each page after the
eviction. Don't worry about inserting any new page into the clock queue.