QUESTION
Discussion Post
1.
Deciding on a replacement policy for your pages can take longer than one would expect. Initially, you may think that picking the LRU method would be the best, however realizing that this approach is difficult to implement would be something to consider before you continue with this choice.
Also, realizing what method the OS is designed to do will go a long way as well. Linux uses the LRU method whereas Windows is known to use a random-page replacement on multi-processor systems. However, if the Windows system you’re using has a single processor, that also uses LRU. Depending on the type of work your organization or you yourself are conducting may be a deciding factor on what policy you need to have.
Having the right algorithm can increase the system’s efficiency because the number of page faults are decreasing and the number of I/O as well.
According to this case study below by Rexha et. al, between FIFO, LRU, and Optimal, FIFO is the worst algorithm to have because of the number of page faults. It also helps explain this concept a bit more!
https://pdfs.semanticscholar.
2.
Replacement policy is what determines which page that is currently in memory should be replaced when a new page must be brought in. All of the policies strive to remove the page that is least likely referenced in the near future. Our text states that the more elaborate and sophisticated the replacement policy is, the more resources required to run them are needed. So I would assume that if I had limited hardware and software capabilities that could make me choose a less fancy policy. Both Unix and Linux use an algorithm that is based on the clock algorithm for their replacement policy. Windows has a virtual memory manager that manages page swaps depending on how much memory is currently available to the system. Android is similar to Linux with a few added extensions.
ANSWER
Discussion Reply
- It is true that the decision on an appropriate replacement policy for your pages can be a lengthy exercise. While one may select the LRU replacement policy at first, they may later come to the realization that the selected approach may be challenging to implement. The operating system in place plays an important role in the determination of the appropriate method since each OS is designed to use a specific replacement method. While Windows OS uses a random-page replacement policy on multi-processor systems and LRU in single-processor systems, Linux OS uses the LRU replacement policy. Another important factor is the type of work that an individual or organization intends to do. As you have stated in your post, it is important to have the appropriate algorithm to increase the efficiency of the system. Having the right algorithm reduces the number of page faults and the number of I/O (Paulson & Ramachandran, 2017).
- I think you have provided a very clear discussion of what a replacement policy is and its importance. It is the policy by which an operating system determines which page remains in memory and which one should be replaced when a new page needs to be brought in. Replacement policies seek to remove the page that is the least likely to be referenced in the near future. While one may wish to use the most elaborate or sophisticated replacement policy, they may be limited by the resources available. The more sophisticated the replacement policy, the more the resources that it requires to run. Software and hardware limitations limit the type of replacement policy that one can choose for their system.
References
Paulson, H., & Ramachandran, D. R. (2017). Page Replacement Algorithms–Challenges and Trends. International Journal of Computer & Mathematical Sciences IJCMS, 6(9).