1

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?

ale
  • 6,369
  • 7
  • 55
  • 65
Alvaro VS
  • 203
  • 1
  • 5
  • 15

1 Answers1

0

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.