ICS412 - Fall 2009 - Homework #5 -

Work alone
You are expected to do your own work on all homework assignments. You may (and are encouraged to) engage in general discussions with your classmates regarding the assignments, but specific details of a solution, including the solution itself, must always be your own work. (See the statement of Academic Dishonesty on the course's syllabus.)

What to turn in?
You can turn your answers on paper on the day the assignment is due (during class or in my office). Alternately you can turn in an electronic copy via e-mail to henric@hawaii.edu and to altunkay@hawaii.edu with a subject line like "ICS412: HW#5" before 11:59PM on the day the assignment is due.


Exercise #1 (14pts) : Exercise 8.11 from the textbook


Exercise #2 (12 pts):

Consider the following page table, in which "x" means an invalid entry.

logical physical
15 x
14 x
13 x
12 x
11 7
10 x
9 5
8 x
7 x
6 x
5 3
4 4
3 0
2 6
1 1
0 2

Assume a 4KB page size. Give the physical address corresponding to the following logical addresses. All addresses are decimal values.

a. 20

b. 4100

c. 8300


Exercise #3 (4 pts): Exercise 8.18 from the textbook


Exercise #4 (4 pts): Exercise 8.19 from the textbook


Exercise #5 (8 pts):
Suppose we have a computer system with a 44-bit virtual address, page size of 64K, and 4 bytes per page table entry.

a. (2pts) How many pages are in the virtual address space?

b. (4pts) 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?

c. (2pts) Suppose we have a 4 GB program such that the entire program and all necessary page tables (using the two-level page table scheme from above) are in memory. How much memory, in number of page frames, is used by the program, including its page tables?


Exercise #6 (5 pts): Exercise 8.23 from the textbook


henric@hawaii.edu