I saw a question similar to this one, and it was answered but the answer was kind of vague and I'm looking for a little more detail than that. The question I'm referring to is this one.
The answer simply states that there are more page tables, one for each process. And the same thing is said in the book that I'm studying from.
Quote (translated myself, so might not sound so great):
During the program execution, the CPU works with logical addresses. The logical address has to be translated into a physical address for which a special structure called page table is used. The operating system generates a page table for each process in execution.
Okay, so that seems to be clear. But the books seems to contradict itself later on, in the section which explains where and how these tables are stored. Here's what the book says:
In the simplest case, a page table can be stored in a set of registers. However, using registers for storing page tables is only satisfactory when the table is relatively small. In the situation where the table is larger it is kept in memory, and a special base register points to its location (Page Table Base Register - PTBR).
I guess you can already see my confusion here: The plural and singular just keep alternating so I'm not sure whether there is in fact one or more page tables. Later on the concept of the Translation Lookaside Buffer is introduced and it gets even more confusing.
My questions come down to this:
Is there a single page table where all the pages from different processes are mapped into different memory frames, or is there a page table for each process currently being executed? If the latter is true, then does the CPU have a separate PTBR for each of these tables? I mean that seems kind of impossible, since that register is physical which would imply that there needs to be a finite number of them. Or maybe a combination of these cases, where there is in fact a table for each process but the CPU operates only with one at a time with some kind of context-switching mechanism?
Thanks in advance.