"Chenjun Hou" <23*6*8*
9@s*u*e*t*u*a*e*u*a*> wrote:
> Hi, Just 2 questions about the assignment,
>
> With the global least recently used eviction policy, does this only occur when we try to add a page already in the memory to the memory?
Occurs when RAM is full and you are trying to load a new page into memory. E.g. If page 0 of process zero is in memory and RAM is full and you are trying to load the next page of process 0, then you evict the least recently loaded page of process 0 (in this case page 0) to make room for page 1.
> Also, since the output is only interested in the ram, what is the purpose of the disk? Can't we simulate the virtual memory just using a ram array, since no information is stored in the pages?
Yes, you could, but I'm not sure if that's what Amitava intends. I think he wants you to pass pointers around, which is the only purpose of virtual memory, to store the pointers.
> Thanks
np