Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the same computer system used in problem 1. The following trace of acce

ID: 3710458 • Letter: C

Question

Consider the same computer system used in problem 1. The following trace of accessed page numbers was recorded over time: 1, 0, 2, 2, 1, 7, 6, 7, 0, 1, 2, 0, 3, 0, 4, 5, 1, 5, 2, 4, 5, 6, 7, 6, 7, 2, 4, 2, 7, 3, 3, 2, 3. The first two page references were reads, while the third was a write, and every third reference after that was also a write operation.

b) Assuming that the clock replacement policy is used, show how the contents of the four memory frames change over the sequence of page references. Compute the hit rate assuming that all frames are initially empty.

Explanation / Answer

1) We use replacement algo to decide which page needed to be replaced and when new page come in.

2) Whenever a new page is referred and not present in memory, page fault occurs and the operating system replaces one of the existing pages with newly needed page

Coming to the question

Hit ratio = 16/33

4 Page Frames PF1, PF2, PF3, PF4

1 0 2 2 1 7 6 7 0 1 2 0 3 0 4 5 1 5 2 4 5 6 7 6 7 2 4 2 7 3 3 2 3

PF . 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 4 4 4 4 4 4 4 4 4 4 2 2 2 2 2 2 2 2

PF2 - 0 0 0 0 0 6 6 6 6 2 2 2 2 2 5 5 5 5 5 5 5 5 5 5 5 4 4 4 4 4 4 4

PF3 - - 2 2 2 2 2 2 0 0 0 0 0 0 0 0 0 0 2 2 2 2 7 7 7 7 7 7 7 7 7 7 7

PF4 - - - - - 7 7 7 7 7 7 7 3 3 3 3 1 1 1 1 1 6 6 6 6 6 6 6 6 3 3 3 3

F F F F F F F F F F F F F F F F F