It's UWAweek 42 (2nd semester, week 12)

help2002

This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.
Displaying selected article
Showing 1 of 738 articles.
Currently 173 other people reading this forum.


 UWA week 41 (2nd semester, week 11) ↓
SVG not supported

Login to reply

👍?
helpful
6:37am Wed 9th Oct, Joshua N.

Hi, based on the current implementation, once every process has at least one page in RAM and the RAM is full, the number of pages for each process effectively gets "locked in" because the local LRU will prioritize evicting a page from the same process. This means that if each process has at least one page in RAM, it will keep evicting its own pages, thus maintaining a fixed number of pages for each process in RAM. If the goal is to allow processes to use more or less RAM dynamically based on their needs and activity, a global LRU policy would be the better option. Isn't that the case in real world memory management?

Simulations are a model or abstraction of the "real world", they do not 100% match what is done in practice. How much a simulation matches the real world depends on the level of detail necessary (as per the specification). With all simulations you need to be aware of the assumptions made when it was created in order to get accurate results. In this case we are assuming all process don't have high memory requirements.

But yes, in practice making a completely local algorithm isn't possible as not all processes have the same memory requirements, so global LRU is usually better (also although locally a page might be the least used, globally it may be much more recent). However, just because you use a global policy doesn't necessarily mean each page will be given the right amount of memory for its needs. You need another algorithm that can approximate how many frames a process needs (Page Fault Frequency).

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy