CSCI 3305 & ITFN 3601: Operating Systems
Spring 2020
Assignment 2 - Page Tables & Virtual Memory Management
Partial credit cannot be given if you don't show your work!
You may find the tables here useful. You should also take a look at the Virtual Memory Management Tutorial
posted in D2L.
Consider a virtual memory system with a 4GB virtual address space with 16KB pages. There are 2MB of physical
memory. Answer the following questions:
1. The page table for a process contains the following entries:
4
Page #
Frame #
0 (000)
3
5 (101)
2
1 (001)
1
6 (110)
0
7 (111)
Assume all other page table entries are invalid. Please mark any invalid addresses as such.
A. First, how many bits are required to hold the offset?
Convert the following logical/virtual addresses to their corresponding physical addresses. You may
leave the results in binary.
B. 1 1 0 1 0 0 1 1 1 0 0 1 0 0 1 0 1
C. 0 0 1 0 0 0 1 1 1 1 1 0 0 1 0 0 0
D. 1 0 0 0 1 0 0 0 0 0 0 1 1 1 1 1 1
2. Answer the following questions about the virtual memory system (using the same system information as
given above):
A. How many bits are required to hold the virtual address?
B. How many bits are required to hold the physical memory address?
C. How many page table entries are there in each page table?
D. How many frames are there in physical memory?
E. How wide is each page table entry? Remember, this depends on how any bits required to hold the
frame number (see previous question). Also, you have to round this number up to 8, 16, or 32 bits,
representing 1, 2, or 4 bytes, respectively.
F. How big is each page table?
3. Let's add a second level page table so that we can greatly reduce the size of the page tables in memory.
A. How many page table entries are in each frame?
B. How much physical memory can a single frame of page table entries cover?
C. How many frames does it take to hold a single page table? (i.e., how many contiguous frames would
need to be allocated for the primary page table, if the entire table had to be allocated?)
D. Assume some process has program, data, and heap size of 328MB and a stack of 513MB. How many
pages of the original page table would need to be allocated to cover these areas?
Answers
Answered by
0
jckjhfofo
jfkgiufytyddo6
Similar questions