0

Does a program always use logical address in a continuous manner? Is it possible that a program does not use 0-200 logical addresses and instead use random addresses?

I am asking this because while I was reading about memory management in Operating system concepts by Galvin, the author mentioned that the page table stores an entry for each page no matter whether the page is valid or invalid.

If the pages were used continuously then we would not need to store all entries.

code11
  • 1,986
  • 5
  • 29
  • 37
Kishan Kumar
  • 685
  • 1
  • 5
  • 17

1 Answers1

0

The validate address range in a logical address space is invariably discontinuous.

To start with, there is a separate range of addresses for the user space and the system space. The system space is usually at a high range of addresses while the user space usually starts at a low range of addresses.

Even the user space tends to be discontinuous. Application data tends to start at the low end and stack space (which grows downward) tends to be at higher addresses.

the author mentioned that the page table stores an entry for each page no matter whether the page is valid or invalid.

That's not right at all.

In systems with linear page tables, there is a maximum size of the page table that usually can be set by system parameters and reduced by process quotas. There are likely to be logical addresses with no page table entry at all.

In systems with multilevel page tables, there can be gaps in the logical address space caused by missing page tables.

glauxosdever
  • 652
  • 4
  • 11
user3344003
  • 20,574
  • 3
  • 26
  • 62