Again, in our fictional machine, we've got: 64 KB of VM, that is, 64K/4K = 16 pages, and 32 KB of RAM, that is, 32K/4K = 8 page frames.
Mapping the 16 (virtual) pages to corresponding (physical) page frames requires a table of only 16 entries per process, which makes the whole deal viable.
Very simplistically, the OS-created PT of a single process look as follows:
(Virtual) page | (Physical) page frame |
0 | 3 |
1 | 2 |
2 | 5 |
[...] | [...] |
15 | 6 |
Of course, the astute reader will notice that we have a problem: we've got 16 pages and just eight page frames to map them into – what about the remaining eight pages?
Well, consider this:
- In reality, every process will not use every available page ...