In-class notes for 10/07/2020
CS 273 (OS), Fall 2020
Exams returned
Memory management overview
Swapping.
Hole management
Paging (virtual memory).
Exercise
Assume 6 page frames, two processes with pages A1, A2, ... and B1, B2, ...
How many page faults are needed forA1 A2 A3 A4 A1 A2 A3 A4 \ / \ / \ / \ / \ / \ / \ / \ B1 B2 B1 B3 B1 B4 B1 B2
for FIFO? For NRU? Here, boldface indicates modification of a page.
Assume that any R/M bits start at 0 and are never reset to 0 during this sequenceAnswer for FIFO: 14 page faults for A1, B1, A2, B2, A3, A4, B3(replacing A1), A1(B1), B1(A2), A2(B2), B4(A3), A3(A4), A4(B3), B2(A1)
Answer for NRU: 12 - A1, B1, A2, B2, A3, A4, B3(A1), A1(B2), B4(A3), A3(A4), A4(B3), B2(A3)
< >