C502 – Operating Systems Tutorial ∗
Memory Management
1. Describe the difference between swapping and paging in the context of virtual memory management.
2. What is an associative memory? How does it work and how is it implemented?
3. A system implements a paged virtual address space for each process using a one-level page table. The
maximum size of an address space is 16 MB. The page table for the running process includes the
following entries:
Page Frame
0 4
1 8
2 16
3 17
4 9
The page size is 1024 bytes and the maximum physical memory size of the machine is 2 MB.
(a) How many bits are required for each page table entry?
(b) What is the maximum number of entries in a page table?
(c) How many bits are there in a virtual address?
(d) To which physical address will the virtual address 1524 translate to?
(e) Which virtual address will translate to physical address 10020?
4. Calculate the access times for a four-level paging system assuming a TLB hit ratio of 80% and 98%.
Assume that time for a memory access is 100 ns and for TLB access 20 ns.
How does this compare to a single-level paging system?
5. Compare small and large page sizes for a paged virtual memory system. Consider fragmentation, data
structure requirements, page tables, page transfer time, TLB space etc. (Exam question in 2015-16).
∗with thanks to Morris Sloman