ANONYMOUS wrote:
> Assume that we had called the same process ID 5 times like so:
>
> 0 0 0 0 0
>
> when we get to that fifth call, since it's already in memory, should we increase the time?
As Amitava said in his clarification email "(1) What happens if all the pages of a process are already in memory and the process id appears again in the input. You can handle this one of two ways, either you can ignore it, or 'bring' the 0th page of the process to RAM again (and the 1st page if the process id appears again ... so on). Either way is acceptable."
You can either choose to load it into RAM and increase time or just ignore it
>
> like should it be:
>
> 0, 1, 2, 3, 4
>
> or
>
> 0, 1, 2, 3, 3 (since were not moving values from Virtual Machine to RAM)
>
Both are valid
>
> Also, in that fifth call, we will still update the last accessed time of that page number in the page table correct?
>
> so for processID 0 in this example by the fifth call, last accessed time will be as follows:
>
> (3 or 4), 1, 2, 3
It depends on which way you choose, if you ignore it, you don't load it into the RAM, thus, not using much/any time so it doesn't increase. If you choose to read it, it will increase by 1 as you said in the 2nd point