Вопрос

Can a page be, at the same time, in physical memory and in virtual memory?

If I ask for an address that's on virtual memory, will it always trigger a page fault? If the first question is true, then it should only trigger a page fault if the page is not also in physical memory. Is that right?

Это было полезно?

Решение

Can a page be at the same time in physical memory and in virtual memory?

When you page out a memory block you need the space for other stuff, so it would make no sense to have it in RAM and in page file.

If I ask for an address that's on virtual memory, will it always trigger a page fault? If the first question is true, then it should only trigger a page fault if the page is not also in physical memory. Is that right?

Yes thats right. Pagefaults cause an interrupt. If you always had a pagefault when you access memory than you had only very little performace.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top