Are pages loaded into RAM cyclically, or on a lowest-index basis?
For example, if the page table of process 0 looks like this: [99, 2, 4, 99], this means that page 0 and 3 are in disk while 1 and 2 are in RAM.
his may happen if pages 0,1,2 were loaded into RAM, then page 0 was swapped out for another process's page. In this case, if the process is requested again, would you reload page 0 or would you load page 3?
Cyclically, so it would be Page 3.
What would the next page after that be?
Amitava said you can only load the process once, so there would be no next page.
Also, once the RAM is full (all 8 frames occupied by process pages) it will always stay full, as we have no way to evict a page without replacing it. Any new process request would replace a page based on LRU.
Say that the RAM frames look like this [2,2,1,0,0,0,3,0], so process 0 has all 4 pages in RAM, process 2 has 2 pages in RAM, process 1 and 3 have 1 page in RAM.
With the LRU policy, won't this mean that process 0 will always occupy 4 pages in RAM? Since all processes have at least 1 page in RAM, then we always use a local LRU policy, and hence the number of frames a process occupies stays constant. Is this how its supposed to work?