Question: Question 2. Virtual Memory, Page Replacement Consider pure demand paging as fetch policy. A process contains seven virtual pages (0, 1, 2, 3, 4, 5,


Question 2. Virtual Memory, Page Replacement Consider pure demand paging as fetch policy. A process contains seven virtual pages (0, 1, 2, 3, 4, 5, 6) on disk and is assigned to a fixed allocation of three page frames (0, 1, 2) in main memory which are initially empty. Consider the following reference string: : 0, 1, 4, 2, 5, 1, 6, 3, 4, 6, 2, 2, 3, 5, 5, 1, 1, 2, 0, 3. Show the successive page residing in the three frames using the least Recently Used (LRU) and CLOCK policies starting with an empty main memory. How many page faults would occur in each case? LRU (10 pts.) Ref. string 0 1 4 2 . 5 1 6 3 4 2 2 3 5 5 1 1 0 Frame 0 Frame 1 Frame 2 Page Fault Number of page faults CLOCK (15 pts.) 0 1 4 Ref.string 2 5 1 ma 6 3 Frame 0 Frame 1 Frame 2 Page Fault 2 N 3 5 Ref. string N 3 5 1 1 2 O 3 Frame 0 Frame 1 Frame 2 Page Fault Number of page faults
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
