Homework Assignment #11 – Page Faults [42 pts]


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.

How to turn in?

Assignments need to be turned in via Laulima. Check the Syllabus for the late assignment policy for the course.

What to turn in?

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.


Exercise #1 [42 pts]

Consider a system with four page frames and a program that uses eight pages. Consider the reference string 0 1 7 2 0 3 1 7 0 1 7 and assume that all four page frames are initially empty. Consider the three following algorithms:

In each cases show a diagram (ASCII art recommended) that shows which pages are in which frames throughout time, and page faults at the bottom. For instance:

  | 0  1  7  2  . . .
-------------------------
0 | 0  0  0  0  . . .
1 | -  1  1  1  . . .
2 | -  -  7  7  . . .
3 | -  -  -  2  . . .
-------------------------
f | X  X  X  X  . . .

would mean that at step 1 page 0 is referenced and loaded into frame 0, which is a page fault; then page 1 is referenced, and so on. The goal is to fill this table to see what in memory when and thus infer the number of page faults.

The first 4 steps are ALWAYS the same, as above (i.e., just fill the four frames, with one page fault each time)