I'm having some difficulties grasping a few ideas and want some clarifications on them if possible. So, lets say the contents of in.txt are, "0 1 1 1 1 2 2 2 2 3 3 3 0", you'd end up with the first 0 being evicted without another page from process 0 being 'loaded' in RAM at that point in time, right?
If that's the case, when you're storing the pointer for the 2nd 0 into RAM, you'd still be 'loading' in the 2nd page of process 0 from the disk into RAM instead of 'loading' in the first page (as the pointer to that page was previously stored in ram before all of process 0 was evicted) right?
If that's the case, are we meant to/allowed to have an extra structure/array to hold the current page of each process at a time? Or are we meant to just treat it as though we are starting from "page 0" again?
(This issue occurs as, due to the Global LRU policy dictating that, as the RAM would be 'filled' up by process 1 and 2 (which evicts and replaces itself using the Local LRU policy), the 1st page of process 0 would be evicted and replaced by process 3, before process 0 can be reintroduced into RAM, (my current understanding for the LRU policies is, that I would iterate through ram, find the lowest last accessed time and replace that "slot" with the new frame from the new process. This is only really for reference in case I'm misunderstanding something))
I could just be totally misunderstanding the concept entirely as well, I'm not too sure, so any clarification would be helpful, thx