ANONYMOUS wrote:
> Hi, I have the following questions about Project 2.
>
> 1. Based on the response in the post below stating that a process can only be loaded into RAM once, does this mean that after the fourth page (with page number = 3) of a process has been loaded into RAM, no more pages of the process can be loaded into RAM again (i.e. any further appearances of the process in in.txt will be ignored once the fourth page of the process has been loaded into RAM)?
>
>
[help2002]⬈
Yes, Amitava said you can either do that or reload the pg 0 again (which would just be updating the "last_accessed" variable).
> 2. I have seen that a response in a previous post states that we are simply "moving" pointers in and out of RAM.
>
> But in my solution, before any pages are loaded, I initialise the RAM by filling it with struct pointers such that the fields (process_id, page_num, last_accessed) are all set to -1.
>
> After this, I don't "move" any pointers in and out of RAM when I load a new page as I just update the fields of the structs in the appropriate RAM array locations. Is what I am doing acceptable?
I believe moving pointers was the intention, otherwise using an array of pointers to structs wouldn't have any other benefit from just using an array of structs. You'd have to check with Amitava to be completely sure.
> Thank you
np