0

Principles of virtual memory

enter image description here

This figure shows pages being stored in disk and page frames in ram. If there's no swap area, then there would be no pages and only page frames. In the absence of the swap area how virtual addresses are translated? What will the page table store, they're no pages essentially?

A related question here:

The selected answer says:

Frame or page frame is basically a physical page which is a chunk of memory in main memory while page or virtual page is yet to be mapped to a page frame in main memory.

Do virtual pages reside only disk? And if there's no swap area, are there pages at all? The answer says pages are mapped to page frames through a page table, but doesn't mention where do these pages exist or what if there's no swap area.

What is virtual memory if there's no swap area and only ram? A typical virtual memory is disk + ram. What if there there's no disk in that expression?

GIZ
  • 4,409
  • 1
  • 24
  • 43
  • Possible duplicate of [Difference between virtual page and page frame?](https://stackoverflow.com/questions/42258337/difference-between-virtual-page-and-page-frame) – Tony Tannous Jul 05 '17 at 11:49
  • @TonyTannous I've seen that question. I edited my question to explain more. – GIZ Jul 05 '17 at 13:09

1 Answers1

1

That diagram is highly confusing because it is showing two concepts at once: Logical memory translation and virtual memory—AND it is splitting the two concepts apart, rather than conflating them as was the norm in the old days.

What will the page table store, they're no pages essentially?

The page table defines the logical address space. It identifies which pages are in the address space. Such pages may or may not exist in physical memory.

In the absence of the swap area how virtual addresses are translated?

Entirely using the page table. If the system uses paging, the operating system has to implement a second level of translation to locate where a specific page is located in secondary storage.

What is virtual memory if there's no swap area and only ram? A typical virtual memory is disk + ram. What if there there's no disk in that expression?

Then you have logical memory translation without virtual memory.

user3344003
  • 20,574
  • 3
  • 26
  • 62
  • That was great and this is exactly what I was looking for. In summary, I can now say the following: the page table is like a map that leads to the location of pages (either in ram or storage). The page table is the _implementation_ of logical/virtual address space. Whenever a process needs to access memory, it access memory through the page table. – GIZ Jul 05 '17 at 18:16