Question: In Virtual Memory Management using Paging, most operating systems discuss about replacement policy that deals with the selection of a page in main memory to

In Virtual Memory Management using Paging, most operating systems discuss about replacement policy that deals with the selection of a page in main memory to replace when a new page is brought in. One of replacement algorithms that we discussed in class is Least Recently Used (LRU) that replaces the page in memory that has not been referenced for the longest time. By the principle of locality, this is the page least likely referenced in the near future. However, LRU algorithm is not easy to keep track of pages with the time of list last reference, so that in class we worked together using a STACK when selecting a replacement page each time. You should use a STACK function in your program.
You are asked to develop Linux C program using doubly-linked list that replaces pages with LRU using Stack, and test your program for the following references upon a memory of 3 and 4 frames respectively.
7,0,1,2,0,3,0,4,2,3,0,3,2
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
7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1
1,2,3,4,2,1,5,6,2,1,2,3,7,6,3,2,1,2,3,6
In Virtual Memory Management using Paging, most

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!