You are expected to do your own work on all homework assignments. (See the statement of Academic Dishonesty on the Syllabus.)
Check the Syllabus for the late assignment policy for this course.
Assignments need to be turned in via Laulima. Check the Syllabus for the late assignment policy for the course.
You should turn in single plain text file named README.txt with your answers to the assignment’s questions. Your file must be readable “as is” and points will be removed if the report is not readable.
Consider the following page table, in which “x” means an invalid entry.
------------------
logical | physical
------------------
| 15 | x |
| 14 | x |
| 13 | x |
| 12 | x |
| 11 | 31 |
| 10 | x |
| 9 | 5 |
| 8 | 7 |
| 7 | x |
| 6 | 2 |
| 5 | x |
| 4 | 4 |
| 3 | 6 |
| 2 | 1 |
| 1 | 0 |
| 0 | 12 |
------------------
Assume a 2KiB (i.e., 2,048 bytes) page size. Give the physical address corresponding to the following logical addresses. For convenience, in this exercise all physical and logical addresses are decimal values.
Your answer should thus be decimal values. Show your work.
a. [4 pts] 2020
b. [4 pts] 12540
c. [4 pts] 8150
d. [4 pts] 22540
e. [4 pts] Give a logical address (in the range 0-32767) that will generate an error given the above page table and explain.
Consider a logical address space of 16 pages with 4,096 bytes per page, mapped onto a physical memory of 8 frames.
a. [3 pts] How many bits are required in the logical address? (show your work)
b. [3 pts] How many bits are required in the physical address? (show your work)
Consider a computer system with 64-bit logical addresses, 2-KiB page/frame size, and 4GiB of physical memory. (Give all answers as powers of 2.)
a. [4 pts] How many entries are there in a conventional single-level page table for a process that would use the maximum possible address space? (show your work)
b. [4 pts] How many entries are there in an inverted page table? (show your work)
Suppose we have a computer system with 44-bit logical addresses, page size of 64KiB, and 4 bytes per page table entry.
a. [8 pts] How many pages are in the logical address space for a process that uses the largest possible address space? (show your work)
b. [8 pts] Suppose we use two-level paging and arrange for all page tables to fit into a single page frame. How will the bits of the address be divided up? (show your work)
c. [6 pts EXTRA CREDIT] Suppose we have a program with a 4GiB address space. Counting the program and all page tables, using the two-level page table scheme from the previous question, how much memory, in number of page frames, is used? (show your work)