More Operating System Tutorials
More Operating System Tutorials
Augustine
COMP
COMP 3100 Operating Systems
2604:
Semester 1, 2017/2018
Tutorial 8 - Memory Management (Chapter 3)
Tutorial #6 - Friday 3rd November 2017
1. Consider a swapping system in which memory consists of the following hole sizes
in memory order: 10 MB, 4 MB, 20 MB, 18 MB, 7 MB, 9 MB, 12 MB, and 15 MB.
Indicate on the diagram which hole is taken for successive segment requests of
(a) 12 MB
(b) 10 MB
(c) 9 MB
for first fit (FF)? Now repeat the question for best fit (BF), worst fit (WF), and next fit
(NF).
3. For each of the following decimal virtual addresses, compute the virtual page
number and offset for a 4-KB page and for an 8 KB page: 20000, 32768, 60000.
4. Using the page table of Fig. 3-9 below, give the physical address corresponding to
each of the following virtual addresses:
(a) 20
(b) 4100
(c) 8300
5. What kind of hardware support is needed for a paged virtual memory to work? ?
7. A computer has 32-bit virtual addresses and 4-KB pages. The program and data
together fit in the lowest page (0–4095) The stack fits in the highest page. How
many entries are needed in the page table if traditional paging is used?
8. A machine has 48-bit virtual addresses and 32-bit physical addresses. Pages are 8
KB. How many entries are needed for a single-level linear page table?