0

The problem states, "Physical memory consists of 64 bytes divided into pages of 16 bytes. Likewise, the virtual address space is also 64 bytes."

It also states, " Each page table will be placed in its own page in the simulated memory [we are using an array of chars to act as our physical memory] array."

Lastly, there are only going to be a maximum of 4 processes running at once, therefor four page tables will be needed.

What I don't understand is that if the physical memory is only 64 bytes and each page table should take up 16 bytes, wouldn't there be no room left over to store any information about or from the processes?

JGerulskis
  • 800
  • 2
  • 10
  • 24

1 Answers1

1

You are dealing with a totally nonsensical problem. Unfortunately, operating systems text books and professors appear hell-bent to transform the simple into the confusing for computer science.

If the virtual address is space is 64 bytes and a page is 16 bytes then there are only 4 pages in the address space (and in the physical address space). Thus you only need 2 bits in each page table entry (under such an unrealistic scenario). And at most one byte for the page table.

This kind of problem leads to many misconceptions. For example, the page table does not need to cover the entire range of the virtual address space.

user3344003
  • 20,574
  • 3
  • 26
  • 62